fceux now writes config direcoty as soon as it starts whether a rom is
loaded or not [[Split portion of a mixed commit.]]
This commit is contained in:
parent
ebe632f2c3
commit
a66f6d2ba6
|
@ -39,17 +39,11 @@ class ConfigParser:
|
||||||
if re.search(keyname, line):
|
if re.search(keyname, line):
|
||||||
cursor = self.f.tell()
|
cursor = self.f.tell()
|
||||||
break
|
break
|
||||||
|
|
||||||
self.f.seek(cursor)
|
newline = line.split('=')[0] + '=' + str(value)
|
||||||
while 1:
|
self.f.seek(os.SEEK_CUR, -line.split('=')[0].__len__)
|
||||||
c = self.f.read(1)
|
|
||||||
# self.f.seek(5, 1)
|
|
||||||
print c,
|
|
||||||
|
|
||||||
if c == '=':
|
|
||||||
self.f.seek(1, os.SEEK_CUR)
|
|
||||||
#self.f.write(value)
|
|
||||||
self.f.flush()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
9
gfceux
9
gfceux
|
@ -162,7 +162,6 @@ def set_options():
|
||||||
options.autoscale_check = widgets.get_object("autoscale_check").get_active()
|
options.autoscale_check = widgets.get_object("autoscale_check").get_active()
|
||||||
|
|
||||||
options.xscale_spin = widgets.get_object("xscale_spin").get_value()
|
options.xscale_spin = widgets.get_object("xscale_spin").get_value()
|
||||||
print options.xscale_spin
|
|
||||||
options.yscale_spin = widgets.get_object("yscale_spin").get_value()
|
options.yscale_spin = widgets.get_object("yscale_spin").get_value()
|
||||||
|
|
||||||
options.extra_entry = widgets.get_object("extra_entry").get_text()
|
options.extra_entry = widgets.get_object("extra_entry").get_text()
|
||||||
|
@ -256,10 +255,8 @@ class GfceuApp:
|
||||||
def find_fceu(self):
|
def find_fceu(self):
|
||||||
bin = find_binary('fceux')
|
bin = find_binary('fceux')
|
||||||
if bin == None:
|
if bin == None:
|
||||||
gfceu_error('Could not find the fceu binary.\n\
|
gfceu_error('Could not find the fceux binary.\n\
|
||||||
Ensure that FCE Ultra is installed and in the $PATH.\n\
|
Ensure that fceux is installed and in the $PATH.\n', 4, True)
|
||||||
On Debian based systems (like Ubuntu), try the following command:\n\
|
|
||||||
sudo apt-get install fceu', 4, True)
|
|
||||||
else:
|
else:
|
||||||
self.msg('Using: ' + bin)
|
self.msg('Using: ' + bin)
|
||||||
|
|
||||||
|
@ -276,7 +273,7 @@ class GfceuApp:
|
||||||
glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')
|
glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')
|
||||||
else:
|
else:
|
||||||
print 'ERROR.'
|
print 'ERROR.'
|
||||||
print 'Could not find the glade.xml file.'
|
print 'Could not find the ' + glade_file + ' file.'
|
||||||
print 'Try reinstalling the application.'
|
print 'Try reinstalling the application.'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# displays mockup of gamepad config
|
# displays mockup of gamepad config
|
||||||
import gtk, gtk.glade
|
import gtk
|
||||||
|
|
||||||
class WidgetsWrapper:
|
glade_file = 'gfceux.xml'
|
||||||
def __init__(self):
|
print "Using: " + glade_file
|
||||||
self.widgets = gtk.glade.XML ('gfceu.glade', "gamepad_config_window")
|
widgets = gtk.Builder()
|
||||||
self.widgets.signal_autoconnect(GladeHandlers.__dict__)
|
widgets.add_from_file(glade_file)
|
||||||
# Gives us the ability to do: widgets['widget_name'].action()
|
|
||||||
def __getitem__(self, key):
|
|
||||||
return self.widgets.get_widget(key)
|
|
||||||
|
|
||||||
widgets = WidgetsWrapper()
|
widgets.get_object('gamepad_config_window').show_all()
|
||||||
|
|
||||||
widgets['gamepad_config_window'].show_all()
|
|
||||||
gtk.main ()
|
gtk.main ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue