patch-src_gui_sdlmain_cpp 1.2 KB

1234567891011121314151617181920212223242526272829
  1. $OpenBSD: patch-src_gui_sdlmain_cpp,v 1.1 2017/05/04 19:53:43 espie Exp $
  2. Index: src/gui/sdlmain.cpp
  3. --- src/gui/sdlmain.cpp.orig
  4. +++ src/gui/sdlmain.cpp
  5. @@ -1134,10 +1134,10 @@ static void GUI_StartUp(Section * sec) {
  6. #endif
  7. const char * gl_ext = (const char *)glGetString (GL_EXTENSIONS);
  8. if(gl_ext && *gl_ext){
  9. - sdl.opengl.packed_pixel=(strstr(gl_ext,"EXT_packed_pixels") > 0);
  10. - sdl.opengl.paletted_texture=(strstr(gl_ext,"EXT_paletted_texture") > 0);
  11. + sdl.opengl.packed_pixel=(strstr(gl_ext,"EXT_packed_pixels")!=0);
  12. + sdl.opengl.paletted_texture=(strstr(gl_ext,"EXT_paletted_texture")!=0);
  13. #if defined(NVIDIA_PixelDataRange)
  14. - sdl.opengl.pixel_data_range=(strstr(gl_ext,"GL_NV_pixel_data_range") >0 ) &&
  15. + sdl.opengl.pixel_data_range=(strstr(gl_ext,"GL_NV_pixel_data_range")!=0 ) &&
  16. glPixelDataRangeNV && db_glAllocateMemoryNV && db_glFreeMemoryNV;
  17. sdl.opengl.pixel_data_range = 0;
  18. #endif
  19. @@ -1529,7 +1529,7 @@ static void show_warning(char const * const message) {
  20. if ( !sdl.inited && SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 ) textonly = true;
  21. sdl.inited = true;
  22. #endif
  23. - printf(message);
  24. + printf("%s", message);
  25. if(textonly) return;
  26. if(!sdl.surface) sdl.surface = SDL_SetVideoMode(640,400,0,0);
  27. if(!sdl.surface) return;