mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
Windows: Split WindowsDisplay.nDestroyWindow into nReleaseDC and nDestroyWindow
This commit is contained in:
parent
5e06f19944
commit
9293ee4073
2 changed files with 19 additions and 13 deletions
|
|
@ -170,7 +170,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
}
|
||||
this.hdc = getDC(hwnd);
|
||||
if (hdc == 0) {
|
||||
nDestroyWindow(hwnd, hdc);
|
||||
nDestroyWindow(hwnd);
|
||||
throw new LWJGLException("Failed to get dc");
|
||||
}
|
||||
try {
|
||||
|
|
@ -183,7 +183,8 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
setFocus(getHwnd());
|
||||
}
|
||||
} catch (LWJGLException e) {
|
||||
nDestroyWindow(hwnd, hdc);
|
||||
nReleaseDC(hwnd, hdc);
|
||||
nDestroyWindow(hwnd);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
@ -205,12 +206,14 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
}
|
||||
|
||||
public void destroyWindow() {
|
||||
nDestroyWindow(hwnd, hdc);
|
||||
nReleaseDC(hwnd, hdc);
|
||||
nDestroyWindow(hwnd);
|
||||
freeLargeIcon();
|
||||
freeSmallIcon();
|
||||
resetCursorClipping();
|
||||
}
|
||||
private static native void nDestroyWindow(long hwnd, long hdc);
|
||||
private static native void nReleaseDC(long hwnd, long hdc);
|
||||
private static native void nDestroyWindow(long hwnd);
|
||||
static void resetCursorClipping() {
|
||||
if (cursor_clipped) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue