mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
[Mac] Fixed a warning related to volatile UniqueId
Also changed the class name to OpenTK_GameWindow
This commit is contained in:
parent
acb7dd27a7
commit
a2212f0184
|
@ -39,7 +39,7 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
class CocoaNativeWindow : INativeWindow
|
||||
{
|
||||
static volatile int UniqueId;
|
||||
static int UniqueId;
|
||||
|
||||
public event EventHandler<EventArgs> Move = delegate { };
|
||||
public event EventHandler<EventArgs> Resize = delegate { };
|
||||
|
@ -151,7 +151,7 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
// Create the window class
|
||||
Interlocked.Increment(ref UniqueId);
|
||||
windowClass = Class.AllocateClass("OpenTKWindow" + UniqueId, "NSWindow");
|
||||
windowClass = Class.AllocateClass("OpenTK_GameWindow" + UniqueId, "NSWindow");
|
||||
Class.RegisterMethod(windowClass, new WindowDidResizeDelegate(WindowDidResize), "windowDidResize:", "v@:@");
|
||||
Class.RegisterMethod(windowClass, new WindowDidMoveDelegate(WindowDidMove), "windowDidMove:", "v@:@");
|
||||
Class.RegisterMethod(windowClass, new WindowDidBecomeKeyDelegate(WindowDidBecomeKey), "windowDidBecomeKey:", "v@:@");
|
||||
|
|
Loading…
Reference in a new issue