mirror of
https://github.com/gopher64/gopher64.git
synced 2026-09-28 15:26:46 +02:00
fix window resize
This commit is contained in:
@@ -184,11 +184,15 @@ int sdl_event_filter(void *userdata, SDL_Event *event)
|
||||
{
|
||||
if (event->type == SDL_WINDOWEVENT)
|
||||
{
|
||||
SDL_WSIPlatform *platform = (SDL_WSIPlatform *)&wsi->get_platform();
|
||||
switch (event->window.event)
|
||||
{
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
emu_running = 0;
|
||||
break;
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
platform->do_resize();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -58,3 +58,8 @@ void SDL_WSIPlatform::set_window(SDL_Window *_window)
|
||||
{
|
||||
window = _window;
|
||||
}
|
||||
|
||||
void SDL_WSIPlatform::do_resize()
|
||||
{
|
||||
resize = true;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
bool alive(Vulkan::WSI &wsi) override;
|
||||
void poll_input() override;
|
||||
void set_window(SDL_Window *_window);
|
||||
void do_resize();
|
||||
|
||||
private:
|
||||
VkSurfaceKHR surface;
|
||||
|
||||
Reference in New Issue
Block a user