mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-20 17:51:02 +00:00
Implement alt+tab for toggling fullscreen mode
This commit is contained in:
parent
ba3ae581ab
commit
cd1561ac57
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "idlib/Heap.h"
|
||||
#include "framework/Common.h"
|
||||
#include "framework/KeyInput.h"
|
||||
#include "renderer/RenderSystem.h"
|
||||
|
||||
#include "sys/sys_public.h"
|
||||
|
||||
|
@ -392,6 +393,13 @@ sysEvent_t Sys_GetEvent() {
|
|||
return res_none;
|
||||
|
||||
case SDL_KEYDOWN:
|
||||
if (ev.key.keysym.sym == SDLK_RETURN && (ev.key.keysym.mod & KMOD_LALT) > 0) {
|
||||
cvarSystem->SetCVarBool("r_fullscreen", !renderSystem->IsFullScreen());
|
||||
PushConsoleEvent("vid_restart");
|
||||
return res_none;
|
||||
}
|
||||
|
||||
// fall through
|
||||
case SDL_KEYUP:
|
||||
key = mapkey(ev.key.keysym.sym);
|
||||
|
||||
|
|
Loading…
Reference in a new issue