SPU.h : made SPU_Pause visible
gtk-glade : mute sound & boost key
This commit is contained in:
parent
83e873f945
commit
707792dae1
|
@ -80,6 +80,7 @@ extern SPU_struct *SPU;
|
|||
|
||||
int SPU_ChangeSoundCore(int coreid, int buffersize);
|
||||
int SPU_Init(int coreid, int buffersize);
|
||||
void SPU_Pause(int pause);
|
||||
void SPU_SetVolume(int volume);
|
||||
void SPU_Reset(void);
|
||||
void SPU_DeInit(void);
|
||||
|
|
|
@ -146,6 +146,15 @@ void on_menu_controls_activate (GtkMenuItem *menuitem, gpointer user_data)
|
|||
edit_controls();
|
||||
}
|
||||
|
||||
void on_menu_audio_on_activate (GtkMenuItem *menuitem, gpointer user_data) {
|
||||
/* we want set audio emulation ON or OFF */
|
||||
if (gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem)) {
|
||||
SPU_Pause(0);
|
||||
} else {
|
||||
SPU_Pause(1);
|
||||
}
|
||||
}
|
||||
|
||||
void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data) {
|
||||
GtkBox * sbox = (GtkBox*)glade_xml_get_widget(xml, "whb_Sub");
|
||||
GtkWidget * mbox = glade_xml_get_widget(xml, "whb_Main");
|
||||
|
|
|
@ -30,6 +30,7 @@ void on_size3x_activate (GtkMenuItem *menuitem, gpointer user_data);
|
|||
|
||||
/* MENU CONFIG */
|
||||
void on_menu_controls_activate (GtkMenuItem *menuitem, gpointer user_data);
|
||||
void on_menu_audio_on_activate (GtkMenuItem *menuitem, gpointer user_data);
|
||||
void on_menu_rightscreen_activate (GtkMenuItem *menuitem, gpointer user_data);
|
||||
void on_menu_rotatescreen_activate (GtkMenuItem *menuitem, gpointer user_data);
|
||||
/* MENU TOOLS */
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
static u16 Cur_Keypad = 0;
|
||||
int ScreenCoeff_Size=1;
|
||||
gboolean ScreenRotate=FALSE;
|
||||
|
||||
gboolean Boost=FALSE;
|
||||
int BoostFS=20;
|
||||
int saveFS;
|
||||
|
||||
/* ***** ***** INPUT BUTTONS / KEYBOARD ***** ***** */
|
||||
|
||||
|
@ -22,7 +24,13 @@ u16 inline lookup_key (guint keyval) {
|
|||
|
||||
gboolean on_wMainW_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
|
||||
u16 Key = lookup_key(event->keyval);
|
||||
if (Key != 0) {
|
||||
if (event->keyval == Keypad_Config[DESMUME_KEY_BOOST-1]) {
|
||||
Boost != Boost;
|
||||
saveFS=Frameskip;
|
||||
if (Boost) Frameskip = BoostFS;
|
||||
else Frameskip = saveFS;
|
||||
}
|
||||
else if (Key != 0) {
|
||||
Cur_Keypad |= Key;
|
||||
if(desmume_running()) desmume_keypad(Cur_Keypad);
|
||||
}
|
||||
|
@ -213,7 +221,7 @@ const char * DESMUME_KEY_NAMES[DESMUME_NB_KEYS]={
|
|||
"A", "B",
|
||||
"Select", "Start",
|
||||
"Right", "Left", "Up", "Down",
|
||||
"R", "L", "Y", "X", "DEBUG"
|
||||
"R", "L", "Y", "X", "DEBUG", "Boost"
|
||||
};
|
||||
gint Keypad_Temp[DESMUME_NB_KEYS];
|
||||
guint temp_Key=0;
|
||||
|
@ -292,3 +300,4 @@ void on_button_B_clicked (GtkButton *b, gpointer user_data) { ask(b,DESMU
|
|||
void on_button_Start_clicked (GtkButton *b, gpointer user_data) { ask(b,DESMUME_KEY_Start); }
|
||||
void on_button_Select_clicked (GtkButton *b, gpointer user_data) { ask(b,DESMUME_KEY_Select); }
|
||||
void on_button_Debug_clicked (GtkButton *b, gpointer user_data) { ask(b,DESMUME_KEY_DEBUG); }
|
||||
void on_button_Boost_clicked (GtkButton *b, gpointer user_data) { ask(b,DESMUME_KEY_BOOST); }
|
||||
|
|
|
@ -41,3 +41,4 @@ void on_button_B_clicked (GtkButton *button, gpointer user_data);
|
|||
void on_button_Start_clicked (GtkButton *button, gpointer user_data);
|
||||
void on_button_Select_clicked (GtkButton *button, gpointer user_data);
|
||||
void on_button_Debug_clicked (GtkButton *button, gpointer user_data);
|
||||
void on_button_Boost_clicked (GtkButton *button, gpointer user_data);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define __DESMUME_H__
|
||||
|
||||
|
||||
#define DESMUME_NB_KEYS 13
|
||||
#define DESMUME_NB_KEYS 14
|
||||
|
||||
#define DESMUME_KEYMASK_(k) (1 << k)
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
|||
#define DESMUME_KEY_Y 11
|
||||
#define DESMUME_KEY_X 12
|
||||
#define DESMUME_KEY_DEBUG 13
|
||||
#define DESMUME_KEY_BOOST 14
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
<signal name="activate" handler="on_menu_reset_activate" last_modification_time="Mon, 01 Jan 2007 16:40:47 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image15">
|
||||
<widget class="GtkImage" id="image19">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">1</property>
|
||||
|
@ -328,7 +328,7 @@
|
|||
<signal name="activate" handler="on_menu_controls_activate" last_modification_time="Mon, 01 Jan 2007 16:53:11 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image16">
|
||||
<widget class="GtkImage" id="image20">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-preferences</property>
|
||||
<property name="icon_size">1</property>
|
||||
|
@ -341,6 +341,16 @@
|
|||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_audio_on">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Audio On</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_menu_audio_on_activate" last_modification_time="Sat, 06 Jan 2007 13:56:06 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_rightscreen">
|
||||
<property name="visible">True</property>
|
||||
|
@ -382,7 +392,7 @@
|
|||
<signal name="activate" handler="on_menu_IO_regs_activate" last_modification_time="Mon, 01 Jan 2007 16:53:11 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image17">
|
||||
<widget class="GtkImage" id="image21">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-properties</property>
|
||||
<property name="icon_size">1</property>
|
||||
|
@ -1215,6 +1225,26 @@
|
|||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_Boost">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Boost : </property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_button_Boost_clicked" last_modification_time="Sat, 06 Jan 2007 13:54:50 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
|
|
@ -36,12 +36,13 @@ const char *Ini_Keypad_Values[DESMUME_NB_KEYS] =
|
|||
"KEY_Y",
|
||||
"KEY_X",
|
||||
"KEY_DEBUG",
|
||||
"KEY_BOOST"
|
||||
};
|
||||
|
||||
const gint Default_Keypad_Config[DESMUME_NB_KEYS] =
|
||||
{
|
||||
GDK_A,
|
||||
GDK_B,
|
||||
GDK_b,
|
||||
GDK_a,
|
||||
GDK_BackSpace,
|
||||
GDK_Return,
|
||||
GDK_Right,
|
||||
|
@ -50,9 +51,10 @@ const gint Default_Keypad_Config[DESMUME_NB_KEYS] =
|
|||
GDK_Down,
|
||||
GDK_KP_Decimal,
|
||||
GDK_KP_0,
|
||||
GDK_Y,
|
||||
GDK_X,
|
||||
GDK_P
|
||||
GDK_y,
|
||||
GDK_x,
|
||||
GDK_p,
|
||||
GDK_o
|
||||
};
|
||||
|
||||
char * CONFIG_FILE;
|
||||
|
|
Loading…
Reference in New Issue