From f8dee03b4fdc3e1562f0425f9a0a20c6df5b8b55 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 28 Dec 2020 01:33:13 +0100 Subject: [PATCH] Sending CTRL+ALT+DEL and CTRL+ALT+ESC using the menu now uses the same protocol as actual key presses instead of forcibly injecting scan codes into the keyboard buffer; Fixed the machine not available string to treat the machine name string as ANSI. --- src/pc.c | 23 ++++++----------------- src/win/86Box.rc | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/pc.c b/src/pc.c index bea9d3781..cec907027 100644 --- a/src/pc.c +++ b/src/pc.c @@ -647,26 +647,15 @@ pc_init_modules(void) } -/* Insert keystrokes into the machine's keyboard buffer. */ -static void -pc_keyboard_send(uint8_t val) -{ - if (AT) - keyboard_at_adddata_keyboard_raw(val); - else - keyboard_send(val); -} - - void pc_send_ca(uint8_t sc) { - pc_keyboard_send(29); /* Ctrl key pressed */ - pc_keyboard_send(56); /* Alt key pressed */ - pc_keyboard_send(sc); - pc_keyboard_send(sc | 0x80); - pc_keyboard_send(184); /* Alt key released */ - pc_keyboard_send(157); /* Ctrl key released */ + keyboard_input(1, 29); /* Ctrl key pressed */ + keyboard_input(1, 56); /* Alt key pressed */ + keyboard_input(1, sc); + keyboard_input(0, sc); + keyboard_input(0, 56); /* Alt key released */ + keyboard_input(0, 29); /* Ctrl key released */ } diff --git a/src/win/86Box.rc b/src/win/86Box.rc index a7891b81d..b71f49e80 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -931,7 +931,7 @@ BEGIN IDS_2060 "On" IDS_2061 "Off" IDS_2062 "All images (*.86F;*.DSK;*.FLP;*.IM?;*.*FD?)\0*.86F;*.DSK;*.FLP;*.IM?;*.*FD?\0Basic sector images (*.DSK;*.FLP;*.IM?;*.*FD?)\0*.DSK;*.FLP;*.IM?;*.IMG;*.*FD?\0Surface images (*.86F)\0*.86F\0" - IDS_2063 "Machine ""%S"" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." + IDS_2063 "Machine ""%s"" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." END STRINGTABLE DISCARDABLE