mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
WindowsWindow now calls DestroyWindow
This commit is contained in:
@@ -158,12 +158,21 @@ namespace GlitchyEngine
|
|||||||
|
|
||||||
Init(desc);
|
Init(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[LinkName(.C)]
|
||||||
|
static extern Windows.IntBool DestroyWindow(Windows.HWnd hWnd);
|
||||||
|
|
||||||
[LinkName("UnregisterClassW")]
|
[LinkName("UnregisterClassW")]
|
||||||
static extern Windows.IntBool UnregisterClass(char16* className, Windows.HInstance hInstance);
|
static extern Windows.IntBool UnregisterClass(char16* className, Windows.HInstance hInstance);
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
|
if(!DestroyWindow(_windowHandle))
|
||||||
|
{
|
||||||
|
HResult res = (.)GetLastError();
|
||||||
|
Log.EngineLogger.Error($"Failed to destroy window: Message ({(int)res}): {res}");
|
||||||
|
}
|
||||||
|
|
||||||
UnregisterClass(WindowClassName.ToScopedNativeWChar!(), _instanceHandle);
|
UnregisterClass(WindowClassName.ToScopedNativeWChar!(), _instanceHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user