You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(1) |
|
2
(6) |
3
(8) |
4
(1) |
5
|
6
(6) |
7
(3) |
8
(2) |
|
9
|
10
|
11
|
12
|
13
(4) |
14
|
15
|
|
16
(12) |
17
(4) |
18
(1) |
19
(8) |
20
|
21
(12) |
22
(4) |
|
23
(4) |
24
(14) |
25
|
26
|
27
(20) |
28
(31) |
29
(3) |
|
30
(13) |
31
(1) |
|
|
|
|
|
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-29 21:52:27
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv10824/src/native/win32 Modified Files: org_lwjgl_Display.cpp Window.h org_lwjgl_Window.cpp Log Message: Stuff for 0.6 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.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- org_lwjgl_Display.cpp 28 Mar 2003 23:16:14 -0000 1.36 +++ org_lwjgl_Display.cpp 29 Mar 2003 21:52:13 -0000 1.37 @@ -47,6 +47,7 @@ jobjectArray GetAvailableDisplayModesNT(JNIEnv * env); jobjectArray GetAvailableDisplayModes9x(JNIEnv * env); bool modeSet = false; // Whether we've done a display mode change +WORD* originalGamma = new WORD[256 * 3]; // Original gamma settings /* @@ -238,7 +239,7 @@ // class's mode instance variable. // Get the screen - HDC screenDC = CreateCompatibleDC(NULL); + HDC screenDC = GetDC(NULL); // Get the device caps width = GetDeviceCaps(screenDC, HORZRES); height = GetDeviceCaps(screenDC, VERTRES); @@ -246,7 +247,7 @@ freq = GetDeviceCaps(screenDC, VREFRESH); if (freq <= 1) freq = 0; // Unknown - DeleteDC(screenDC); + ReleaseDC(NULL, screenDC); jmethodID ctor = env->GetMethodID(cls_displayMode, "<init>", "(IIII)V"); jobject newMode = env->NewObject(cls_displayMode, ctor, width, height, bpp, freq); @@ -265,6 +266,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Display_resetDisplayMode (JNIEnv * env, jclass clazz) { + + // Return device gamma to normal + HDC screenDC = GetDC(NULL); + SetDeviceGammaRamp(screenDC, originalGamma); + ReleaseDC(NULL, screenDC); + if (modeSet) { modeSet = false; // Under Win32, all we have to do is: @@ -280,20 +287,127 @@ * Method: getGammaRamp * Signature: ()[I */ -JNIEXPORT jintArray JNICALL Java_org_lwjgl_Display_getGammaRamp - (JNIEnv * env, jclass clazz) +JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_getGammaRamp + (JNIEnv * env, jclass clazz, jintArray red, jintArray green, jintArray blue) { - return NULL; +#ifdef _DEBUG + if (red == NULL) { + throwRuntimeException(env, "Null red array."); + return JNI_FALSE; + } + if (green == NULL) { + throwRuntimeException(env, "Null green array."); + return JNI_FALSE; + } + if (blue == NULL) { + throwRuntimeException(env, "Null blue array."); + return JNI_FALSE; + } + if (env->GetArrayLength(red) != 256) { + throwRuntimeException(env, "Red array is not 256 long."); + return JNI_FALSE; + } + if (env->GetArrayLength(green) != 256) { + throwRuntimeException(env, "Green array is not 256 long."); + return JNI_FALSE; + } + if (env->GetArrayLength(blue) != 256) { + throwRuntimeException(env, "Blue array is not 256 long."); + return JNI_FALSE; + } +#endif + + jint * redPtr = env->GetIntArrayElements(red, NULL); + jint * greenPtr = env->GetIntArrayElements(green, NULL); + jint * bluePtr = env->GetIntArrayElements(blue, NULL); + + WORD currentGamma[768]; + HDC screenDC = GetDC(NULL); + if (GetDeviceGammaRamp(screenDC, currentGamma) == FALSE) { +#ifdef _DEBUG + printf("Failed to get device gamma\n"); +#endif + env->ReleaseIntArrayElements(red, redPtr, JNI_ABORT); + env->ReleaseIntArrayElements(green, greenPtr, JNI_ABORT); + env->ReleaseIntArrayElements(blue, bluePtr, JNI_ABORT); + ReleaseDC(NULL, screenDC); + return JNI_FALSE; + } + ReleaseDC(NULL, screenDC); + for (int i = 0; i < 256; i ++) { + redPtr[i] = (jint) currentGamma[i]; + greenPtr[i] = (jint) currentGamma[i + 256]; + bluePtr[i] = (jint) currentGamma[i + 512]; + } + env->ReleaseIntArrayElements(red, redPtr, 0); + env->ReleaseIntArrayElements(green, greenPtr, 0); + env->ReleaseIntArrayElements(blue, bluePtr, 0); + return JNI_TRUE; } /* * Class: org_lwjgl_Display * Method: setGammaRamp - * Signature: ([I)V + * Signature: ([I[I[I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_Display_setGammaRamp - (JNIEnv * env, jclass clazz, jintArray gamma) +JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_setGammaRamp + (JNIEnv * env, jclass clazz, jintArray red, jintArray green, jintArray blue) { +#ifdef _DEBUG + if (red == NULL) { + throwRuntimeException(env, "Null red array."); + return JNI_FALSE; + } + if (green == NULL) { + throwRuntimeException(env, "Null green array."); + return JNI_FALSE; + } + if (blue == NULL) { + throwRuntimeException(env, "Null blue array."); + return JNI_FALSE; + } + if (env->GetArrayLength(red) != 256) { + throwRuntimeException(env, "Red array is not 256 long."); + return JNI_FALSE; + } + if (env->GetArrayLength(green) != 256) { + throwRuntimeException(env, "Green array is not 256 long."); + return JNI_FALSE; + } + if (env->GetArrayLength(blue) != 256) { + throwRuntimeException(env, "Blue array is not 256 long."); + return JNI_FALSE; + } +#endif + + jint * redPtr = env->GetIntArrayElements(red, NULL); + jint * greenPtr = env->GetIntArrayElements(green, NULL); + jint * bluePtr = env->GetIntArrayElements(blue, NULL); + + // Turn array of ints into array of RGB WORDs + WORD newGamma[768]; + for (int i = 0; i < 256; i ++) { + newGamma[i] = (WORD)(min(0x00010000, redPtr[i])); + newGamma[i + 256] = (WORD)(min(0x00010000, greenPtr[i])); + newGamma[i + 512] = (WORD)(min(0x00010000, bluePtr[i])); + } + jboolean ret; + HDC screenDC = GetDC(NULL); + if (SetDeviceGammaRamp(screenDC, newGamma) == FALSE) { +#ifdef _DEBUG + printf("Failed to set device gamma\n"); +#endif + ret = JNI_FALSE; + } else { + ret = JNI_TRUE; + } + ReleaseDC(NULL, screenDC); + + env->ReleaseIntArrayElements(red, redPtr, JNI_ABORT); + env->ReleaseIntArrayElements(green, greenPtr, JNI_ABORT); + env->ReleaseIntArrayElements(blue, bluePtr, JNI_ABORT); + + return ret; } @@ -307,7 +421,7 @@ { // Determine the current screen resolution // Get the screen - HDC screenDC = CreateCompatibleDC(NULL); + HDC screenDC = GetDC(NULL); if (!screenDC) { printf("Couldn't get screen DC!\n"); return; @@ -319,7 +433,6 @@ int freq = GetDeviceCaps(screenDC, VREFRESH); if (freq <= 1) freq = 0; // Unknown - DeleteDC(screenDC); jclass jclass_DisplayMode = env->FindClass("org/lwjgl/DisplayMode"); jmethodID ctor = env->GetMethodID(jclass_DisplayMode, "<init>", "(IIII)V"); @@ -327,6 +440,14 @@ jfieldID fid_initialMode = env->GetStaticFieldID(clazz, "mode", "Lorg/lwjgl/DisplayMode;"); env->SetStaticObjectField(clazz, fid_initialMode, newMode); env->DeleteLocalRef(newMode); + + // Get the default gamma ramp + if (GetDeviceGammaRamp(screenDC, originalGamma) == FALSE) { +#ifdef _DEBUG + printf("Failed to get initial device gamma\n"); +#endif + } + ReleaseDC(NULL, screenDC); } Index: Window.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/Window.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Window.h 28 Mar 2003 19:01:55 -0000 1.2 +++ Window.h 29 Mar 2003 21:52:14 -0000 1.3 @@ -88,4 +88,9 @@ */ WINDOW_H_API void throwException(JNIEnv * env, const char * err); + /* + * Utility function to throw a RuntimeException + */ + WINDOW_H_API void throwRuntimeException(JNIEnv * env, const char * err); + #endif /* _LWJGL_WINDOW_H_INCLUDED_ */ Index: org_lwjgl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Window.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_Window.cpp 28 Mar 2003 23:16:15 -0000 1.4 +++ org_lwjgl_Window.cpp 29 Mar 2003 21:52:14 -0000 1.5 @@ -66,6 +66,16 @@ } /* + * Utility function to throw a RuntimeException + */ +void throwRuntimeException(JNIEnv * env, const char * err) +{ + jclass cls = env->FindClass("java/lang/RuntimeException"); + env->ThrowNew(cls, err); + env->DeleteLocalRef(cls); +} + +/* * Create DirectInput. * Returns true for success, or false for failure */ |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-29 21:52:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv10714/src/native/common Modified Files: org_lwjgl_Display.h Log Message: Stuff for 0.6 Index: org_lwjgl_Display.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- org_lwjgl_Display.h 28 Mar 2003 01:28:04 -0000 1.10 +++ org_lwjgl_Display.h 29 Mar 2003 21:52:00 -0000 1.11 @@ -62,18 +62,18 @@ /* * Class: org_lwjgl_Display * Method: getGammaRamp - * Signature: ()[I + * Signature: ([I[I[I)Z */ -JNIEXPORT jintArray JNICALL Java_org_lwjgl_Display_getGammaRamp - (JNIEnv *, jclass); +JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_getGammaRamp + (JNIEnv *, jclass, jintArray, jintArray, jintArray); /* * Class: org_lwjgl_Display * Method: setGammaRamp - * Signature: ([I)V + * Signature: ([I[I[I)Z */ -JNIEXPORT void JNICALL Java_org_lwjgl_Display_setGammaRamp - (JNIEnv *, jclass, jintArray); +JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_setGammaRamp + (JNIEnv *, jclass, jintArray, jintArray, jintArray); #ifdef __cplusplus } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-29 21:51:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv10572/src/java/org/lwjgl Modified Files: Display.java Log Message: Stuff for 0.6 Index: Display.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Display.java 28 Mar 2003 23:15:51 -0000 1.23 +++ Display.java 29 Mar 2003 21:51:43 -0000 1.24 @@ -201,19 +201,34 @@ /** * Obtains the display's gamma ramp. The gamma ramp returned is an array of - * integers in the range 0..255. If gamma is not supported by the underlying - * hardware then null is returned. - * @return an array of ints, or null + * 16:16 fixed point values representing 0.0...1.0. The gamma ramp consists of three consecutive + * arrays, one for red, one for green, and one for blue. The length of the + * array is 768 values (so red will be 0..255, green 256...511, and blue 512..767) + * + * If gamma is not supported by the underlying hardware then false is returned. + * + * @param red[] An array of ints to store red gamma in. Must be 256 in length. + * @param green[] An array of ints to store green gamma in. Must be 256 in length. + * @param blue[] An array of ints to store blue gamma in. Must be 256 in length. + * @return true if it succeeds, false if it fails */ - public static native int[] getGammaRamp(); + public static native boolean getGammaRamp(int[] red, int[] green, int[] blue); /** * Sets the display's gamma ramp. The gamma ramp should be an array of ints - * in the range 0...255. The length of the array should match the length of the - * array returned by getGammaRamp(). + * in 16:16 fixed point format, arranged as for getGammaRamp(). + * The length of the array must be 768. * * If the underlying hardware does not support gamma then this command is a no-op. + * + * When LWJGL exits, any gamma changes are automatically undone. + * + * @param red[] An array of ints to store red gamma in. Must be 256 in length. + * @param green[] An array of ints to store green gamma in. Must be 256 in length. + * @param blue[] An array of ints to store blue gamma in. Must be 256 in length. + * + * @return true if it succeeds, false if it fails */ - public static native void setGammaRamp(int[] gamma); + public static native boolean setGammaRamp(int[] red, int[] green, int[] blue); } |