Package: adanaxisgpl / 1.2.5.dfsg.1-6

30_dont_crash_at_16bpp.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Evgeni Golov <sargentd@die-welt.net>
Subject: Bug#463674: Allow adanaxisgpl to start with 16bit colors
Date: Sat, 12 Apr 2008 00:19:23 +0200
License: 3-BSD

Index: adanaxisgpl-1.2.5.dfsg.1/src/GL/SDLAppHandler.cpp
===================================================================
--- adanaxisgpl-1.2.5.dfsg.1.orig/src/GL/SDLAppHandler.cpp	2008-12-29 09:46:35.000000000 +0100
+++ adanaxisgpl-1.2.5.dfsg.1/src/GL/SDLAppHandler.cpp	2008-12-29 09:47:25.000000000 +0100
@@ -383,7 +383,7 @@
 
     m_width=inDef.Width();
     m_height=inDef.Height();
-    m_bpp=32;
+    m_bpp=0;
     m_showCursor=!inDef.FullScreen();
     U32 sdlFlags=0;
     if (inDef.FullScreen())
@@ -407,9 +407,9 @@
     
         MediaSDL::Sgl().InitVideoIfRequired();
     
-        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
-        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
-        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
+        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
+        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
+        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
         SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0);
     
         SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);