JS patch to (really) activate Vsync
authorkoda
Fri, 13 Nov 2009 23:04:23 +0000
changeset 2618 23ee71bd049b
parent 2617 ef0d93cd61b2
child 2619 bc2786a00fb8
JS patch to (really) activate Vsync
hedgewars/CCHandlers.inc
hedgewars/SDLh.pas
--- a/hedgewars/CCHandlers.inc	Fri Nov 13 20:33:31 2009 +0000
+++ b/hedgewars/CCHandlers.inc	Fri Nov 13 23:04:23 2009 +0000
@@ -599,13 +599,16 @@
 AddFileLog('Prepare to change video parameters...');
 {$ENDIF}
 
+{$IFNDEF IPHONEOS}
 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
-{$IFDEF IPHONEOS}
+{$ELSE}
 // remove these if they cause incompatibility
 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0);
 SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 1);
 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
-{$ELSE}
+{$ENDIF}
+
+{$IFNDEF SDL13}
 // this attribute is default in 1.3
 SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
 {$ENDIF}
--- a/hedgewars/SDLh.pas	Fri Nov 13 20:33:31 2009 +0000
+++ b/hedgewars/SDLh.pas	Fri Nov 13 23:04:23 2009 +0000
@@ -474,14 +474,13 @@
 		SDL_GL_STEREO,
 		SDL_GL_MULTISAMPLEBUFFERS,
 		SDL_GL_MULTISAMPLESAMPLES,
+		SDL_GL_ACCELERATED_VISUAL,
 {$IFDEF SDL13}
-		SDL_GL_ACCELERATED_VISUAL,
 		SDL_GL_RETAINED_BACKING,
 		SDL_GL_CONTEXT_MAJOR_VERSION,
 		SDL_GL_CONTEXT_MINOR_VERSION
 {$ELSE}
-		SDL_GL_SWAP_CONTROL,
-		SDL_GL_ACCELERATED_VISUAL
+		SDL_GL_SWAP_CONTROL
 {$ENDIF}
 );