1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Don't extern gameScreen, use *graphics.screenbuffer instead

Externing gameScreen is just unnecessary. Still a good idea to have it
off the stack, though.
This commit is contained in:
Misa 2020-06-19 13:42:48 -07:00 committed by Ethan Lee
parent 0cb21f407e
commit d898597c1e
2 changed files with 4 additions and 5 deletions

View file

@ -1,4 +1,5 @@
#include "KeyPoll.h"
#include "Graphics.h"
#include <stdio.h>
#include <string.h>
#include <utf8/unchecked.h>
@ -248,7 +249,7 @@ void KeyPoll::Poll()
{
if (wasFullscreen)
{
gameScreen.isWindowed = false;
graphics.screenbuffer->isWindowed = false;
SDL_SetWindowFullscreen(
SDL_GetWindowFromID(evt.window.windowID),
SDL_WINDOW_FULLSCREEN_DESKTOP
@ -262,8 +263,8 @@ void KeyPoll::Poll()
isActive = false;
if (!useFullscreenSpaces)
{
wasFullscreen = !gameScreen.isWindowed;
gameScreen.isWindowed = true;
wasFullscreen = !graphics.screenbuffer->isWindowed;
graphics.screenbuffer->isWindowed = true;
SDL_SetWindowFullscreen(
SDL_GetWindowFromID(evt.window.windowID),
0

View file

@ -33,6 +33,4 @@ public:
SDL_Rect filterSubrect;
};
extern Screen gameScreen;
#endif /* SCREEN_H */