29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
$OpenBSD: patch-src_gui_sdlmain_cpp,v 1.1 2017/05/04 19:53:43 espie Exp $
|
|
|
|
Index: src/gui/sdlmain.cpp
|
|
--- src/gui/sdlmain.cpp.orig
|
|
+++ src/gui/sdlmain.cpp
|
|
@@ -1134,10 +1134,10 @@ static void GUI_StartUp(Section * sec) {
|
|
#endif
|
|
const char * gl_ext = (const char *)glGetString (GL_EXTENSIONS);
|
|
if(gl_ext && *gl_ext){
|
|
- sdl.opengl.packed_pixel=(strstr(gl_ext,"EXT_packed_pixels") > 0);
|
|
- sdl.opengl.paletted_texture=(strstr(gl_ext,"EXT_paletted_texture") > 0);
|
|
+ sdl.opengl.packed_pixel=(strstr(gl_ext,"EXT_packed_pixels")!=0);
|
|
+ sdl.opengl.paletted_texture=(strstr(gl_ext,"EXT_paletted_texture")!=0);
|
|
#if defined(NVIDIA_PixelDataRange)
|
|
- sdl.opengl.pixel_data_range=(strstr(gl_ext,"GL_NV_pixel_data_range") >0 ) &&
|
|
+ sdl.opengl.pixel_data_range=(strstr(gl_ext,"GL_NV_pixel_data_range")!=0 ) &&
|
|
glPixelDataRangeNV && db_glAllocateMemoryNV && db_glFreeMemoryNV;
|
|
sdl.opengl.pixel_data_range = 0;
|
|
#endif
|
|
@@ -1529,7 +1529,7 @@ static void show_warning(char const * const message) {
|
|
if ( !sdl.inited && SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 ) textonly = true;
|
|
sdl.inited = true;
|
|
#endif
|
|
- printf(message);
|
|
+ printf("%s", message);
|
|
if(textonly) return;
|
|
if(!sdl.surface) sdl.surface = SDL_SetVideoMode(640,400,0,0);
|
|
if(!sdl.surface) return;
|