From: Elias N. <eli...@us...> - 2005-04-29 15:20:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2968/src/native/win32 Modified Files: Window.h context.c org_lwjgl_input_Mouse.c org_lwjgl_opengl_Display.c Log Message: Win32: Compile fixes Index: Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/Window.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Window.h 23 Feb 2005 11:42:04 -0000 1.24 +++ Window.h 29 Apr 2005 15:20:19 -0000 1.25 @@ -54,10 +54,6 @@ #define WINDOW_H_API #else #define WINDOW_H_API extern - extern bool isFullScreen; // Whether we're fullscreen or not - extern bool isMinimized; // Whether we're minimized or not - extern bool isFocused; // Whether we're focused or not - extern bool isDirty; // Whether we're dirty or not #endif /* _PRIVATE_WINDOW_H_ */ WINDOW_H_API HWND getCurrentHWND(); @@ -72,6 +68,7 @@ WINDOW_H_API void handleMessages(void); + WINDOW_H_API bool getCurrentFullscreen(); /* * Handle native Win32 messages */ Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- org_lwjgl_opengl_Display.c 29 Apr 2005 15:08:16 -0000 1.22 +++ org_lwjgl_opengl_Display.c 29 Apr 2005 15:20:19 -0000 1.23 @@ -63,6 +63,10 @@ #define WINDOWCLASSNAME "LWJGL" +bool getCurrentFullscreen() { + return isFullScreen; +} + HDC getCurrentHDC() { return display_hdc; } @@ -378,7 +382,7 @@ return; } - getWindowFlags(&windowflags, &exstyle, isFullscreen, getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated")); + getWindowFlags(&windowflags, &exstyle, isFullScreen, getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated")); // If we're not a fullscreen window, adjust the height to account for the // height of the title bar: Index: org_lwjgl_input_Mouse.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_input_Mouse.c 29 Apr 2005 15:08:16 -0000 1.13 +++ org_lwjgl_input_Mouse.c 29 Apr 2005 15:20:19 -0000 1.14 @@ -363,7 +363,7 @@ int left_border_width; int bottom_border_width; - getWindowFlags(&windowflags, &extyle, isFullscreen, getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated")); + getWindowFlags(&windowflags, &exstyle, getCurrentFullscreen(), getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated")); if (!GetClientRect(getCurrentHWND(), &client_rect)) { printfDebugJava(env, "GetClientRect failed"); return; @@ -383,7 +383,7 @@ bottom_border_width = adjusted_client_rect.bottom - client_rect.bottom; transformed_x = window_rect.left + left_border_width + x; - transformed_y = window_rect.bottom - bottom_border_width - y; + transformed_y = window_rect.bottom - bottom_border_width - 1 - y; if (!SetCursorPos(transformed_x, transformed_y)) printfDebugJava(env, "SetCursorPos failed"); } Index: context.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/context.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- context.c 29 Apr 2005 15:08:15 -0000 1.6 +++ context.c 29 Apr 2005 15:20:19 -0000 1.7 @@ -140,7 +140,7 @@ DWORD exstyle, windowflags; HWND new_hwnd; - getWindowFlags(&windowflags, &exstyle, fullscreen, indecorated); + getWindowFlags(&windowflags, &exstyle, fullscreen, undecorated); // If we're not a fullscreen window, adjust the height to account for the // height of the title bar (unless undecorated) |