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
(3) |
2
|
3
(1) |
4
|
|
5
|
6
(5) |
7
(11) |
8
(7) |
9
|
10
(3) |
11
(12) |
|
12
|
13
(2) |
14
(7) |
15
(3) |
16
(3) |
17
|
18
|
|
19
|
20
(11) |
21
(5) |
22
(12) |
23
(10) |
24
(8) |
25
(4) |
|
26
(1) |
27
|
28
(13) |
29
(1) |
30
|
31
|
|
|
From: Elias N. <eli...@us...> - 2003-10-24 15:28:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv16402/common Modified Files: extal.cpp Log Message: Index: extal.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- extal.cpp 22 Oct 2003 10:57:18 -0000 1.11 +++ extal.cpp 23 Oct 2003 18:21:56 -0000 1.12 @@ -196,7 +196,7 @@ jsize pathcount = env->GetArrayLength(oalPaths); #ifdef _DEBUG - printf("Found %d OpenAL paths\n", pathcount); + printf("Found %d OpenAL paths\n", (int)pathcount); #endif for(int i=0;i<pathcount;i++) { jstring path = (jstring) env->GetObjectArrayElement(oalPaths, i); |
|
From: Elias N. <eli...@us...> - 2003-10-24 11:49:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv21637/macosx Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Switched mouse handling to Carbin events Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_input_Mouse.cpp 24 Oct 2003 11:45:55 -0000 1.18 +++ org_lwjgl_input_Mouse.cpp 24 Oct 2003 11:46:31 -0000 1.19 @@ -147,7 +147,6 @@ #endif return; } -printf("wheel delta %d\n", (int)delta); last_dz += (int)delta; } |
|
From: Elias N. <eli...@us...> - 2003-10-24 11:48:27
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv21564/macosx Modified Files: Window.h org_lwjgl_Display.cpp org_lwjgl_input_Mouse.cpp org_lwjgl_opengl_Window.cpp Log Message: Switched mouse handling to Carbin events Index: Window.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Window.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Window.h 24 Oct 2003 05:51:50 -0000 1.9 +++ Window.h 24 Oct 2003 11:45:55 -0000 1.10 @@ -47,5 +47,6 @@ extern void resetMode(JNIEnv *env); extern bool switchMode(JNIEnv *env, long width, long height, long bpp, long freq); extern void handleKeyboardEvent(EventRef event); + extern void handleMouseEvent(EventRef event); #endif /* _LWJGL_WINDOW_H_INCLUDED_ */ Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- org_lwjgl_Display.cpp 24 Oct 2003 05:51:50 -0000 1.24 +++ org_lwjgl_Display.cpp 24 Oct 2003 11:45:55 -0000 1.25 @@ -79,23 +79,12 @@ } } -static void captureDisplay(void) { - if (!display_captured) { - display_captured = true; - CGDisplayCapture(kCGDirectMainDisplay); - } -} - -static void releaseDisplay(void) { - if (display_captured) { - display_captured = false; - CGDisplayRelease(kCGDirectMainDisplay); - } -} - bool switchMode(JNIEnv *env, long width, long height, long bpp, long freq) { init(env); - captureDisplay(); + if (display_captured) + return false; + display_captured = true; + CGDisplayCapture(kCGDirectMainDisplay); CFArrayRef modes = CGDisplayAvailableModes(kCGDirectMainDisplay); int size = CFArrayGetCount(modes); for (int i = 0; i < size; i++) { @@ -121,9 +110,12 @@ void resetMode(JNIEnv *env) { init(env); + if (!display_captured) + return; + display_captured = false; CGDisplayRestoreColorSyncSettings(); CGDisplaySwitchToMode(kCGDirectMainDisplay, original_mode); - releaseDisplay(); + CGDisplayRelease(kCGDirectMainDisplay); saveOriginalMode(env); } Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- org_lwjgl_input_Mouse.cpp 23 Oct 2003 18:21:56 -0000 1.17 +++ org_lwjgl_input_Mouse.cpp 24 Oct 2003 11:45:55 -0000 1.18 @@ -56,12 +56,11 @@ static jfieldID fid_buttons; static unsigned char button_states[NUM_BUTTONS]; -static bool created; static bool buffer_enabled; -static int x_axis_index = NUM_BUTTONS; +/*static int x_axis_index = NUM_BUTTONS; static int y_axis_index = NUM_BUTTONS + 1; static int z_axis_index = NUM_BUTTONS + 2; -static hid_device_t hid_dev; +static hid_device_t hid_dev;*/ static event_queue_t event_queue; static int last_dx; @@ -76,7 +75,7 @@ } } -static void pollMouseDevice() { +/*static void pollMouseDevice() { hid_event_t event; cont: while (nextDeviceEvent(&hid_dev, &event)) { @@ -107,13 +106,71 @@ #endif } } - +*/ static void resetDeltas(void) { last_dx = 0; last_dy = 0; last_dz = 0; } +static void handleButtonEvent(EventRef event, unsigned char state) { + EventMouseButton button; + OSStatus err = GetEventParameter(event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(button), NULL, &button); + if (err != noErr) { +#ifdef _DEBUG + printf("Could not get button parameter from event\n"); +#endif + return; + } + handleButton(button, state); +} + +static void handleMovedEvent(EventRef event) { + HIPoint delta; + OSStatus err = GetEventParameter(event, kEventParamMouseDelta, typeHIPoint, NULL, sizeof(delta), NULL, &delta); + if (err != noErr) { +#ifdef _DEBUG + printf("Could not delta parameter from event\n"); +#endif + return; + } + last_dx += (int)delta.x; + last_dy += (int)delta.y; +} + +static void handleWheelEvent(EventRef event) { + long delta; + OSStatus err = GetEventParameter(event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(delta), NULL, &delta); + if (err != noErr) { +#ifdef _DEBUG + printf("Could not delta parameter from event\n"); +#endif + return; + } +printf("wheel delta %d\n", (int)delta); + last_dz += (int)delta; +} + +void handleMouseEvent(EventRef event) { + UInt32 event_kind = GetEventKind(event); + switch (event_kind) { + case kEventMouseDown: + handleButtonEvent(event, 1); + break; + case kEventMouseUp: + handleButtonEvent(event, 0); + break; + case kEventMouseMoved: + handleMovedEvent(event); + break; + case kEventMouseWheelMoved: + handleWheelEvent(event); + break; + default: + break; + } +} + JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Mouse_nHasWheel(JNIEnv *, jclass) { return JNI_TRUE; } @@ -152,7 +209,7 @@ button_states[i] = 0; } initEventQueue(&event_queue); - hid_cookie_t hid_cookies[NUM_COOKIES]; +/* hid_cookie_t hid_cookies[NUM_COOKIES]; for (int i = 0; i < NUM_BUTTONS; i++) { hid_cookies[i].usage_page = kHIDPage_Button; hid_cookies[i].usage = i + 1; @@ -166,24 +223,22 @@ if (!findDevice(&hid_dev, kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, NUM_COOKIES, hid_cookies, EVENT_BUFFER_SIZE)) { throwException(env, "Could not find HID mouse device"); return; - } + }*/ CGAssociateMouseAndMouseCursorPosition(FALSE); CGDisplayHideCursor(CGMainDisplayID()); - created = true; } JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nDestroy(JNIEnv * env, jclass clazz) { - shutdownDevice(&hid_dev); + //shutdownDevice(&hid_dev); // if (!native_cursor) { - CGAssociateMouseAndMouseCursorPosition(TRUE); CGDisplayShowCursor(CGMainDisplayID()); + CGAssociateMouseAndMouseCursorPosition(TRUE); // } - created = false; } JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nPoll(JNIEnv * env, jclass clazz) { int dx, dy, dz; - pollMouseDevice(); + //pollMouseDevice(); dz = last_dz*WHEEL_SCALE; //if (!native_cursor) { dx = last_dx; @@ -211,6 +266,5 @@ } JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nRead(JNIEnv *env, jclass clazz) { - pollMouseDevice(); return copyEvents(&event_queue, 2); } Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_opengl_Window.cpp 24 Oct 2003 05:51:50 -0000 1.26 +++ org_lwjgl_opengl_Window.cpp 24 Oct 2003 11:45:55 -0000 1.27 @@ -94,6 +94,7 @@ } CGLSetFullScreen(context); CGLSetCurrentContext(context); + FlushEventQueue(GetMainEventQueue()); return true; } @@ -140,8 +141,16 @@ OSStatus err = ReceiveNextEvent(0, NULL, 0, true, &event); if (err == noErr) { UInt32 event_class = GetEventClass(event); - if (event_class == kEventClassKeyboard) - handleKeyboardEvent(event); + switch (event_class) { + case kEventClassKeyboard: + handleKeyboardEvent(event); + break; + case kEventClassMouse: + handleMouseEvent(event); + break; + default: + break; + } } } |
|
From: Brian M. <ma...@us...> - 2003-10-24 08:37:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv4144 Modified Files: MouseCreationTest.java Log Message: move mouse in right direction on y axis Index: MouseCreationTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/MouseCreationTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/MouseCreationTest.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- MouseCreationTest.java 17 Aug 2003 18:40:58 -0000 1.19 +++ MouseCreationTest.java 23 Oct 2003 17:17:18 -0000 1.20 @@ -167,7 +167,7 @@ Mouse.poll(); position.x += Mouse.dx; - position.y -= Mouse.dy; + position.y += Mouse.dy; if(position.x<0) { position.x = 0; |
|
From: Elias N. <eli...@us...> - 2003-10-24 06:59:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv16514/src/native Modified Files: configure.in Log Message: Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- configure.in 21 Oct 2003 15:11:58 -0000 1.47 +++ configure.in 22 Oct 2003 10:57:18 -0000 1.48 @@ -30,7 +30,7 @@ case "$host_os" in darwin*) _BUILD_FLAGS="-D_AGL -fpascal-strings" - LDFLAGS="-Xlinker -framework -Xlinker JavaVM -Xlinker -framework -Xlinker ApplicationServices -Xlinker -framework -Xlinker CoreServices" + LDFLAGS="-Xlinker -framework -Xlinker JavaVM -Xlinker -framework -Xlinker ApplicationServices -Xlinker -framework -Xlinker CoreServices -Xlinker -framework -Xlinker Carbon" NATIVE_BUILD_DIR=macosx CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" |
|
From: Elias N. <eli...@us...> - 2003-10-24 05:58:45
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv31990/macosx Modified Files: Window.h org_lwjgl_Display.cpp org_lwjgl_opengl_Window.cpp Log Message: Index: Window.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Window.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Window.h 22 Oct 2003 10:57:18 -0000 1.8 +++ Window.h 24 Oct 2003 05:51:50 -0000 1.9 @@ -44,9 +44,8 @@ #include <jni.h> #include <Carbon/Carbon.h> - extern void setQuitRequested(void); extern void resetMode(JNIEnv *env); - extern void switchMode(JNIEnv *env, long width, long height, long bpp, long freq); + extern bool switchMode(JNIEnv *env, long width, long height, long bpp, long freq); extern void handleKeyboardEvent(EventRef event); #endif /* _LWJGL_WINDOW_H_INCLUDED_ */ Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_Display.cpp 22 Oct 2003 18:34:42 -0000 1.23 +++ org_lwjgl_Display.cpp 24 Oct 2003 05:51:50 -0000 1.24 @@ -93,12 +93,30 @@ } } -void switchMode(JNIEnv *env, long width, long height, long bpp, long freq) { +bool switchMode(JNIEnv *env, long width, long height, long bpp, long freq) { init(env); captureDisplay(); - CFDictionaryRef displayMode = CGDisplayBestModeForParametersAndRefreshRate(kCGDirectMainDisplay, bpp, width, height, freq, NULL); - CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); - saveMode(env, width, height, bpp, freq); + CFArrayRef modes = CGDisplayAvailableModes(kCGDirectMainDisplay); + int size = CFArrayGetCount(modes); + for (int i = 0; i < size; i++) { + CFDictionaryRef mode = (CFDictionaryRef)CFArrayGetValueAtIndex(modes, i); + long mode_width; + long mode_height; + long mode_bpp; + long mode_freq; + getDictLong(mode, kCGDisplayWidth, &mode_width); + getDictLong(mode, kCGDisplayHeight, &mode_height); + getDictLong(mode, kCGDisplayRefreshRate, &mode_freq); + getDictLong(mode, kCGDisplayBitsPerPixel, &mode_bpp); + if (width == mode_width && height == mode_height && bpp == mode_bpp && mode_freq == freq) { + CGDisplayErr err = CGDisplaySwitchToMode(kCGDirectMainDisplay, mode); + if (!err) { + saveMode(env, width, height, bpp, freq); + return true; + } + } + } + return false; } void resetMode(JNIEnv *env) { @@ -123,7 +141,9 @@ int height = env->GetIntField(mode, fid_height); int bpp = env->GetIntField(mode, fid_bpp); int freq = env->GetIntField(mode, fid_freq); - switchMode(env, width, height, bpp, freq); + if (!switchMode(env, width, height, bpp, freq)) { + throwException(env, "Could not switch mode."); + } } JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_nGetAvailableDisplayModes(JNIEnv * env, jclass clazz) { Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- org_lwjgl_opengl_Window.cpp 22 Oct 2003 10:57:19 -0000 1.25 +++ org_lwjgl_opengl_Window.cpp 24 Oct 2003 05:51:50 -0000 1.26 @@ -103,7 +103,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil, jobject ext_set) { vsync_enabled = false; - current_fullscreen = fullscreen == JNI_FALSE; + current_fullscreen = fullscreen == JNI_TRUE; if (!extgl_Open()) { throwException(env, "Could not load gl library"); return; @@ -112,8 +112,14 @@ throwException(env, "Could not load agl symbols"); return; } - if (current_fullscreen) - switchMode(env, width, height, bpp, 60); + if (!current_fullscreen) { + if (!switchMode(env, width, height, bpp, 60)) { + destroyMode(env, clazz); + extgl_Close(); + throwException(env, "Could not switch mode."); + return; + } + } if (!createFullscreenContext(env, bpp, alpha, depth, stencil)) { destroyMode(env, clazz); extgl_Close(); |
|
From: Elias N. <eli...@us...> - 2003-10-24 05:58:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv31990/linux Modified Files: org_lwjgl_Display.cpp Log Message: Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- org_lwjgl_Display.cpp 23 Oct 2003 07:18:07 -0000 1.41 +++ org_lwjgl_Display.cpp 24 Oct 2003 05:51:50 -0000 1.42 @@ -201,16 +201,15 @@ Display *disp = XOpenDisplay(NULL); if (disp == NULL) { -#ifdef _DEBUG - printf("Could not open X connection\n"); -#endif + throwException(env, "Could not open X connection."); return; } screen = DefaultScreen(disp); if (setMode(disp, screen, width, height, true)) { jfieldID fid_initialMode = env->GetStaticFieldID(clazz, "mode", "Lorg/lwjgl/DisplayMode;"); env->SetStaticObjectField(clazz, fid_initialMode, mode); - } + } else + throwException(env, "Could not switch mode."); XCloseDisplay(disp); } |
|
From: Elias N. <eli...@us...> - 2003-10-24 02:21:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv16402/macosx Modified Files: hid.cpp org_lwjgl_input_Mouse.cpp Log Message: Index: hid.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/hid.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/hid.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- hid.cpp 21 Oct 2003 15:11:59 -0000 1.1 +++ hid.cpp 23 Oct 2003 18:21:56 -0000 1.2 @@ -45,7 +45,7 @@ static void searchDictionary(CFDictionaryRef dict, hid_device_t *hid_dev, int num_cookies, hid_cookie_t *hid_cookies); static void searchObject(CFTypeRef object, hid_device_t *hid_dev, int num_cookies, hid_cookie_t *hid_cookies); -/*static void printCFString(CFStringRef str) { +static void printCFString(CFStringRef str) { CFIndex buffer_size = CFStringGetLength(str) + 1; char * buffer = (char *)malloc(buffer_size); if (buffer != NULL) { @@ -61,21 +61,20 @@ if (CFNumberGetValue(num, kCFNumberLongType, &number)) printf("0x%lx (%ld)", number, number); } -*/ -/*static void printProperty(CFDictionaryRef dict, CFStringRef key) { + +static void printProperty(CFDictionaryRef dict, CFStringRef key) { CFTypeRef val = CFDictionaryGetValue(dict, key); if (val != NULL) { CFTypeID type = CFGetTypeID(val); - if (type == CFArrayGetTypeID()) printf("array\n"); +/* if (type == CFArrayGetTypeID()) printf("array\n"); else if (type == CFBooleanGetTypeID()) printf("boolean\n"); else if (type == CFDictionaryGetTypeID()) printf("dictionary\n"); - else if (type == CFNumberGetTypeID()) printCFNumber((CFNumberRef)val); + else*/ if (type == CFNumberGetTypeID()) printCFNumber((CFNumberRef)val); else if (type == CFStringGetTypeID()) printCFString((CFStringRef)val); else printf("<unknown object type>\n"); } } -*/ static void closeDeviceAndQueue(hid_device_t *hid_dev) { (*hid_dev->device_queue)->dispose(hid_dev->device_queue); @@ -205,9 +204,15 @@ long usage; long usage_page; if (getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsageKey), &usage) && - getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsagePageKey), &usage_page) && - usage_page == device_usage_page && usage == device_usage) { - success = initDevice(hid_dev, hid_device, dev_props, num_cookies, hid_cookies, buffer_size); + getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsagePageKey), &usage_page)) { +#ifdef _DEBUG + printf("Considering device '"); + printProperty(dev_props, CFSTR(kIOHIDProductKey)); + printf("', usage page %ld usage %ld\n", usage_page, usage); +#endif + if (usage_page == device_usage_page && usage == device_usage) { + success = initDevice(hid_dev, hid_device, dev_props, num_cookies, hid_cookies, buffer_size); + } } CFRelease(dev_props); } Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- org_lwjgl_input_Mouse.cpp 22 Oct 2003 20:13:40 -0000 1.16 +++ org_lwjgl_input_Mouse.cpp 23 Oct 2003 18:21:56 -0000 1.17 @@ -164,7 +164,7 @@ hid_cookies[z_axis_index].usage_page = kHIDPage_GenericDesktop; hid_cookies[z_axis_index].usage = kHIDUsage_GD_Wheel; if (!findDevice(&hid_dev, kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, NUM_COOKIES, hid_cookies, EVENT_BUFFER_SIZE)) { - throwException(env, "Could not find HID muse device"); + throwException(env, "Could not find HID mouse device"); return; } CGAssociateMouseAndMouseCursorPosition(FALSE); |