mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 07:35:32 +00:00
Time should be IntPtr, not uint.
Fixed KeypadEnter detection (was mistakenly mapped to vanilla Enter key).
This commit is contained in:
parent
9b29e138a3
commit
3059d09795
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue