Fullscreen?
This commit is contained in:
@@ -622,6 +622,7 @@ class PetitComputer
|
|||||||
writeln(SDL_GetError.to!string);
|
writeln(SDL_GetError.to!string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
bool fullscreen = false;
|
||||||
scope(exit)
|
scope(exit)
|
||||||
{
|
{
|
||||||
quit = true;
|
quit = true;
|
||||||
@@ -830,6 +831,18 @@ class PetitComputer
|
|||||||
synchronized (buttonLock)
|
synchronized (buttonLock)
|
||||||
{
|
{
|
||||||
auto key = event.key.keysym.sym;
|
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];
|
button |= buttonTable[event.key.keysym.scancode];
|
||||||
if(key == SDLK_v)
|
if(key == SDLK_v)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user