mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove passing around pointer to gameScreen from KeyPoll::Poll()
Makes for cleaner code this way.
This commit is contained in:
parent
30bcc08bec
commit
51d852601d
3 changed files with 6 additions and 6 deletions
|
@ -68,7 +68,7 @@ void KeyPoll::disabletextentry()
|
|||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
void KeyPoll::Poll(Screen *screen)
|
||||
void KeyPoll::Poll()
|
||||
{
|
||||
SDL_Event evt;
|
||||
while (SDL_PollEvent(&evt))
|
||||
|
@ -248,7 +248,7 @@ void KeyPoll::Poll(Screen *screen)
|
|||
{
|
||||
if (wasFullscreen)
|
||||
{
|
||||
screen->isWindowed = false;
|
||||
gameScreen.isWindowed = false;
|
||||
SDL_SetWindowFullscreen(
|
||||
SDL_GetWindowFromID(evt.window.windowID),
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP
|
||||
|
@ -262,8 +262,8 @@ void KeyPoll::Poll(Screen *screen)
|
|||
isActive = false;
|
||||
if (!useFullscreenSpaces)
|
||||
{
|
||||
wasFullscreen = !screen->isWindowed;
|
||||
screen->isWindowed = true;
|
||||
wasFullscreen = !gameScreen.isWindowed;
|
||||
gameScreen.isWindowed = true;
|
||||
SDL_SetWindowFullscreen(
|
||||
SDL_GetWindowFromID(evt.window.windowID),
|
||||
0
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
void disabletextentry();
|
||||
|
||||
void Poll(Screen *screen);
|
||||
void Poll();
|
||||
|
||||
bool isDown(SDL_Keycode key);
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
|
||||
key.Poll(&gameScreen);
|
||||
key.Poll();
|
||||
if(key.toggleFullscreen)
|
||||
{
|
||||
if(!gameScreen.isWindowed)
|
||||
|
|
Loading…
Reference in a new issue