|
From: Tapio V. <aa...@us...> - 2010-10-17 21:38:53
|
Module: performous
Branch: master
Commit: 396041e0c4cbd02b9c15178a57a14f19f92e2577
Author: Tapio Vierros <tap...@gm...>
Date: Mon Oct 18 00:37:13 2010 +0300
Reload current screen when doing fullscreen switch to counter graphics glitches.
---
game/main.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index c5879a4..f542705 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -106,8 +106,11 @@ static void checkEvents_SDL(ScreenManager& sm) {
// Check for OpenGL errors
glutil::GLErrorChecker glerror;
}
- if( config["graphic/fullscreen"].b() != sm.window().getFullscreen() )
+ if (config["graphic/fullscreen"].b() != sm.window().getFullscreen()) {
sm.window().setFullscreen(config["graphic/fullscreen"].b());
+ // Reloading the screen seems to counter window going white on Windows and possibly OSX
+ sm.activateScreen(sm.getCurrentScreen()->getName());
+ }
}
void mainLoop(std::string const& songlist) {
|