Fullscreen resizing fix

actorid
scrawl 12 years ago
parent c29699487f
commit 14a2a26a56

@ -796,13 +796,16 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
unsigned int x = Settings::Manager::getInt("resolution x", "Video"); unsigned int x = Settings::Manager::getInt("resolution x", "Video");
unsigned int y = Settings::Manager::getInt("resolution y", "Video"); unsigned int y = Settings::Manager::getInt("resolution y", "Video");
SDL_SetWindowFullscreen(mRendering.getSDLWindow(), 0);
if (x != mRendering.getWindow()->getWidth() || y != mRendering.getWindow()->getHeight()) if (x != mRendering.getWindow()->getWidth() || y != mRendering.getWindow()->getHeight())
{ {
SDL_SetWindowSize(mRendering.getSDLWindow(), x, y); SDL_SetWindowSize(mRendering.getSDLWindow(), x, y);
mRendering.getWindow()->resize(x, y); mRendering.getWindow()->resize(x, y);
} }
SDL_SetWindowFullscreen(mRendering.getSDLWindow(), Settings::Manager::getBool("fullscreen", "Video") ? SDL_WINDOW_FULLSCREEN : 0); SDL_SetWindowFullscreen(mRendering.getSDLWindow(), Settings::Manager::getBool("fullscreen", "Video") ? SDL_WINDOW_FULLSCREEN : 0);
mRendering.getWindow()->setFullscreen(Settings::Manager::getBool("fullscreen", "Video"), x, y); //mRendering.getWindow()->setFullscreen(Settings::Manager::getBool("fullscreen", "Video"), x, y);
} }
mWater->processChangedSettings(settings); mWater->processChangedSettings(settings);

@ -39,7 +39,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "tinyxml.h" #include "tinyxml.h"
#include "SDL_input.h"
#include "SDL_keyboard.h" #include "SDL_keyboard.h"
#include "SDL_mouse.h" #include "SDL_mouse.h"
#include "SDL_joystick.h" #include "SDL_joystick.h"

Loading…
Cancel
Save