Add osd notification for fake microphone and audio toggle, cleanup a bit the hud code.
This commit is contained in:
parent
2f1c14fe33
commit
ef6717c210
|
@ -1092,6 +1092,7 @@ static int ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpointer
|
||||||
yd = yoff;
|
yd = yoff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osd->update();
|
||||||
DrawHUD();
|
DrawHUD();
|
||||||
gpu_screen_to_rgb(rgb, SCREENS_PIXEL_SIZE*SCREEN_BYTES_PER_PIXEL);
|
gpu_screen_to_rgb(rgb, SCREENS_PIXEL_SIZE*SCREEN_BYTES_PER_PIXEL);
|
||||||
origPixbuf = gdk_pixbuf_new_from_data(rgb, GDK_COLORSPACE_RGB,
|
origPixbuf = gdk_pixbuf_new_from_data(rgb, GDK_COLORSPACE_RGB,
|
||||||
|
@ -1606,6 +1607,7 @@ gboolean EmuLoop(gpointer data)
|
||||||
|
|
||||||
_updateDTools();
|
_updateDTools();
|
||||||
gtk_widget_queue_draw( pDrawingArea );
|
gtk_widget_queue_draw( pDrawingArea );
|
||||||
|
osd->clear();
|
||||||
|
|
||||||
if (!gtk_fps_limiter_disabled) {
|
if (!gtk_fps_limiter_disabled) {
|
||||||
limiter_frame_counter += 1;
|
limiter_frame_counter += 1;
|
||||||
|
@ -1710,15 +1712,23 @@ static void ToggleAudio (GtkToggleAction *action)
|
||||||
{
|
{
|
||||||
if (gtk_toggle_action_get_active(action) == TRUE) {
|
if (gtk_toggle_action_get_active(action) == TRUE) {
|
||||||
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
||||||
|
osd->addLine("Audio enabled\n");
|
||||||
} else {
|
} else {
|
||||||
SPU_ChangeSoundCore(0, 0);
|
SPU_ChangeSoundCore(0, 0);
|
||||||
|
osd->addLine("Audio disabled\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FAKE_MIC
|
#ifdef FAKE_MIC
|
||||||
static void ToggleMicNoise (GtkToggleAction *action)
|
static void ToggleMicNoise (GtkToggleAction *action)
|
||||||
{
|
{
|
||||||
Mic_DoNoise((BOOL)gtk_toggle_action_get_active(action));
|
BOOL doNoise = (BOOL)gtk_toggle_action_get_active(action);
|
||||||
|
|
||||||
|
Mic_DoNoise(doNoise);
|
||||||
|
if (doNoise)
|
||||||
|
osd->addLine("Fake mic enabled\n");
|
||||||
|
else
|
||||||
|
osd->addLine("Fake mic disabled\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1747,7 +1757,6 @@ static gboolean timeout_exit_cb(gpointer data)
|
||||||
static int
|
static int
|
||||||
common_gtk_main( struct configured_features *my_config)
|
common_gtk_main( struct configured_features *my_config)
|
||||||
{
|
{
|
||||||
Desmume_InitOnce();
|
|
||||||
SDL_TimerID limiter_timer = NULL;
|
SDL_TimerID limiter_timer = NULL;
|
||||||
|
|
||||||
GtkAccelGroup * accel_group;
|
GtkAccelGroup * accel_group;
|
||||||
|
@ -1830,6 +1839,10 @@ common_gtk_main( struct configured_features *my_config)
|
||||||
arm7_memio, &arm7_ctrl_iface,
|
arm7_memio, &arm7_ctrl_iface,
|
||||||
my_config->disable_sound);
|
my_config->disable_sound);
|
||||||
|
|
||||||
|
/* Init the hud / osd stuff */
|
||||||
|
Desmume_InitOnce();
|
||||||
|
Hud.reset();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activate the GDB stubs
|
* Activate the GDB stubs
|
||||||
* This has to come after the NDS_Init (called in desmume_init)
|
* This has to come after the NDS_Init (called in desmume_init)
|
||||||
|
|
Loading…
Reference in New Issue