From: Elias N. <eli...@us...> - 2002-12-18 16:40:16
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv28043/win32 Modified Files: LWJGL.cpp org_lwjgl_Display.cpp Log Message: Fixed the RegisterClass call Index: LWJGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/LWJGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/LWJGL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- LWJGL.cpp 24 Aug 2002 21:16:53 -0000 1.4 +++ LWJGL.cpp 18 Dec 2002 16:40:12 -0000 1.5 @@ -41,7 +41,9 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -#include <stdio.h> +#include <stdio.h> + +HINSTANCE dll_handle; /* * DLL entry point for Windows. Called when Java loads the .dll @@ -51,6 +53,7 @@ DWORD fdwReason, // reason for calling function LPVOID lpvReserved // reserved ) -{ +{ + dll_handle = hinstDLL; return TRUE; // Success } Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_Display.cpp 14 Dec 2002 15:23:53 -0000 1.8 +++ org_lwjgl_Display.cpp 18 Dec 2002 16:40:12 -0000 1.9 @@ -49,7 +49,8 @@ #define WINDOWCLASSNAME "LWJGLWINDOW" -// Initialise static variables +extern HINSTANCE dll_handle; +// Initialise static variables bool oneShotInitialised = false; HWND hwnd = NULL; // Handle to the window HDC hdc = NULL; // Device context @@ -210,7 +211,7 @@ windowClass.lpfnWndProc = WindowProc; windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; - windowClass.hInstance = (HINSTANCE) GetCurrentProcess(); + windowClass.hInstance = dll_handle; windowClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); windowClass.hCursor = LoadIcon(NULL, IDC_ARROW); windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); |