mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-22 17:51:12 +00:00
[OpenTK] Added IPlatformFactory.RegisterResource()
This commit is contained in:
parent
5d66aaa034
commit
ab75ca05c4
|
@ -165,6 +165,11 @@ namespace OpenTK.Platform
|
||||||
#pragma warning restore 612,618
|
#pragma warning restore 612,618
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegisterResource(IDisposable resource)
|
||||||
|
{
|
||||||
|
default_implementation.RegisterResource(resource);
|
||||||
|
}
|
||||||
|
|
||||||
class UnsupportedPlatform : PlatformFactoryBase
|
class UnsupportedPlatform : PlatformFactoryBase
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
|
@ -55,5 +55,7 @@ namespace OpenTK.Platform
|
||||||
|
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
Input.IJoystickDriver CreateLegacyJoystickDriver();
|
Input.IJoystickDriver CreateLegacyJoystickDriver();
|
||||||
|
|
||||||
|
void RegisterResource(IDisposable resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,18 +52,6 @@ namespace OpenTK.Platform
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Protected Members
|
|
||||||
|
|
||||||
protected void RegisterResource(IDisposable resource)
|
|
||||||
{
|
|
||||||
lock (sync)
|
|
||||||
{
|
|
||||||
Resources.Add(resource);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IPlatformFactory Members
|
#region IPlatformFactory Members
|
||||||
|
|
||||||
public abstract INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device);
|
public abstract INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title, GraphicsMode mode, GameWindowFlags options, DisplayDevice device);
|
||||||
|
@ -96,6 +84,14 @@ namespace OpenTK.Platform
|
||||||
return new LegacyJoystickDriver();
|
return new LegacyJoystickDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegisterResource(IDisposable resource)
|
||||||
|
{
|
||||||
|
lock (sync)
|
||||||
|
{
|
||||||
|
Resources.Add(resource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDisposable implementation
|
#region IDisposable implementation
|
||||||
|
|
Loading…
Reference in a new issue