From 50e393fe6e45ae5530492ae4e81da830bfcb73d0 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 22 Aug 2014 23:54:26 +0200 Subject: [PATCH] Graphics: Fix resize_screen --- src/eventthread.cpp | 2 +- src/graphics.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/eventthread.cpp b/src/eventthread.cpp index a8c5f7b..7348c32 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -119,7 +119,7 @@ void EventThread::process(RGSSThreadData &rtData) case SDL_WINDOWEVENT : switch (event.window.event) { - case SDL_WINDOWEVENT_RESIZED : + case SDL_WINDOWEVENT_SIZE_CHANGED : windowSizeMsg.notifyChange(event.window.data1, event.window.data2); break; diff --git a/src/graphics.cpp b/src/graphics.cpp index 9a9f369..913f879 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -809,8 +809,6 @@ void Graphics::resizeScreen(int width, int height) if (p->scRes == size) return; - shState->eThread().requestWindowResize(width, height); - p->scRes = size; p->screen.setResolution(width, height); @@ -826,7 +824,7 @@ void Graphics::resizeScreen(int width, int height) TEX::bind(p->transBuffer.tex); TEX::allocEmpty(width, height); - p->updateScreenResoRatio(p->threadData); + shState->eThread().requestWindowResize(width, height); } DEF_ATTR_RD_SIMPLE(Graphics, Brightness, int, p->brightness)