This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit abd29c48156e66bf1234f5ea5214ee1765ab7da9
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Sat Mar 15 23:41:04 2014 +0000

    All: Add fallback to default if setting SDL_GL_ACCELERATED_VISUAL fails
---
 MP/code/sdl/sdl_glimp.c | 6 ++++++
 SP/code/sdl/sdl_glimp.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/MP/code/sdl/sdl_glimp.c b/MP/code/sdl/sdl_glimp.c
index f1aea87..4ce07b9 100644
--- a/MP/code/sdl/sdl_glimp.c
+++ b/MP/code/sdl/sdl_glimp.c
@@ -418,8 +418,14 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, 
qboolean noborder)
 
                // If not allowing software GL, demand accelerated
                if( !r_allowSoftwareGL->integer )
+               {
                        SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
 
+                       //Fall back to allow either if setting attribute failed
+                       if( SDL_GL_GetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 ) 
<  0)
+                               SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 
-1 );
+               }
+
                if( r_centerWindow->integer && !fullscreen )
                {
                        if( ( SDL_window = SDL_CreateWindow( 
CLIENT_WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
diff --git a/SP/code/sdl/sdl_glimp.c b/SP/code/sdl/sdl_glimp.c
index f1aea87..4ce07b9 100644
--- a/SP/code/sdl/sdl_glimp.c
+++ b/SP/code/sdl/sdl_glimp.c
@@ -418,8 +418,14 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, 
qboolean noborder)
 
                // If not allowing software GL, demand accelerated
                if( !r_allowSoftwareGL->integer )
+               {
                        SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
 
+                       //Fall back to allow either if setting attribute failed
+                       if( SDL_GL_GetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 ) 
<  0)
+                               SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 
-1 );
+               }
+
                if( r_centerWindow->integer && !fullscreen )
                {
                        if( ( SDL_window = SDL_CreateWindow( 
CLIENT_WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to