|
From: Elias N. <eli...@us...> - 2003-12-20 14:01:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv21938/src/native/win32 Modified Files: org_lwjgl_Display.cpp org_lwjgl_Sys.cpp org_lwjgl_input_Controller.cpp org_lwjgl_input_Keyboard.cpp org_lwjgl_input_Mouse.cpp org_lwjgl_opengl_Window.cpp Log Message: Implemented proper debug levels 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.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- org_lwjgl_Display.cpp 15 Dec 2003 11:49:17 -0000 1.56 +++ org_lwjgl_Display.cpp 20 Dec 2003 14:01:31 -0000 1.57 @@ -62,7 +62,7 @@ { jobjectArray result = GetAvailableDisplayModesEx(env); if (result == NULL) { - printfDebug("Extended display mode selection failed, using fallback\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Extended display mode selection failed, using fallback\n"); result = GetAvailableDisplayModes(env); } return result; @@ -79,7 +79,7 @@ HMODULE lib_handle = LoadLibrary("user32.dll"); if (lib_handle == NULL) { - printfDebug("Could not load user32.dll\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Could not load user32.dll\n"); return NULL; } EnumDisplayDevicesA = (EnumDisplayDevicesAPROC)GetProcAddress(lib_handle, "EnumDisplayDevicesA"); @@ -103,7 +103,7 @@ //enumerate all displays, and all of their displaymodes while(EnumDisplayDevicesA(NULL, i++, &DisplayDevice, 0) != 0) { - printfDebug("Querying %s device\n", DisplayDevice.DeviceString); + printfDebug(org_lwjgl_Sys_DEBUG, "Querying %s device\n", DisplayDevice.DeviceString); j = 0; while(EnumDisplaySettingsExA((const char *) DisplayDevice.DeviceName, j++, &DevMode, 0) != 0) { if (DevMode.dmBitsPerPel > 8) { @@ -112,7 +112,7 @@ } } - printfDebug("Found %d displaymodes\n", AvailableModes); + printfDebug(org_lwjgl_Sys_DEBUG, "Found %d displaymodes\n", AvailableModes); // now that we have the count create the classes, and add 'em all - we'll remove dups in Java // Allocate an array of DisplayModes big enough @@ -160,7 +160,7 @@ } } - printfDebug("Found %d displaymodes\n", AvailableModes); + printfDebug(org_lwjgl_Sys_DEBUG, "Found %d displaymodes\n", AvailableModes); // now that we have the count create the classes, and add 'em all - we'll remove dups in Java // Allocate an array of DisplayModes big enough @@ -230,12 +230,12 @@ if (cdsret != DISP_CHANGE_SUCCESSFUL) { // Failed: so let's check to see if it's a wierd dual screen display - printfDebug("Failed to set display mode... assuming dual monitors\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to set display mode... assuming dual monitors\n"); devmode.dmPelsWidth = width * 2; cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); if (cdsret != DISP_CHANGE_SUCCESSFUL) { - printfDebug("Failed to set display mode using dual monitors\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to set display mode using dual monitors\n"); throwException(env, "Failed to set display mode."); return; } @@ -278,7 +278,7 @@ HDC screenDC = GetDC(NULL); try { if (!SetDeviceGammaRamp(screenDC, originalGamma)) { - printfDebug("Could not reset device gamma\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Could not reset device gamma\n"); } } catch (...) { printf("Exception occurred in SetDeviceGammaRamp\n"); @@ -303,7 +303,7 @@ HDC screenDC = GetDC(NULL); try { if (!SetDeviceGammaRamp(screenDC, originalGamma)) { - printfDebug("Could not reset device gamma\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Could not reset device gamma\n"); } } catch (...) { printf("Exception occurred in SetDeviceGammaRamp\n"); @@ -311,7 +311,7 @@ ReleaseDC(NULL, screenDC); if (modeSet) { - printfDebug("Attempting to temporarily reset the display mode\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Attempting to temporarily reset the display mode\n"); modeSet = false; // Under Win32, all we have to do is: ChangeDisplaySettings(NULL, 0); @@ -326,7 +326,7 @@ HDC screenDC = GetDC(NULL); try { if (!SetDeviceGammaRamp(screenDC, currentGamma)) { - printfDebug("Could not restore device gamma\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Could not restore device gamma\n"); } } catch (...) { printf("Exception occurred in SetDeviceGammaRamp\n"); @@ -334,12 +334,12 @@ ReleaseDC(NULL, screenDC); if (!modeSet) { - printfDebug("Attempting to restore the display mode\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Attempting to restore the display mode\n"); modeSet = true; LONG cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); if (cdsret != DISP_CHANGE_SUCCESSFUL) { - printfDebug("Failed to restore display mode\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to restore display mode\n"); } } } @@ -415,7 +415,7 @@ // Get the default gamma ramp try { if (GetDeviceGammaRamp(screenDC, originalGamma) == FALSE) { - printfDebug("Failed to get initial device gamma\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to get initial device gamma\n"); } } catch (...) { printf("Exception occurred in GetDeviceGammaRamp\n"); @@ -450,7 +450,7 @@ if(lRet != ERROR_SUCCESS) return NULL; - printfDebug("Adapter key: %s\n", szAdapterKey); + printfDebug(org_lwjgl_Sys_DEBUG, "Adapter key: %s\n", szAdapterKey); // szAdapterKey now contains something like \Registry\Machine\System\CurrentControlSet\Control\Video\{B70DBD2A-90C4-41CF-A58E-F3BA69F1A6BC}\0000 // We'll check for the first chunk: Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_Sys.cpp 15 Dec 2003 11:49:17 -0000 1.18 +++ org_lwjgl_Sys.cpp 20 Dec 2003 14:01:31 -0000 1.19 @@ -120,7 +120,7 @@ } if (!SetPriorityClass(me, win32priority)) { - printfDebug("Failed to set priority class.\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to set priority class.\n"); } } @@ -137,7 +137,7 @@ const char * cTitleBarText = env->GetStringUTFChars(title, ©); MessageBox(hwnd, eMessageText, cTitleBarText, MB_OK | MB_TOPMOST); - printfDebug("*** Alert ***%s\n%s\n", cTitleBarText, eMessageText); + printfDebug(org_lwjgl_Sys_DEBUG, "*** Alert ***%s\n%s\n", cTitleBarText, eMessageText); env->ReleaseStringUTFChars(message, eMessageText); env->ReleaseStringUTFChars(title, cTitleBarText); @@ -191,7 +191,7 @@ &pi ) // Pointer to PROCESS_INFORMATION structure. ) { - printfDebug("Failed to open URL %s\n", urlString); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to open URL %s\n", urlString); } // Close process and thread handles. Index: org_lwjgl_input_Controller.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Controller.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Controller.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- org_lwjgl_input_Controller.cpp 15 Dec 2003 11:49:17 -0000 1.16 +++ org_lwjgl_input_Controller.cpp 20 Dec 2003 14:01:31 -0000 1.17 @@ -120,7 +120,7 @@ HRESULT hr; hr = DirectInputCreate(dll_handle, DIRECTINPUT_VERSION, &cDI, NULL); if (FAILED(hr)) { - printfDebug("DirectInputCreate failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "DirectInputCreate failed\n"); ShutdownController(); return; } @@ -199,12 +199,12 @@ // poll the Controller to read the current state hRes = cDIDevice->Poll(); if (FAILED(hRes)) { - printfDebug("Poll fail\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Poll fail\n"); //check if we need to reaquire if(hRes == DIERR_INPUTLOST || hRes == DIERR_NOTACQUIRED) { cDIDevice->Acquire(); - printfDebug("DIERR_INPUTLOST, reaquiring input : cCreate_success=%d\n", cCreate_success); + printfDebug(org_lwjgl_Sys_DEBUG, "DIERR_INPUTLOST, reaquiring input : cCreate_success=%d\n", cCreate_success); } return; } @@ -231,7 +231,7 @@ HRESULT hr; hr = cDIDevice->EnumObjects(EnumControllerObjectsCallback, NULL, DIDFT_ALL); if FAILED(hr) { - printfDebug("EnumObjects failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "EnumObjects failed\n"); cCreate_success = false; return; } @@ -245,7 +245,7 @@ HRESULT hr; hr = cDI->EnumDevices(DIDEVTYPE_JOYSTICK, EnumControllerCallback, 0, DIEDFL_ATTACHEDONLY); if FAILED(hr) { - printfDebug("EnumDevices failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "EnumDevices failed\n"); cCreate_success = false; return; } @@ -267,7 +267,7 @@ * Callback from EnumObjects. Called for each "object" on the Controller. */ BOOL CALLBACK EnumControllerObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) { - printfDebug("found %s\n", lpddoi->tszName); + printfDebug(org_lwjgl_Sys_DEBUG, "found %s\n", lpddoi->tszName); if(lpddoi->guidType == GUID_Button) { cButtoncount++; } else if(lpddoi->guidType == GUID_XAxis) { @@ -287,7 +287,7 @@ } else if (lpddoi->guidType == GUID_RzAxis) { cHasrz = true; } else { - printfDebug("Unhandled object found: %s\n", lpddoi->tszName); + printfDebug(org_lwjgl_Sys_DEBUG, "Unhandled object found: %s\n", lpddoi->tszName); } return DIENUM_CONTINUE; } @@ -299,7 +299,7 @@ HRESULT hr; hr = cDI->CreateDevice(lpddi->guidInstance, (LPDIRECTINPUTDEVICE*) &cDIDevice, NULL); if FAILED(hr) { - printfDebug("CreateDevice failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "CreateDevice failed\n"); cCreate_success = false; return; } @@ -312,14 +312,14 @@ static void SetupController() { // set Controller data format if(cDIDevice->SetDataFormat(&c_dfDIJoystick2) != DI_OK) { - printfDebug("SetDataFormat failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetDataFormat failed\n"); cCreate_success = false; return; } // set the cooperative level if(cDIDevice->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND) != DI_OK) { - printfDebug("SetCooperativeLevel failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetCooperativeLevel failed\n"); cCreate_success = false; return; } @@ -337,7 +337,7 @@ if(cHasx) { diprg.diph.dwObj = DIJOFS_X; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_X) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_X) failed\n"); cCreate_success = false; return; } @@ -347,7 +347,7 @@ if(cHasrx) { diprg.diph.dwObj = DIJOFS_RX; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_RX) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_RX) failed\n"); cCreate_success = false; return; } @@ -358,7 +358,7 @@ if(cHasy) { diprg.diph.dwObj = DIJOFS_Y; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_Y) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_Y) failed\n"); cCreate_success = false; return; } @@ -368,7 +368,7 @@ if(cHasry) { diprg.diph.dwObj = DIJOFS_RY; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_RY) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_RY) failed\n"); cCreate_success = false; return; } @@ -378,7 +378,7 @@ if(cHasz) { diprg.diph.dwObj = DIJOFS_Z; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_Z) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_Z) failed\n"); cCreate_success = false; return; } @@ -389,7 +389,7 @@ if(cHasrz) { diprg.diph.dwObj = DIJOFS_RZ; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_RZ) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_RZ) failed\n"); cCreate_success = false; return; } @@ -402,7 +402,7 @@ if(cHasslider) { diprg.diph.dwObj = DIJOFS_Z; if(cDIDevice->SetProperty(DIPROP_RANGE, &diprg.diph) != DI_OK) { - printfDebug("SetProperty(DIJOFS_Z(SLIDER)) failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetProperty(DIJOFS_Z(SLIDER)) failed\n"); cCreate_success = false; return; } @@ -435,9 +435,9 @@ // if so, then attempt to reacquire. if(hRes == DIERR_INPUTLOST || hRes == DIERR_NOTACQUIRED) { cDIDevice->Acquire(); - printfDebug("DIERR_INPUTLOST, reaquiring input : cCreate_success=%d\n", cCreate_success); + printfDebug(org_lwjgl_Sys_DEBUG, "DIERR_INPUTLOST, reaquiring input : cCreate_success=%d\n", cCreate_success); } - printfDebug("Error getting controller state: %d\n", hRes); + printfDebug(org_lwjgl_Sys_DEBUG, "Error getting controller state: %d\n", hRes); return; } 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.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_input_Keyboard.cpp 15 Dec 2003 11:49:17 -0000 1.26 +++ org_lwjgl_input_Keyboard.cpp 20 Dec 2003 14:01:31 -0000 1.27 @@ -110,7 +110,7 @@ HRESULT ret = lpdiKeyboard->Acquire(); if(FAILED(ret)) { - printfDebug("Failed to acquire keyboard\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to acquire keyboard\n"); } } @@ -245,19 +245,19 @@ } } } else if (ret == DI_BUFFEROVERFLOW) { - printfDebug("Keyboard buffer overflowed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Keyboard buffer overflowed\n"); } else if (ret == DIERR_INPUTLOST) { - printfDebug("Input lost\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Input lost\n"); } else if (ret == DIERR_NOTACQUIRED) { - printfDebug("not acquired\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not acquired\n"); } else if (ret == DIERR_INVALIDPARAM) { - printfDebug("invalid parameter\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "invalid parameter\n"); } else if (ret == DIERR_NOTBUFFERED) { - printfDebug("not buffered\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not buffered\n"); } else if (ret == DIERR_NOTINITIALIZED) { - printfDebug("not inited\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not inited\n"); } else { - printfDebug("unknown keyboard error\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "unknown keyboard error\n"); } return num_events; } Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- org_lwjgl_input_Mouse.cpp 15 Dec 2003 11:49:17 -0000 1.40 +++ org_lwjgl_input_Mouse.cpp 20 Dec 2003 14:01:31 -0000 1.41 @@ -135,7 +135,7 @@ /* Aquire the Mouse */ hr = mDIDevice->Acquire(); if(FAILED(hr)) { - printfDebug("Failed to acquire mouse\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to acquire mouse\n"); } } @@ -197,19 +197,19 @@ if (ret == DI_OK) { return bufferButtons(bufsize, rgdod); } else if (ret == DI_BUFFEROVERFLOW) { - printfDebug("Buffer overflowed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Buffer overflowed\n"); } else if (ret == DIERR_INPUTLOST) { - printfDebug("Input lost\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Input lost\n"); } else if (ret == DIERR_NOTACQUIRED) { - printfDebug("not acquired\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not acquired\n"); } else if (ret == DIERR_INVALIDPARAM) { - printfDebug("invalid parameter\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "invalid parameter\n"); } else if (ret == DIERR_NOTBUFFERED) { - printfDebug("not buffered\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not buffered\n"); } else if (ret == DIERR_NOTINITIALIZED) { - printfDebug("not inited\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "not inited\n"); } else { - printfDebug("unknown keyboard error\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "unknown keyboard error\n"); } return 0; } @@ -331,7 +331,7 @@ HRESULT hr; hr = mDIDevice->EnumObjects(EnumMouseObjectsCallback, NULL, DIDFT_ALL); if FAILED(hr) { - printfDebug("EnumObjects failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "EnumObjects failed\n"); mCreate_success = false; return; } @@ -339,7 +339,7 @@ //check for > 4 buttons - need to clamp since we're using dx 5 if(mButtoncount > 4) { mButtoncount = 4; - printfDebug("WARNING: Clamping to 4 mouse buttons\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "WARNING: Clamping to 4 mouse buttons\n"); } mCreate_success = true; @@ -349,7 +349,7 @@ * Callback from EnumObjects. Called for each "object" on the Mouse. */ BOOL CALLBACK EnumMouseObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) { - printfDebug("found %s\n", lpddoi->tszName); + printfDebug(org_lwjgl_Sys_DEBUG, "found %s\n", lpddoi->tszName); if(lpddoi->guidType == GUID_Button) { mButtoncount++; } else if(lpddoi->guidType == GUID_XAxis) { @@ -357,7 +357,7 @@ } else if(lpddoi->guidType == GUID_ZAxis) { mHaswheel = true; } else { - printfDebug("Unhandled object found: %s\n", lpddoi->tszName); + printfDebug(org_lwjgl_Sys_DEBUG, "Unhandled object found: %s\n", lpddoi->tszName); } return DIENUM_CONTINUE; } @@ -369,7 +369,7 @@ HRESULT hr; hr = lpdi->CreateDevice(GUID_SysMouse, &mDIDevice, NULL); if FAILED(hr) { - printfDebug("CreateDevice failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "CreateDevice failed\n"); mCreate_success = false; return; } @@ -382,7 +382,7 @@ void SetupMouse() { // set Mouse data format if(mDIDevice->SetDataFormat(&c_dfDIMouse) != DI_OK) { - printfDebug("SetDataFormat failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetDataFormat failed\n"); mCreate_success = false; return; } @@ -397,7 +397,7 @@ // set the cooperative level if(mDIDevice->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND) != DI_OK) { - printfDebug("SetCooperativeLevel failed\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "SetCooperativeLevel failed\n"); mCreate_success = false; return; } @@ -457,7 +457,7 @@ if(hRes == DIERR_INPUTLOST || hRes == DIERR_NOTACQUIRED) { mDIDevice->Acquire(); } else { - printfDebug("Error getting mouse state: %d\n", hRes); + printfDebug(org_lwjgl_Sys_DEBUG, "Error getting mouse state: %d\n", hRes); } } 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.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_opengl_Window.cpp 15 Dec 2003 11:49:17 -0000 1.13 +++ org_lwjgl_opengl_Window.cpp 20 Dec 2003 14:01:31 -0000 1.14 @@ -97,7 +97,7 @@ return -1; } - printfDebug("Pixel format is %d\n", iPixelFormat); + printfDebug(org_lwjgl_Sys_DEBUG, "Pixel format is %d\n", iPixelFormat); // make that the pixel format of the device context if (SetPixelFormat(hdc, iPixelFormat, &pfd) == FALSE) { @@ -159,19 +159,19 @@ // Create input HRESULT ret = DirectInputCreate(dll_handle, DIRECTINPUT_VERSION, &lpdi, NULL); if (ret != DI_OK && ret != DIERR_BETADIRECTINPUTVERSION ) { - printfDebug("Failed to create directinput"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to create directinput"); switch (ret) { case DIERR_INVALIDPARAM : - printfDebug(" - Invalid parameter\n"); + printfDebug(org_lwjgl_Sys_DEBUG, " - Invalid parameter\n"); break; case DIERR_OLDDIRECTINPUTVERSION : - printfDebug(" - Old Version\n"); + printfDebug(org_lwjgl_Sys_DEBUG, " - Old Version\n"); break; case DIERR_OUTOFMEMORY : - printfDebug(" - Out Of Memory\n"); + printfDebug(org_lwjgl_Sys_DEBUG, " - Out Of Memory\n"); break; default: - printfDebug(" - Unknown failure\n"); + printfDebug(org_lwjgl_Sys_DEBUG, " - Unknown failure\n"); } return false; } else { @@ -186,23 +186,23 @@ { // Release DirectInput if (lpdi != NULL) { - printfDebug("Destroying directinput\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Destroying directinput\n"); lpdi->Release(); lpdi = NULL; } // Release device context if (hdc != NULL && hwnd != NULL) { - printfDebug("Releasing DC\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Releasing DC\n"); ReleaseDC(hwnd, hdc); } // Close the window if (hwnd != NULL) { - printfDebug("Destroy window\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Destroy window\n"); // Vape the window DestroyWindow(hwnd); - printfDebug("Destroyed window\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Destroyed window\n"); hwnd = NULL; } } @@ -312,10 +312,10 @@ windowClass.lpszClassName = WINDOWCLASSNAME; if (RegisterClass(&windowClass) == 0) { - printfDebug("Failed to register window class\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to register window class\n"); return false; } - printfDebug("Window registered\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Window registered\n"); oneShotInitialised = true; } @@ -397,11 +397,11 @@ NULL); if (hwnd == NULL) { - printfDebug("Failed to create window\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Failed to create window\n"); return false; } - printfDebug("Created window\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Created window\n"); ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd); @@ -558,7 +558,7 @@ // Delete the rendering context if (hglrc != NULL) { - printfDebug("Deleting GL context\n"); + printfDebug(org_lwjgl_Sys_DEBUG, "Deleting GL context\n"); wglDeleteContext(hglrc); hglrc = NULL; } |