mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-06 02:17:04 +00:00
Should fix breakage of OGL on OSX.
This commit is contained in:
parent
d2b06a92c5
commit
22e8c3d895
@ -116,9 +116,10 @@ void gfx_set_dwm(void)
|
||||
#include "SDL_syswm.h"
|
||||
#include "SDL.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
void gfx_get_window_size(unsigned *width, unsigned *height)
|
||||
{
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#ifdef _WIN32
|
||||
SDL_Event evnt;
|
||||
while (SDL_PollEvent(&evnt));
|
||||
const SDL_VideoInfo *info = SDL_GetVideoInfo();
|
||||
@ -140,4 +141,4 @@ void gfx_get_window_size(unsigned *width, unsigned *height)
|
||||
*height = target.height;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -28,6 +28,8 @@ void gfx_window_title_reset(void);
|
||||
void gfx_set_dwm(void);
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
void gfx_get_window_size(unsigned *width, unsigned *height);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
2
gfx/gl.c
2
gfx/gl.c
@ -706,6 +706,7 @@ static void check_window(gl_t *gl)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __APPLE__ // This check breaks on OSX for some reason. Oh well :)
|
||||
if (!gl->should_resize)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
@ -718,6 +719,7 @@ static void check_window(gl_t *gl)
|
||||
SSNES_LOG("GL: Verified window size: %u x %u\n", gl->win_width, gl->win_height);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool gl_frame(void *data, const void* frame, unsigned width, unsigned height, unsigned pitch, const char *msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user