mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Resizing windows in 1.2 should not trigger some init code :)
This commit is contained in:
parent
157dcad87b
commit
c2cedb1b6f
2
gfx/gl.c
2
gfx/gl.c
@ -784,7 +784,7 @@ static bool gl_frame(void *data, const void* frame, unsigned width, unsigned hei
|
|||||||
{
|
{
|
||||||
gl->should_resize = false;
|
gl->should_resize = false;
|
||||||
|
|
||||||
sdlwrap_set_video_mode(gl->win_width, gl->win_height, 0, g_settings.video.fullscreen);
|
sdlwrap_set_resize(gl->win_width, gl->win_height);
|
||||||
|
|
||||||
#ifdef HAVE_FBO
|
#ifdef HAVE_FBO
|
||||||
if (!gl->render_to_tex)
|
if (!gl->render_to_tex)
|
||||||
|
@ -170,6 +170,25 @@ bool sdlwrap_set_video_mode(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SDL 1.2 has an awkward model where you need to "confirm" window resizing.
|
||||||
|
// SDL 1.3 luckily removes this quirk.
|
||||||
|
void sdlwrap_set_resize(unsigned width, unsigned height)
|
||||||
|
{
|
||||||
|
#if SDL_MODERN
|
||||||
|
(void)width;
|
||||||
|
(void)height;
|
||||||
|
(void)bits;
|
||||||
|
(void)fullscreen;
|
||||||
|
#else
|
||||||
|
#ifndef __APPLE__ // Resizing on OSX is broken in 1.2 it seems :)
|
||||||
|
static const int resizable = SDL_RESIZABLE;
|
||||||
|
#else
|
||||||
|
static const int resizable = 0;
|
||||||
|
#endif
|
||||||
|
SDL_SetVideoMode(width, height, 0, SDL_OPENGL | (g_fullscreen ? SDL_FULLSCREEN : resizable));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void sdlwrap_wm_set_caption(const char *str)
|
void sdlwrap_wm_set_caption(const char *str)
|
||||||
{
|
{
|
||||||
#if SDL_MODERN
|
#if SDL_MODERN
|
||||||
|
@ -58,6 +58,8 @@ bool sdlwrap_key_pressed(int key);
|
|||||||
void sdlwrap_check_window(bool *quit,
|
void sdlwrap_check_window(bool *quit,
|
||||||
bool *resize, unsigned *width, unsigned *height, unsigned frame_count);
|
bool *resize, unsigned *width, unsigned *height, unsigned frame_count);
|
||||||
|
|
||||||
|
void sdlwrap_set_resize(unsigned width, unsigned height);
|
||||||
|
|
||||||
bool sdlwrap_get_wm_info(SDL_SysWMinfo *info);
|
bool sdlwrap_get_wm_info(SDL_SysWMinfo *info);
|
||||||
|
|
||||||
bool sdlwrap_window_has_focus(void);
|
bool sdlwrap_window_has_focus(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user