# HG changeset patch # User koda # Date 1258144411 0 # Node ID ef0d93cd61b2320d51b49b25224ab55e9f2c5821 # Parent 6e2b341dc4081f58e29e1f371e43ed3971d20a28 add option for vsync -- good results on mac and linux, should be harmless on others (please test) diff -r 6e2b341dc408 -r ef0d93cd61b2 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Wed Nov 11 21:54:28 2009 +0000 +++ b/hedgewars/CCHandlers.inc Fri Nov 13 20:33:31 2009 +0000 @@ -601,10 +601,13 @@ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); {$IFDEF IPHONEOS} -//remove these if they cause incompatibility +// 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} +// this attribute is default in 1.3 +SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); {$ENDIF} flags:= SDL_OPENGL;// or SDL_RESIZABLE; diff -r 6e2b341dc408 -r ef0d93cd61b2 hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Wed Nov 11 21:54:28 2009 +0000 +++ b/hedgewars/SDLh.pas Fri Nov 13 20:33:31 2009 +0000 @@ -474,11 +474,16 @@ SDL_GL_STEREO, SDL_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLESAMPLES, +{$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 +{$ENDIF} +); {$IFDEF SDL13} TSDL_ArrayByteOrder = ( // array component order, low byte -> high byte