diff options
| author | Steven Fuller <relnev@icculus.org> | 2007-01-12 08:19:57 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | 0e484b73da4e8b577a0c7e368c52cfee281c1ef7 (patch) | |
| tree | af4ceb5c908ddc2567469a06876ea2d17c94af09 /src/main.c | |
| parent | 785c016a2867676a041e27ce25e33c67f026fa4e (diff) | |
disabled some more assembly.
trying out passing NULL to SDL_GL_LoadLibrary by default.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -73,7 +73,7 @@ static int WantCDRom = 1; static int WantJoystick = 1; /* originally was "/usr/lib/libGL.so.1:/usr/lib/tls/libGL.so.1:/usr/X11R6/lib/libGL.so" */ -static const char * opengl_library = "libGL.so.1"; +static const char * opengl_library = NULL; /* ** */ @@ -432,11 +432,16 @@ static void load_opengl_library(const char *lib) size_t len, copylen; if (lib == NULL) { - fprintf(stderr, "ERROR: no opengl libraries given\n"); - exit(EXIT_FAILURE); + if (SDL_GL_LoadLibrary(NULL) == 0) { + /* success */ + return; + } + + fprintf( stderr, "ERROR: no opengl libraries given\n" ); + exit( EXIT_FAILURE ); } - while (*lib) { + while (lib != NULL && *lib) { len = strcspn(lib, ":"); copylen = min(len, PATH_MAX-1); @@ -448,7 +453,7 @@ static void load_opengl_library(const char *lib) /* success */ return; } - + lib += len; lib += strspn(lib, ":"); } |
