From bb553f9d6b4e8b6f1f2ff640816607e2e8d55be2 Mon Sep 17 00:00:00 2001 From: badda71 Date: Tue, 5 May 2020 23:19:45 +0200 Subject: [PATCH] fix bug in key mapping, revert emu to 320px width, speed bug fix, bump version --- Makefile | 2 +- src/3ds/uibottom.cpp | 1 + src/drawing.cpp | 8 ++++---- src/gui.cpp | 3 ++- src/include/custom.h | 3 +-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 2e9f182..a18197f 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ ICON := icon.png VERSION_MAJOR := 0 VERSION_MINOR := 3 -VERSION_MICRO := 0 +VERSION_MICRO := 1 ifeq ($(VERSION_MICRO),0) VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) diff --git a/src/3ds/uibottom.cpp b/src/3ds/uibottom.cpp index fbcbc26..090c629 100644 --- a/src/3ds/uibottom.cpp +++ b/src/3ds/uibottom.cpp @@ -852,6 +852,7 @@ int uib_handle_event(SDL_Event *e) { toggle_keyboard(); return 1; } + if (e->key.keysym.sym == DS_TOUCH) return 1; } if (e->type != SDL_MOUSEMOTION && e->type != SDL_MOUSEBUTTONUP && diff --git a/src/drawing.cpp b/src/drawing.cpp index 9bff474..7e5535f 100644 --- a/src/drawing.cpp +++ b/src/drawing.cpp @@ -64,11 +64,11 @@ int fps_counter = 0; #define GFXVIDINFO_PIXBYTES 2 -#define GFXVIDINFO_WIDTH 400 +#define GFXVIDINFO_WIDTH 320 #define GFXVIDINFO_HEIGHT 240 #define MAXBLOCKLINES 240 -#define VISIBLE_LEFT_BORDER 32 -#define VISIBLE_RIGHT_BORDER 432 +#define VISIBLE_LEFT_BORDER 72 +#define VISIBLE_RIGHT_BORDER 392 #define LINETOSCR_X_ADJUST_BYTES 64 #define maxhpos MAXHPOS @@ -324,7 +324,7 @@ static __inline__ void count_frame (void) if ((ahora+PARTIDA) 200) scale=200; - N3DS_SetScalingDirect((float)scale/100.0f, (float)scale/100.0f, 0); + float f = scale==100 ? 1.0f : ((float)scale/100.0f); + N3DS_SetScalingDirect(f, f, 0); snprintf(buf,50,"Scale %d%%",scale); gui_set_message(buf,1000); } diff --git a/src/include/custom.h b/src/include/custom.h index 20ed49c..1ab387e 100644 --- a/src/include/custom.h +++ b/src/include/custom.h @@ -77,8 +77,7 @@ extern uae_u16 INTREQR (void); /* maximums for statically allocated tables */ -//#define MAXHPOS 227 -#define MAXHPOS 247 +#define MAXHPOS 227 #define MAXVPOS 312 //#define MAXVPOS 280