Win32: Compile fixes

This commit is contained in:
Elias Naur 2005-04-29 15:20:19 +00:00
parent fdcf050747
commit 98c7a3a54f
4 changed files with 9 additions and 8 deletions

View file

@ -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
*/

View file

@ -140,7 +140,7 @@ HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height
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)

View file

@ -363,7 +363,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setCursorPosition
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 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setCursorPosition
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");
}

View file

@ -63,6 +63,10 @@ static bool closerequested;
#define WINDOWCLASSNAME "LWJGL"
bool getCurrentFullscreen() {
return isFullScreen;
}
HDC getCurrentHDC() {
return display_hdc;
}
@ -378,7 +382,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_reshape(JNIEnv *env, j
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: