Mercurial > touhou
diff eosd @ 543:fb837b32c3dd
Automatically fallback on the SDL renderer if the OpenGL one can’t be imported.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 10 May 2014 23:40:13 +0200 |
parents | 346cbf266856 |
children |
line wrap: on
line diff
--- a/eosd +++ b/eosd @@ -66,9 +66,13 @@ import sys import logging if args.backend == 'opengl': - from pytouhou.ui.opengl.gamerenderer import GameRenderer - opengl = True -elif args.backend == 'sdl': + 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