mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): resize GLSDL window with SDL resize event
This commit is contained in:
parent
21dcc7d8ae
commit
884d208bd0
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
#include "event/Input.hpp"
|
#include "event/Input.hpp"
|
||||||
#include "event/Event.hpp"
|
#include "event/Event.hpp"
|
||||||
#include "gx/Window.hpp"
|
#include "gx/Window.hpp"
|
||||||
|
#include "gx/Device.hpp"
|
||||||
|
|
||||||
#include <bc/Debug.hpp>
|
#include <bc/Debug.hpp>
|
||||||
#include <storm/Unicode.hpp>
|
#include <storm/Unicode.hpp>
|
||||||
|
|
@ -372,6 +373,8 @@ void GLSDLWindow::DispatchSDLWindowResizedEvent(const SDL_Event& event) {
|
||||||
auto width = static_cast<int32_t>(event.window.data1);
|
auto width = static_cast<int32_t>(event.window.data1);
|
||||||
auto height = static_cast<int32_t>(event.window.data2);
|
auto height = static_cast<int32_t>(event.window.data2);
|
||||||
|
|
||||||
|
static_cast<CGxDeviceGLSDL*>(g_theGxDevicePtr)->Resize(width, height);
|
||||||
|
|
||||||
OsQueuePut(OS_INPUT_SIZE, width, height, 0, 0);
|
OsQueuePut(OS_INPUT_SIZE, width, height, 0, 0);
|
||||||
|
|
||||||
auto bounds = GetSavedWindowBounds();
|
auto bounds = GetSavedWindowBounds();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue