Update of /cvsroot/java-game-lib/LWJGL/src/native/win32
In directory sc8-pr-cvs1:/tmp/cvs-serv22422
Modified Files:
org_lwjgl_input_Keyboard.cpp org_lwjgl_opengl_Window.cpp
Log Message:
ifdef'ed some debug printfs
Index: org_lwjgl_input_Keyboard.cpp
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Keyboard.cpp
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Keyboard.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- org_lwjgl_input_Keyboard.cpp 23 Aug 2003 09:45:22 -0000 1.22
+++ org_lwjgl_input_Keyboard.cpp 11 Sep 2003 08:00:28 -0000 1.23
@@ -86,23 +86,31 @@
translationEnabled = false;
// Check to see if we're already initialized
if (lpdiKeyboard != NULL) {
+#ifdef _DEBUG
printf("Keyboard already created.\n");
- return 1;
+#endif
+ return JNI_FALSE;
}
if (hwnd == NULL) {
+#ifdef _DEBUG
printf("No window\n");
+#endif
return JNI_FALSE;
}
// Create a keyboard device
if (lpdi->CreateDevice(GUID_SysKeyboard, &lpdiKeyboard, NULL) != DI_OK) {
+#ifdef _DEBUG
printf("Failed to create keyboard\n");
+#endif
return JNI_FALSE;
}
if (lpdiKeyboard->SetCooperativeLevel(hwnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND) != DI_OK) {
- printf("Failed to keyboard coop\n");
+#ifdef _DEBUG
+ printf("Failed to set keyboard cooperation mode\n");
+#endif
return JNI_FALSE;
}
@@ -120,7 +128,7 @@
HRESULT ret = lpdiKeyboard->Acquire();
if(FAILED(ret)) {
#if _DEBUG
- printf("Failed to acquire keyboard\n");
+ printf("Failed to acquire keyboard\n");
#endif
}
@@ -353,4 +361,4 @@
}
return state;
-}
\ No newline at end of file
+}
Index: org_lwjgl_opengl_Window.cpp
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Window.cpp
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Window.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- org_lwjgl_opengl_Window.cpp 17 Aug 2003 18:40:58 -0000 1.5
+++ org_lwjgl_opengl_Window.cpp 11 Sep 2003 08:00:28 -0000 1.6
@@ -181,6 +181,7 @@
// Create input
HRESULT ret = DirectInputCreate(dll_handle, DIRECTINPUT_VERSION, &lpdi, NULL);
if (ret != DI_OK && ret != DIERR_BETADIRECTINPUTVERSION ) {
+#ifdef _DEBUG
printf("Failed to create directinput");
switch (ret) {
case DIERR_INVALIDPARAM :
@@ -195,6 +196,7 @@
default:
printf(" - Unknown failure\n");
}
+#endif
return false;
} else {
return true;
@@ -342,7 +344,9 @@
windowClass.lpszClassName = WINDOWCLASSNAME;
if (RegisterClass(&windowClass) == 0) {
+#ifdef _DEBUG
printf("Failed to register window class\n");
+#endif
return false;
}
#ifdef _DEBUG
@@ -429,7 +433,9 @@
NULL);
if (hwnd == NULL) {
+#ifdef _DEBUG
printf("Failed to create window\n");
+#endif
return false;
}
|