s/fmv: support screenshots during fmvs

This commit is contained in:
rr- 2021-12-04 15:49:02 +01:00
parent 53f9fd4f1a
commit 31eacbe52d
No known key found for this signature in database
GPG key ID: CC65E6FD28CAE42A

View file

@ -25,12 +25,13 @@
#include "game/gamebuf.h"
#include "game/input.h"
#include "game/output.h"
#include "game/shell.h"
#include "game/viewport.h"
#include "global/vars_platform.h"
#include "log.h"
#include "specific/s_audio.h"
#include "specific/s_shell.h"
#include "specific/s_output.h"
#include "specific/s_shell.h"
#include "ddraw/Interop.hpp"
@ -2191,16 +2192,22 @@ static void S_FMV_EventLoop(VideoState *is)
break;
case SDL_KEYUP:
if (event.key.keysym.sym == SDLK_PRINTSCREEN) {
Shell_MakeScreenshot();
break;
}
if (event.key.keysym.sym == SDLK_ESCAPE) {
is->abort_request = true;
break;
}
const Uint8 *keyboard_state = SDL_GetKeyboardState(NULL);
if (keyboard_state[SDL_SCANCODE_LALT]
&& keyboard_state[SDL_SCANCODE_RETURN]) {
if (event.key.keysym.sym == SDLK_RETURN
&& event.key.keysym.mod & KMOD_LALT) {
S_Shell_ToggleFullscreen();
break;
}
break;
case SDL_WINDOWEVENT: