diff scripts/pytouhou @ 547:e35bef07290d

Always import runners from pytouhou.vm, to allow their replacement.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 08 Nov 2013 18:47:00 +0100
parents 94dd9862c470
children 1e9ea6519f3c
line wrap: on
line diff
--- a/scripts/pytouhou
+++ b/scripts/pytouhou
@@ -65,16 +65,10 @@ args = parser.parse_args()
 import sys
 import logging
 
-if args.backend == 'opengl':
-    try:
-        from pytouhou.ui.opengl.gamerenderer import GameRenderer
-        opengl = True
-    except ImportError:
-        args.backend = 'sdl'
 
-if args.backend == 'sdl':
-    from pytouhou.ui.sdl.gamerenderer import GameRenderer
-    opengl = False
+if args.game == 'EoSD':
+    from pytouhou.games.eosd import EoSDCommon as Common, EoSDGame as Game
+
 
 from pytouhou.lib.sdl import SDL, show_simple_message_box
 from pytouhou.ui.window import Window
@@ -88,8 +82,16 @@ from pytouhou.formats.hint import Hint
 from pytouhou.network import Network
 
 
-if args.game == 'EoSD':
-    from pytouhou.games.eosd import EoSDCommon as Common, EoSDGame as Game
+if args.backend == 'opengl':
+    try:
+        from pytouhou.ui.opengl.gamerenderer import GameRenderer
+        opengl = True
+    except ImportError:
+        args.backend = 'sdl'
+
+if args.backend == 'sdl':
+    from pytouhou.ui.sdl.gamerenderer import GameRenderer
+    opengl = False
 
 
 class GameBossRush(Game):