1
0

Fullscreen?

This commit is contained in:
otya128
2016-12-21 21:52:41 +09:00
parent 760c64113e
commit c0a8f6430d

View File

@@ -622,6 +622,7 @@ class PetitComputer
writeln(SDL_GetError.to!string);
return;
}
bool fullscreen = false;
scope(exit)
{
quit = true;
@@ -830,6 +831,18 @@ class PetitComputer
synchronized (buttonLock)
{
auto key = event.key.keysym.sym;
if (event.key.keysym.mod & KMOD_ALT)
{
if (key == SDLK_RETURN)
{
fullscreen = !fullscreen;
if (fullscreen)
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
else
SDL_SetWindowFullscreen(window, 0);
break;
}
}
button |= buttonTable[event.key.keysym.scancode];
if(key == SDLK_v)
{