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)