From eb30bdb03fdd910a80fb21a6b182a865835887e7 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 18 Nov 2023 15:29:06 +0200 Subject: [PATCH] Do not automatically enable OSK in RP mode --- od-win32/win32.cpp | 4 ++++ od-win32/win32gfx.cpp | 8 ++++++++ od-win32/win32gfx.h | 1 + 3 files changed, 13 insertions(+) diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index af198b1a..829011b0 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -6948,6 +6948,10 @@ static int parseargs(const TCHAR *argx, const TCHAR *np, const TCHAR *np2) gui_control = 1; return 1; } + if (!_tcscmp(arg, _T("on_screen_keyboard"))) { + on_screen_keyboard = 1; + return 1; + } if (!np) return 0; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 95c0f95f..93c8bec8 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -4977,11 +4977,19 @@ void target_osk_control(int x, int y, int button, int buttonstate) } +int on_screen_keyboard; + bool target_osd_keyboard(int show) { struct AmigaMonitor *amon = &AMonitors[0]; static bool first; +#ifdef RETROPLATFORM + if (rp_isactive() && !on_screen_keyboard) { + return false; + } +#endif + xfree(osd_kb_data); osd_kb_data = NULL; osd_kb_eo.idx = 0x7f7f0000; diff --git a/od-win32/win32gfx.h b/od-win32/win32gfx.h index 73bef122..5ce9a426 100644 --- a/od-win32/win32gfx.h +++ b/od-win32/win32gfx.h @@ -25,6 +25,7 @@ extern int window_led_drives, window_led_drives_end; extern int window_led_hd, window_led_hd_end; extern int window_led_joys, window_led_joys_end, window_led_joy_start; extern int window_led_msg, window_led_msg_end, window_led_msg_start; +extern int on_screen_keyboard; extern HDC gethdc(int monid); extern void releasehdc(int monid, HDC hdc); -- 2.47.3