Revision: 2915
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2915&view=rev
Author: elias_naur
Date: 2007-10-30 11:34:38 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Linux: use throwFormattedException in extgl_Open instead of custom message formatting
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/extgl_glx.c
Modified: trunk/LWJGL/src/native/linux/extgl_glx.c
===================================================================
--- trunk/LWJGL/src/native/linux/extgl_glx.c 2007-10-28 21:52:35 UTC (rev 2914)
+++ trunk/LWJGL/src/native/linux/extgl_glx.c 2007-10-30 18:34:38 UTC (rev 2915)
@@ -151,8 +151,6 @@
}
bool extgl_Open(JNIEnv *env) {
-#define BUFFER_SIZE 2000
- char buffer[BUFFER_SIZE];
if (lib_gl_handle != NULL)
return true;
/*
@@ -166,9 +164,7 @@
*/
lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
if (lib_gl_handle == NULL) {
- snprintf(buffer, BUFFER_SIZE, "Error loading libGL.so.1: %s", dlerror());
- buffer[BUFFER_SIZE - 1] = '\0';
- throwException(env, buffer);
+ throwFormattedException(env, "Error loading libGL.so.1: %s", dlerror());
return false;
}
lwjgl_glXGetProcAddressARB = (glXGetProcAddressARBPROC)dlsym(lib_gl_handle, "glXGetProcAddressARB");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|