autogen a config file and directory if one doesn't exist

This commit is contained in:
punkrockguy318 2008-12-05 07:09:20 +00:00
parent a006cb249a
commit 5eda05d2b4
1 changed files with 6 additions and 0 deletions

6
gfceux
View File

@ -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):
"""