Time should be IntPtr, not uint.

Fixed KeypadEnter detection (was mistakenly mapped to vanilla Enter key).
This commit is contained in:
the_fiddler 2009-02-09 15:33:32 +00:00
parent 9b29e138a3
commit 3059d09795
3 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ namespace OpenTK.Platform.X11
using Mask = System.IntPtr;
using Atom = System.IntPtr;
using VisualID = System.IntPtr;
using Time = System.UInt32;
using Time = System.IntPtr;
using KeyCode = System.Byte; // Or maybe ushort?
using Display = System.IntPtr;

View file

@ -126,7 +126,7 @@ namespace OpenTK.Platform.X11
this.Add(XKey.KP_Up, Key.Keypad8);
this.Add(XKey.KP_Page_Up, Key.Keypad9);
this.Add(XKey.KP_Delete, Key.KeypadDecimal);
this.Add(XKey.KP_Enter, Key.Enter);
this.Add(XKey.KP_Enter, Key.KeypadEnter);
}
catch (ArgumentException e)

View file

@ -29,7 +29,7 @@ namespace OpenTK.Platform.X11
// Store a mapping between DisplayDevices and X11 screens.
static Dictionary<DisplayDevice, int> deviceToScreen = new Dictionary<DisplayDevice, int>();
// Keep the time when the config of each screen was last updated.
static List<uint> lastConfigUpdate = new List<uint>();
static List<IntPtr> lastConfigUpdate = new List<IntPtr>();
#region --- Constructors ---
@ -40,7 +40,7 @@ namespace OpenTK.Platform.X11
// TODO: Global X11 lock.
for (int screen = 0; screen < API.ScreenCount; screen++)
{
uint timestamp_of_last_update;
IntPtr timestamp_of_last_update;
Functions.XRRTimes(API.DefaultDisplay, screen, out timestamp_of_last_update);
lastConfigUpdate.Add(timestamp_of_last_update);