[iortcw] 378/497: All: Merge a couple more SDL PR's from Pan7
Simon McVittie
smcv at debian.org
Wed Sep 21 19:49:15 UTC 2016
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 9946dd8148dec1e87c4cbace064bd41a27dde1ba
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Sun Jul 26 14:58:12 2015 -0400
All: Merge a couple more SDL PR's from Pan7
---
MP/code/sdl/sdl_glimp.c | 13 +++++++++++--
SP/code/sdl/sdl_glimp.c | 13 +++++++++++--
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/MP/code/sdl/sdl_glimp.c b/MP/code/sdl/sdl_glimp.c
index 67184ff..879f720 100644
--- a/MP/code/sdl/sdl_glimp.c
+++ b/MP/code/sdl/sdl_glimp.c
@@ -277,9 +277,15 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
// If a window exists, note its display index
if( SDL_window != NULL )
+ {
display = SDL_GetWindowDisplayIndex( SDL_window );
+ if( display < 0 )
+ {
+ ri.Printf( PRINT_DEVELOPER, "SDL_GetWindowDisplayIndex() failed: %s\n", SDL_GetError() );
+ }
+ }
- if( SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
+ if( display >= 0 && SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
{
displayAspect = (float)desktopMode.w / (float)desktopMode.h;
@@ -539,7 +545,10 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
qglClear( GL_COLOR_BUFFER_BIT );
SDL_GL_SwapWindow( SDL_window );
- SDL_GL_SetSwapInterval( r_swapInterval->integer );
+ if( SDL_GL_SetSwapInterval( r_swapInterval->integer ) == -1 )
+ {
+ ri.Printf( PRINT_DEVELOPER, "SDL_GL_SetSwapInterval failed: %s\n", SDL_GetError( ) );
+ }
glConfig.colorBits = testColorBits;
glConfig.depthBits = testDepthBits;
diff --git a/SP/code/sdl/sdl_glimp.c b/SP/code/sdl/sdl_glimp.c
index 67184ff..879f720 100644
--- a/SP/code/sdl/sdl_glimp.c
+++ b/SP/code/sdl/sdl_glimp.c
@@ -277,9 +277,15 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
// If a window exists, note its display index
if( SDL_window != NULL )
+ {
display = SDL_GetWindowDisplayIndex( SDL_window );
+ if( display < 0 )
+ {
+ ri.Printf( PRINT_DEVELOPER, "SDL_GetWindowDisplayIndex() failed: %s\n", SDL_GetError() );
+ }
+ }
- if( SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
+ if( display >= 0 && SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
{
displayAspect = (float)desktopMode.w / (float)desktopMode.h;
@@ -539,7 +545,10 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
qglClear( GL_COLOR_BUFFER_BIT );
SDL_GL_SwapWindow( SDL_window );
- SDL_GL_SetSwapInterval( r_swapInterval->integer );
+ if( SDL_GL_SetSwapInterval( r_swapInterval->integer ) == -1 )
+ {
+ ri.Printf( PRINT_DEVELOPER, "SDL_GL_SetSwapInterval failed: %s\n", SDL_GetError( ) );
+ }
glConfig.colorBits = testColorBits;
glConfig.depthBits = testDepthBits;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list