comparison scripts/pytouhou @ 754:a6875f90c141

Python: Only init SDL2 video if using SDL2 frontend.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 04 Jan 2021 20:39:30 +0100
parents 4fa0a8e7d941
children
comparison
equal deleted inserted replaced
753:a662dddd4a2b 754:a6875f90c141
284 if save_filename: 284 if save_filename:
285 with open(save_filename, 'wb+') as file: 285 with open(save_filename, 'wb+') as file:
286 save_replay.write(file) 286 save_replay.write(file)
287 287
288 288
289 with SDL(sound=args.no_sound): 289 is_sdl = (args.frontend == 'sdl')
290 with SDL(video=is_sdl, sound=args.no_sound):
290 window = Window(backend, Interface.width, Interface.height, 291 window = Window(backend, Interface.width, Interface.height,
291 fps_limit=args.fps_limit, frameskip=args.frameskip) 292 fps_limit=args.fps_limit, frameskip=args.frameskip)
292 293
293 main(window, args.path, tuple(args.data), args.stage, args.rank, 294 main(window, args.path, tuple(args.data), args.stage, args.rank,
294 args.character, args.replay, args.save_replay, args.skip_replay, 295 args.character, args.replay, args.save_replay, args.skip_replay,