mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09: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:
parent
0cb21f407e
commit
d898597c1e
2 changed files with 4 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "KeyPoll.h"
|
#include "KeyPoll.h"
|
||||||
|
#include "Graphics.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <utf8/unchecked.h>
|
#include <utf8/unchecked.h>
|
||||||
|
@ -248,7 +249,7 @@ void KeyPoll::Poll()
|
||||||
{
|
{
|
||||||
if (wasFullscreen)
|
if (wasFullscreen)
|
||||||
{
|
{
|
||||||
gameScreen.isWindowed = false;
|
graphics.screenbuffer->isWindowed = false;
|
||||||
SDL_SetWindowFullscreen(
|
SDL_SetWindowFullscreen(
|
||||||
SDL_GetWindowFromID(evt.window.windowID),
|
SDL_GetWindowFromID(evt.window.windowID),
|
||||||
SDL_WINDOW_FULLSCREEN_DESKTOP
|
SDL_WINDOW_FULLSCREEN_DESKTOP
|
||||||
|
@ -262,8 +263,8 @@ void KeyPoll::Poll()
|
||||||
isActive = false;
|
isActive = false;
|
||||||
if (!useFullscreenSpaces)
|
if (!useFullscreenSpaces)
|
||||||
{
|
{
|
||||||
wasFullscreen = !gameScreen.isWindowed;
|
wasFullscreen = !graphics.screenbuffer->isWindowed;
|
||||||
gameScreen.isWindowed = true;
|
graphics.screenbuffer->isWindowed = true;
|
||||||
SDL_SetWindowFullscreen(
|
SDL_SetWindowFullscreen(
|
||||||
SDL_GetWindowFromID(evt.window.windowID),
|
SDL_GetWindowFromID(evt.window.windowID),
|
||||||
0
|
0
|
||||||
|
|
|
@ -33,6 +33,4 @@ public:
|
||||||
SDL_Rect filterSubrect;
|
SDL_Rect filterSubrect;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Screen gameScreen;
|
|
||||||
|
|
||||||
#endif /* SCREEN_H */
|
#endif /* SCREEN_H */
|
||||||
|
|
Loading…
Reference in a new issue