New GUI options for soundq and soundrate

This commit is contained in:
punkrockguy318 2008-06-07 22:06:12 +00:00
parent 73aec896e3
commit 19c976aa0b
2 changed files with 114 additions and 90 deletions

28
gfceu
View File

@ -109,8 +109,16 @@ except ImportError:
# GFCEU Functions # GFCEU Functions
class game_options: class game_options:
# sound
sound_check = True sound_check = True
soundq_check = True
soundrate_entry = 11000
# video
fullscreen_check = False fullscreen_check = False
xscale_spin = 2
yscale_spin = 2
bpp_combo = 32
extra_entry = '' extra_entry = ''
romfile = '' romfile = ''
opengl_check = False opengl_check = False
@ -208,8 +216,13 @@ def set_options():
""" """
global xml global xml
options.romfile = widgets['rom_entry'].get_text() options.romfile = widgets['rom_entry'].get_text()
options.sound_check = widgets['sound_check'].get_active()
# sound
options.sound_check = widgets['sound_check'].get_active()
options.soundq_check = widgets['soundq_check'].get_active()
options.soundrate_entry = widgets['soundrate_entry'].get_text()
# video
options.fullscreen_check = widgets['fullscreen_check'].get_active() options.fullscreen_check = widgets['fullscreen_check'].get_active()
options.opengl_check = widgets['opengl_check'].get_active() options.opengl_check = widgets['opengl_check'].get_active()
@ -225,6 +238,7 @@ def set_options():
options.host_pass = widgets['host_pass'].get_text() options.host_pass = widgets['host_pass'].get_text()
def launch(passed, local=False): def launch(passed, local=False):
global xml, options, fceu_server_binary, fceux_binary global xml, options, fceu_server_binary, fceux_binary
set_options() set_options()
@ -234,6 +248,16 @@ def launch(passed, local=False):
else: else:
sound = '--sound 0 ' sound = '--sound 0 '
if options.soundq_check:
soundq = '--soundq 1 '
else:
soundq = '--soundq 0 '
if options.soundrate_entry:
soundrate = '--soundrate ' + options.soundrate_entry + ' '
else:
soundrate = ' '
if options.fullscreen_check: if options.fullscreen_check:
fullscreen = '--fullscreen 1 ' fullscreen = '--fullscreen 1 '
else: else:
@ -266,7 +290,7 @@ def launch(passed, local=False):
else: else:
opengl = '--opengl 0 ' opengl = '--opengl 0 '
command = fceux_binary +' '+ sound + fullscreen +\ command = fceux_binary +' '+ sound + soundq + soundrate + fullscreen +\
network + opengl + options.extra_entry + ' '+ passed network + opengl + options.extra_entry + ' '+ passed
gfceu_message('Command: ' + command) gfceu_message('Command: ' + command)

View File

@ -124,30 +124,17 @@
<property name="column_spacing">5</property> <property name="column_spacing">5</property>
<property name="row_spacing">5</property> <property name="row_spacing">5</property>
<child> <child>
<widget class="GtkButton" id="gp1_button"> <widget class="GtkButton" id="gp3_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Gamepad _1</property> <property name="label" translatable="yes">Gamepad _3</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="response_id">0</property> <property name="response_id">0</property>
<signal name="clicked" handler="gamepad_clicked" after="yes"/> <signal name="clicked" handler="gamepad_clicked" after="yes"/>
</widget> </widget>
<packing> <packing>
<property name="y_options"></property> <property name="top_attach">1</property>
</packing> <property name="bottom_attach">2</property>
</child>
<child>
<widget class="GtkButton" id="gp2_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Gamepad _2</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -169,17 +156,30 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkButton" id="gp3_button"> <widget class="GtkButton" id="gp2_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Gamepad _3</property> <property name="label" translatable="yes">Gamepad _2</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="gp1_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Gamepad _1</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="response_id">0</property> <property name="response_id">0</property>
<signal name="clicked" handler="gamepad_clicked" after="yes"/> <signal name="clicked" handler="gamepad_clicked" after="yes"/>
</widget> </widget>
<packing> <packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -272,7 +272,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkSpinButton" id="xscale"> <widget class="GtkSpinButton" id="xscale_spin">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">1 1 10 0.5 2 2</property> <property name="adjustment">1 1 10 0.5 2 2</property>
@ -303,10 +303,10 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkSpinButton" id="yscale"> <widget class="GtkSpinButton" id="yscale_spin">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">1 1 10 0.5 1 10</property> <property name="adjustment">2 1 10 0.5 1 10</property>
<property name="numeric">True</property> <property name="numeric">True</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property> <property name="update_policy">GTK_UPDATE_IF_VALID</property>
</widget> </widget>
@ -335,7 +335,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkComboBox" id="bpp"> <widget class="GtkComboBox" id="bpp_combo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="active">3</property> <property name="active">3</property>
<property name="items" translatable="yes">8 <property name="items" translatable="yes">8
@ -519,7 +519,7 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkEntry" id="soundrate"> <widget class="GtkEntry" id="soundrate_entry">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="text" translatable="yes">11000</property> <property name="text" translatable="yes">11000</property>
@ -592,26 +592,15 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
<property name="column_spacing">5</property> <property name="column_spacing">5</property>
<property name="row_spacing">5</property> <property name="row_spacing">5</property>
<child> <child>
<widget class="GtkLabel" id="label19"> <widget class="GtkEntry" id="host_pass">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Port:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -629,15 +618,26 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkEntry" id="host_pass"> <widget class="GtkLabel" id="label20">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="xalign">0</property>
<property name="label" translatable="yes">Password:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Port:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -688,13 +688,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
<property name="column_spacing">3</property> <property name="column_spacing">3</property>
<property name="row_spacing">5</property> <property name="row_spacing">5</property>
<child> <child>
<widget class="GtkEntry" id="join_add"> <widget class="GtkSpinButton" id="join_port">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">4046 1 65536 1 10 10</property>
<property name="climb_rate">1</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server Port:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server Address:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -714,54 +755,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label15"> <widget class="GtkEntry" id="join_add">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server Address:</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Server Port:</property>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password:</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="join_port">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">4046 1 65536 1 10 10</property>
<property name="climb_rate">1</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>