X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fgp2x%2Finput.c;h=cd25e97abb964e576f0530d3b71fe4d60afab2ff;hp=9ba438a0656660722c5a2746a6cb4af42fc86e62;hb=b2b95d2e0d1fd5e52d03c2152605b09b024c1d0e;hpb=e1591a12a775a600572ffccb2d6f8f4d6343b7dd diff --git a/drivers/gp2x/input.c b/drivers/gp2x/input.c index 9ba438a..cd25e97 100644 --- a/drivers/gp2x/input.c +++ b/drivers/gp2x/input.c @@ -29,13 +29,12 @@ #include "minimal.h" +extern uint8 Exit; // exit emu loop extern int swapbuttons; extern int scaled_display; extern int FSkip_setting; -extern void SetVideoScaling(int pixels,int width,int height); - /* UsrInputType[] is user-specified. InputType[] is current @@ -99,7 +98,7 @@ static void setsoundvol(int soundvolume) void FCEUD_UpdateInput(void) { long lastpad2=lastpad; - unsigned long pad=gp2x_joystick_read(); + unsigned long pad=gp2x_joystick_read(1); // TODO: USB joys and stuff uint32 JS=0; #define down(b) (pad & GP2X_##b) @@ -132,6 +131,10 @@ void FCEUD_UpdateInput(void) //FCEUI_SetSoundVolume(soundvol); setsoundvol(soundvol); } + else if (down(VOL_DOWN) && down(VOL_UP)) + { + Exit = 1; + } if (shift) { @@ -149,11 +152,11 @@ void FCEUD_UpdateInput(void) if (scaled_display) { - SetVideoScaling(320, 256, 240); + gp2x_video_RGB_setscaling(0, 256, 240); } else { - SetVideoScaling(320, 320, 240); + gp2x_video_RGB_setscaling(0, 320, 240); } goto no_pad;