mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Windows: Made WindowsDisplayPeerInfo take hwnd and hdc arguments
This commit is contained in:
parent
2420133bb9
commit
1006aed308
4 changed files with 14 additions and 12 deletions
|
|
@ -155,7 +155,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
long parent_hwnd = parent != null ? getHwnd(parent) : 0;
|
||||
boolean isUndecorated = isUndecorated();
|
||||
nCreateWindow(mode, fullscreen, x, y, isUndecorated, parent != null, parent_hwnd);
|
||||
peer_info.initDC();
|
||||
peer_info.initDC(getHwnd(), getHdc());
|
||||
showWindow(getHwnd(), SW_SHOWDEFAULT);
|
||||
if (parent == null) {
|
||||
setForegroundWindow(getHwnd());
|
||||
|
|
@ -468,6 +468,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
|
||||
private static native long getDllInstance();
|
||||
private static native long getHwnd();
|
||||
private static native long getHdc();
|
||||
private static native long getDesktopWindow();
|
||||
static void centerCursor(long hwnd) {
|
||||
getGlobalClientRect(getHwnd(), rect);
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ final class WindowsDisplayPeerInfo extends WindowsPeerInfo {
|
|||
GLContext.loadOpenGLLibrary();
|
||||
}
|
||||
|
||||
void initDC() throws LWJGLException {
|
||||
nInitDC(getHandle());
|
||||
void initDC(long hwnd, long hdc) throws LWJGLException {
|
||||
nInitDC(getHandle(), hwnd, hdc);
|
||||
choosePixelFormat(0, 0, pixel_format, null, true, true, false, true);
|
||||
}
|
||||
private static native void nInitDC(ByteBuffer peer_info_handle);
|
||||
private static native void nInitDC(ByteBuffer peer_info_handle, long hwnd, long hdc);
|
||||
|
||||
protected void doLockAndInitHandle() throws LWJGLException {
|
||||
// NO-OP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue