From 5eda05d2b41340cb85942f554e548ea4457962db Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Fri, 5 Dec 2008 07:09:20 +0000 Subject: [PATCH] autogen a config file and directory if one doesn't exist --- gfceux | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfceux b/gfceux index 9a5a946e..93302b56 100755 --- a/gfceux +++ b/gfceux @@ -220,6 +220,7 @@ class GfceuxApp: def __init__(self): self.fceux_binary = self.find_fceux() self.load_ui() + self.create_config() options = GameOptions() load_options() @@ -228,6 +229,11 @@ class GfceuxApp: gtk.main() except KeyboardInterrupt: sys.exit(0) + + def create_config(self): + if os.path.exists(configfile) == False: + # auto generate a default config by running fceux with no options + os.system(find_binary("fceux")) def msg(self, text, use_gtk=False): """