X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fgp2x%2Finput.c;h=704cb3a916a73bad78527e35a80f68d5197400a7;hp=8936ec04c4da27f75063eaf22fcdc012a770d8bb;hb=937bf65b1c80e9394547e5f105664bd26f3671de;hpb=9115e7d2b5e5b8dc00774fe92db97f1d02b2fee1 diff --git a/drivers/gp2x/input.c b/drivers/gp2x/input.c index 8936ec0..704cb3a 100644 --- a/drivers/gp2x/input.c +++ b/drivers/gp2x/input.c @@ -30,11 +30,11 @@ #include "minimal.h" extern int swapbuttons; -extern int stretch_offset; +extern int scaled_display; extern int FSkip_setting; extern void SetVideoScaling(int pixels,int width,int height); -INLINE long UpdateGamepadGP2X(void); +static INLINE long UpdateGamepadGP2X(void); @@ -125,7 +125,7 @@ static void setsoundvol(int soundvolume) * GP2x joystick reader * */ -INLINE long UpdateGamepadGP2X(void) +static INLINE long UpdateGamepadGP2X(void) { uint32 JS=0; @@ -173,23 +173,15 @@ INLINE long UpdateGamepadGP2X(void) // still pressed down from stretching from last one goto no_pad; } - if (stretch_offset == 32) - { - stretch_offset=0; - } - else - { - stretch_offset=32; - } + scaled_display = !scaled_display; - if (stretch_offset == 32) + if (scaled_display) { - SetVideoScaling(320, 320, 240); - CleanSurface(); + SetVideoScaling(320, 256, 240); } else { - SetVideoScaling(320, 256, 240); + SetVideoScaling(320, 320, 240); } goto no_pad;