*** empty log message ***
This commit is contained in:
parent
8c419814d6
commit
0886f84ed8
|
@ -191,4 +191,9 @@ public final class Sys {
|
|||
*/
|
||||
public static native void alert(String title, String message);
|
||||
|
||||
/*
|
||||
* Cas: this is just a debugging aid. The native code is also commented out.
|
||||
*
|
||||
public static native int getDirectBufferAddress(Buffer buf);
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ extern "C" {
|
|||
/* Inaccessible static: LIBRARY_NAME */
|
||||
/* Inaccessible static: DEBUG */
|
||||
/* Inaccessible static: _debug */
|
||||
/* Inaccessible static: class_00024org_00024lwjgl_00024Sys */
|
||||
/* Inaccessible static: class_000240 */
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getTimerResolution
|
||||
|
@ -60,6 +60,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setProcessPriority
|
|||
JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert
|
||||
(JNIEnv *, jclass, jstring, jstring);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getDirectBufferAddress
|
||||
* Signature: (Ljava/nio/Buffer;)I
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_getDirectBufferAddress
|
||||
(JNIEnv *, jclass, jobject);
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -273,10 +273,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_resetDisplayMode
|
|||
|
||||
// Return device gamma to normal
|
||||
HDC screenDC = GetDC(NULL);
|
||||
try {
|
||||
if (!SetDeviceGammaRamp(screenDC, originalGamma)) {
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG
|
||||
printf("Could not reset device gamma\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} catch (...) {
|
||||
printf("Exception occurred in SetDeviceGammaRamp\n");
|
||||
}
|
||||
ReleaseDC(NULL, screenDC);
|
||||
|
||||
|
@ -296,10 +300,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_resetDisplayMode
|
|||
void tempResetDisplayMode() {
|
||||
// Return device gamma to normal
|
||||
HDC screenDC = GetDC(NULL);
|
||||
try {
|
||||
if (!SetDeviceGammaRamp(screenDC, originalGamma)) {
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG
|
||||
printf("Could not reset device gamma\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} catch (...) {
|
||||
printf("Exception occurred in SetDeviceGammaRamp\n");
|
||||
}
|
||||
ReleaseDC(NULL, screenDC);
|
||||
|
||||
|
@ -319,10 +327,14 @@ void tempResetDisplayMode() {
|
|||
void tempRestoreDisplayMode() {
|
||||
// Restore gamma
|
||||
HDC screenDC = GetDC(NULL);
|
||||
try {
|
||||
if (!SetDeviceGammaRamp(screenDC, currentGamma)) {
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG
|
||||
printf("Could not restore device gamma\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} catch (...) {
|
||||
printf("Exception occurred in SetDeviceGammaRamp\n");
|
||||
}
|
||||
ReleaseDC(NULL, screenDC);
|
||||
|
||||
|
@ -374,14 +386,19 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_setGammaRamp
|
|||
}
|
||||
jboolean ret;
|
||||
HDC screenDC = GetDC(NULL);
|
||||
try {
|
||||
if (SetDeviceGammaRamp(screenDC, currentGamma) == FALSE) {
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG
|
||||
printf("Failed to set device gamma\n");
|
||||
#endif
|
||||
#endif
|
||||
ret = JNI_FALSE;
|
||||
} else {
|
||||
ret = JNI_TRUE;
|
||||
}
|
||||
} catch (...) {
|
||||
printf("Exception occurred in SetDeviceGammaRamp\n");
|
||||
ret = JNI_FALSE;
|
||||
}
|
||||
ReleaseDC(NULL, screenDC);
|
||||
|
||||
return ret;
|
||||
|
@ -419,10 +436,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_init
|
|||
env->DeleteLocalRef(newMode);
|
||||
|
||||
// Get the default gamma ramp
|
||||
try {
|
||||
if (GetDeviceGammaRamp(screenDC, originalGamma) == FALSE) {
|
||||
#ifdef _DEBUG
|
||||
#ifdef _DEBUG
|
||||
printf("Failed to get initial device gamma\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
} catch (...) {
|
||||
printf("Exception occurred in GetDeviceGammaRamp\n");
|
||||
}
|
||||
ReleaseDC(NULL, screenDC);
|
||||
}
|
||||
|
|
|
@ -141,3 +141,15 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert
|
|||
env->ReleaseStringUTFChars(message, eMessageText);
|
||||
env->ReleaseStringUTFChars(title, cTitleBarText);
|
||||
}
|
||||
|
||||
// Cas: I've left this here as sometimes it's handy to just pop it back in to debug stuff
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getDirectBufferAddress
|
||||
* Signature: (Ljava/nio/Buffer;)I
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_getDirectBufferAddress
|
||||
(JNIEnv * env, jclass clazz, jobject buf)
|
||||
{
|
||||
return (jint) env->GetDirectBufferAddress(buf);
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue