From 1291d35e08c057c9b52a863afbf28c7168696dce Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 4 Oct 2018 22:06:56 -0400 Subject: [PATCH 1/2] Don't allow non-keyboard keys to screenshot/gif in menus --- src/m_misc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/m_misc.c b/src/m_misc.c index a4f53c71..80c58d64 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1531,6 +1531,10 @@ boolean M_ScreenshotResponder(event_t *ev) return false; ch = ev->data1; + + if (ch >= KEY_MOUSE1 && menuactive) // If it's not a keyboard key, then don't allow it in the menus! + return false; + if (ch == KEY_F8 || ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8 M_ScreenShot(); else if (ch == KEY_F9 || ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9 From 8707b2f40ac9ae47dbb2956435a5fbf4904cc88a Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 22 Dec 2018 01:43:58 -0500 Subject: [PATCH 2/2] Center window on current monitor during vidmode change --- src/sdl/i_video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 2c199c2d..dad3b941 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -200,7 +200,10 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) } // Reposition window only in windowed mode SDL_SetWindowSize(window, width, height); - SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + SDL_SetWindowPosition(window, + SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window)), + SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window)) + ); } } else