From 8d46224893779ce6ad2b62d8b1eb2aa9d88a86a8 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 24 Jul 2023 15:07:08 -0300 Subject: [PATCH] keyboard: Rename inaccurate fullscreen hotkey function --- src/device/keyboard.c | 4 ++-- src/include/86box/keyboard.h | 4 ++-- src/win/win_ui.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/device/keyboard.c b/src/device/keyboard.c index 10d127c77..9308fd90c 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -320,7 +320,7 @@ keyboard_isfsenter(void) } int -keyboard_isfsenter_down(void) +keyboard_isfsenter_up(void) { return (!recv_key[0x01d] && !recv_key[0x11d] && !recv_key[0x038] && !recv_key[0x138] && !recv_key[0x049] && !recv_key[0x149]); } @@ -333,7 +333,7 @@ keyboard_isfsexit(void) } int -keyboard_isfsexit_down(void) +keyboard_isfsexit_up(void) { return (!recv_key[0x01d] && !recv_key[0x11d] && !recv_key[0x038] && !recv_key[0x138] && !recv_key[0x051] && !recv_key[0x151]); } diff --git a/src/include/86box/keyboard.h b/src/include/86box/keyboard.h index f09507601..b84733d9c 100644 --- a/src/include/86box/keyboard.h +++ b/src/include/86box/keyboard.h @@ -268,9 +268,9 @@ extern void keyboard_get_states(uint8_t *cl, uint8_t *nl, uint8_t *sl); extern void keyboard_set_states(uint8_t cl, uint8_t nl, uint8_t sl); extern int keyboard_recv(uint16_t key); extern int keyboard_isfsenter(void); -extern int keyboard_isfsenter_down(void); +extern int keyboard_isfsenter_up(void); extern int keyboard_isfsexit(void); -extern int keyboard_isfsexit_down(void); +extern int keyboard_isfsexit_up(void); extern int keyboard_ismsexit(void); extern void keyboard_set_is_amstrad(int ams); diff --git a/src/win/win_ui.c b/src/win/win_ui.c index e9485f7ee..deb2eb6ec 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -1493,7 +1493,7 @@ ui_init(int nCmdShow) if (!fs_off_signal && video_fullscreen && keyboard_isfsexit()) { /* Signal "exit fullscreen mode". */ fs_off_signal = 1; - } else if (fs_off_signal && video_fullscreen && keyboard_isfsexit_down()) { + } else if (fs_off_signal && video_fullscreen && keyboard_isfsexit_up()) { plat_setfullscreen(0); fs_off_signal = 0; } @@ -1501,7 +1501,7 @@ ui_init(int nCmdShow) if (!fs_on_signal && !video_fullscreen && keyboard_isfsenter()) { /* Signal "enter fullscreen mode". */ fs_on_signal = 1; - } else if (fs_on_signal && !video_fullscreen && keyboard_isfsenter_down()) { + } else if (fs_on_signal && !video_fullscreen && keyboard_isfsenter_up()) { plat_setfullscreen(1); fs_on_signal = 0; }