mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
SDL: Make sure a context exists when calling SDL_GL_GetAttribute
This commit is contained in:
parent
f7a55f3251
commit
31caab89e1
@ -248,11 +248,12 @@ void OpenGLSdlGraphics3dManager::setupScreen() {
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
bool needsWindowReset = false;
|
||||
if (_window->getSDLWindow()) {
|
||||
if (_window->getSDLWindow() && SDL_GL_GetCurrentContext()) {
|
||||
// The anti-aliasing setting cannot be changed without recreating the window.
|
||||
// So check if the window needs to be recreated.
|
||||
|
||||
int currentSamples = 0;
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
// SDL_GL_MULTISAMPLESAMPLES isn't available on a WebGL 1.0 context
|
||||
// (or not bridged in Emscripten?). This forces a windows reset.
|
||||
|
Loading…
x
Reference in New Issue
Block a user