New GUI options for soundq and soundrate
This commit is contained in:
parent
73aec896e3
commit
19c976aa0b
28
gfceu
28
gfceu
|
@ -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()
|
||||||
|
|
||||||
|
@ -223,6 +236,7 @@ def set_options():
|
||||||
options.join_pass = widgets['join_pass'].get_text()
|
options.join_pass = widgets['join_pass'].get_text()
|
||||||
options.host_port = widgets['host_port'].get_value()
|
options.host_port = widgets['host_port'].get_value()
|
||||||
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):
|
||||||
|
@ -233,6 +247,16 @@ def launch(passed, local=False):
|
||||||
sound = '--sound 1 '
|
sound = '--sound 1 '
|
||||||
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 '
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
176
gfceu.glade
176
gfceu.glade
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue