changeset 3395:45f140dd4b08

Options --double --triple have been added to test double and triple buffering.
author Mike Gorchak <lestat@i.com.ua>
date Tue, 13 Oct 2009 11:24:36 +0000
parents 2b0a3b2f2fc6
children d6b79fc83362
files test/common.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/common.c	Tue Oct 13 07:02:19 2009 +0000
+++ b/test/common.c	Tue Oct 13 11:24:36 2009 +0000
@@ -6,7 +6,7 @@
 #include "common.h"
 
 #define VIDEO_USAGE \
-"[--video driver] [--renderer driver] [--info all|video|modes|render|event] [--display %d] [--fullscreen | --windows N] [--title title] [--center | --position X,Y] [--geometry WxH] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]"
+"[--video driver] [--renderer driver] [--info all|video|modes|render|event] [--display %d] [--fullscreen | --windows N] [--title title] [--center | --position X,Y] [--geometry WxH] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab] [--double] [--triple]"
 
 #define AUDIO_USAGE \
 "[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]"
@@ -233,6 +233,14 @@
         state->render_flags |= SDL_RENDERER_PRESENTVSYNC;
         return 1;
     }
+    if (SDL_strcasecmp(argv[index], "--double") == 0) {
+        state->render_flags |= SDL_RENDERER_PRESENTFLIP2;
+        return 1;
+    }
+    if (SDL_strcasecmp(argv[index], "--triple") == 0) {
+        state->render_flags |= SDL_RENDERER_PRESENTFLIP3;
+        return 1;
+    }
     if (SDL_strcasecmp(argv[index], "--noframe") == 0) {
         state->window_flags |= SDL_WINDOW_BORDERLESS;
         return 1;