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:
punkrockguy318 2008-08-11 04:26:37 +00:00
parent ebe632f2c3
commit a66f6d2ba6
3 changed files with 14 additions and 28 deletions

View File

@ -39,17 +39,11 @@ class ConfigParser:
if re.search(keyname, line):
cursor = self.f.tell()
break
self.f.seek(cursor)
while 1:
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()
newline = line.split('=')[0] + '=' + str(value)
self.f.seek(os.SEEK_CUR, -line.split('=')[0].__len__)

9
gfceux
View File

@ -162,7 +162,6 @@ def set_options():
options.autoscale_check = widgets.get_object("autoscale_check").get_active()
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.extra_entry = widgets.get_object("extra_entry").get_text()
@ -256,10 +255,8 @@ class GfceuApp:
def find_fceu(self):
bin = find_binary('fceux')
if bin == None:
gfceu_error('Could not find the fceu binary.\n\
Ensure that FCE Ultra is installed and in the $PATH.\n\
On Debian based systems (like Ubuntu), try the following command:\n\
sudo apt-get install fceu', 4, True)
gfceu_error('Could not find the fceux binary.\n\
Ensure that fceux is installed and in the $PATH.\n', 4, True)
else:
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')
else:
print 'ERROR.'
print 'Could not find the glade.xml file.'
print 'Could not find the ' + glade_file + ' file.'
print 'Try reinstalling the application.'
sys.exit(1)

View File

@ -1,17 +1,12 @@
#!/usr/bin/env python
# displays mockup of gamepad config
import gtk, gtk.glade
import gtk
class WidgetsWrapper:
def __init__(self):
self.widgets = gtk.glade.XML ('gfceu.glade', "gamepad_config_window")
self.widgets.signal_autoconnect(GladeHandlers.__dict__)
# Gives us the ability to do: widgets['widget_name'].action()
def __getitem__(self, key):
return self.widgets.get_widget(key)
glade_file = 'gfceux.xml'
print "Using: " + glade_file
widgets = gtk.Builder()
widgets.add_from_file(glade_file)
widgets = WidgetsWrapper()
widgets['gamepad_config_window'].show_all()
widgets.get_object('gamepad_config_window').show_all()
gtk.main ()