add option for vsync -- good results on mac and linux, should be harmless on others (please test)
--- 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;
--- 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