Renamed KeyMap to WinKeyMap.

This commit is contained in:
the_fiddler 2008-02-01 23:13:50 +00:00
parent f16b6c55c6
commit e5b5af7b11
2 changed files with 8 additions and 3 deletions

View file

@ -24,7 +24,7 @@ namespace OpenTK.Platform.Windows
MouseDevice mouse = new MouseDevice(); MouseDevice mouse = new MouseDevice();
IList<KeyboardDevice> keyboards = new List<KeyboardDevice>(1); IList<KeyboardDevice> keyboards = new List<KeyboardDevice>(1);
IList<MouseDevice> mice = new List<MouseDevice>(1); IList<MouseDevice> mice = new List<MouseDevice>(1);
internal static readonly KeyMap KeyMap = new KeyMap(); internal static readonly WinKeyMap KeyMap = new WinKeyMap();
#region --- Constructor --- #region --- Constructor ---
@ -53,6 +53,8 @@ namespace OpenTK.Platform.Windows
#endregion #endregion
#region protected override void WndProc(ref Message msg)
protected override void WndProc(ref Message msg) protected override void WndProc(ref Message msg)
{ {
switch ((WindowMessage)msg.Msg) switch ((WindowMessage)msg.Msg)
@ -97,6 +99,7 @@ namespace OpenTK.Platform.Windows
return; return;
case WindowMessage.XBUTTONUP: case WindowMessage.XBUTTONUP:
// TODO: Is this correct?
mouse[((msg.WParam.ToInt32() & 0xFFFF0000) >> 16) != (int)MouseKeys.XButton1 ? MouseButton.Button1 : MouseButton.Button2] = false; mouse[((msg.WParam.ToInt32() & 0xFFFF0000) >> 16) != (int)MouseKeys.XButton1 ? MouseButton.Button1 : MouseButton.Button2] = false;
return; return;
@ -149,6 +152,8 @@ namespace OpenTK.Platform.Windows
base.WndProc(ref msg); base.WndProc(ref msg);
} }
#endregion
#region IInputDriver Members #region IInputDriver Members
public void Poll() public void Poll()

View file

@ -13,12 +13,12 @@ using System.Diagnostics;
namespace OpenTK.Platform.Windows namespace OpenTK.Platform.Windows
{ {
internal class KeyMap : Dictionary<VirtualKeys, Input.Key> internal class WinKeyMap : Dictionary<VirtualKeys, Input.Key>
{ {
/// <summary> /// <summary>
/// Initializes the map between VirtualKeys and OpenTK.Key /// Initializes the map between VirtualKeys and OpenTK.Key
/// </summary> /// </summary>
internal KeyMap() internal WinKeyMap()
{ {
try try
{ {