X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fgp2x%2Finput.c;h=34bae72f72f30d6d6bb64537caa2182c53340a40;hp=c2f88f6c0e534ef313cfb9da14bbc0b016140050;hb=7b356ee3dc5d7e54d9dc06c413f84380d1044441;hpb=15d2d2584cc71389f06b969d7cd836332add97c6 diff --git a/drivers/gp2x/input.c b/drivers/gp2x/input.c index c2f88f6..34bae72 100644 --- a/drivers/gp2x/input.c +++ b/drivers/gp2x/input.c @@ -22,8 +22,6 @@ #include "../../video.h" #include "usbjoy.h" -extern int FSkip; - /* UsrInputType[] is user-specified. InputType[] is current (game loading can override user settings) */ @@ -49,6 +47,13 @@ static void setsoundvol(int soundvolume) { int soundvolIndex; static char soundvolmeter[24]; + static int prev_snd_on = 0; + + if ((!!soundvolume) ^ prev_snd_on) + { + FCEUI_Sound(Settings.sound_rate); + prev_snd_on = !!soundvolume; + } // draw on screen :D gp2x_sound_volume(soundvolume, soundvolume); @@ -194,10 +199,9 @@ static void FCEUD_UpdateInput(void) uint32 all_acts[2] = {0,0}; int i; - if ((down(VOL_DOWN) && down(VOL_UP)) || (keys & (GP2X_L|GP2X_L|GP2X_START)) == (GP2X_L|GP2X_L|GP2X_START)) + if ((down(VOL_DOWN) && down(VOL_UP)) || (keys & (GP2X_L|GP2X_START)) == (GP2X_L|GP2X_START)) { Exit = 1; - FSkip = 0; /* force rendering the last frame for menu */ return; } else if (down(VOL_UP))