diff scripts/pytouhou @ 589:0768122da817

Add a frameskip option, and use swap interval to implement it.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 10 Oct 2014 15:59:11 +0200
parents e35a083d4208
children e15672733c93
line wrap: on
line diff
--- a/scripts/pytouhou
+++ b/scripts/pytouhou
@@ -31,7 +31,8 @@ defaults = {'data': default_data,
             'gl-flavor': 'compatibility',
             'gl-version': 2.1,
             'double-buffer': None,
-            'fps-limit': -1}
+            'fps-limit': -1,
+            'frameskip': 1}
 
 from pytouhou.options import parse_config, parse_arguments
 options = parse_config('pytouhou', defaults)
@@ -279,7 +280,8 @@ def main(window, path, data, stage_num, 
 
 
 with SDL(sound=args.no_sound):
-    window = Window(backend, fps_limit=args.fps_limit)
+    window = Window(backend, fps_limit=args.fps_limit,
+                    frameskip=args.frameskip)
 
     main(window, args.path, tuple(args.data), args.stage, args.rank,
          args.character, args.replay, args.save_replay, args.skip_replay,