autogen a config file and directory if one doesn't exist
This commit is contained in:
parent
a006cb249a
commit
5eda05d2b4
6
gfceux
6
gfceux
|
@ -220,6 +220,7 @@ class GfceuxApp:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fceux_binary = self.find_fceux()
|
self.fceux_binary = self.find_fceux()
|
||||||
self.load_ui()
|
self.load_ui()
|
||||||
|
self.create_config()
|
||||||
|
|
||||||
options = GameOptions()
|
options = GameOptions()
|
||||||
load_options()
|
load_options()
|
||||||
|
@ -229,6 +230,11 @@ class GfceuxApp:
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
sys.exit(0)
|
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):
|
def msg(self, text, use_gtk=False):
|
||||||
"""
|
"""
|
||||||
GfceuApp.msg()
|
GfceuApp.msg()
|
||||||
|
|
Loading…
Reference in New Issue