From 20f118801d8b18b0dd77ae35c8049ca5d6d9ad44 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 15 Aug 2021 08:45:12 +0300 Subject: SDL 2.0.16 line drawing regression (OpenGL renderer) This is not specific to macOS, but seems to affect OpenGL rendering on all platforms. --- src/ui/window.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index 6b8abb4d..86d22b1c 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -65,6 +65,8 @@ static float initialUiScale_ = 1.0f; static float initialUiScale_ = 1.1f; #endif +static iBool isOpenGLRenderer_; + iDefineTypeConstructionArgs(Window, (iRect rect), rect) /* TODO: Define menus per platform. */ @@ -446,6 +448,7 @@ void init_Window(iWindow *d, iRect rect) { /* Some info. */ { SDL_RendererInfo info; SDL_GetRendererInfo(d->render, &info); + isOpenGLRenderer_ = !iCmpStr(info.name, "opengl"); printf("[window] renderer: %s%s\n", info.name, info.flags & SDL_RENDERER_ACCELERATED ? " (accelerated)" : ""); #if !defined (NDEBUG) @@ -1187,6 +1190,10 @@ iWindow *get_Window(void) { return theWindow_; } +iBool isOpenGLRenderer_Window(void) { + return isOpenGLRenderer_; +} + void setKeyboardHeight_Window(iWindow *d, int height) { if (d->keyboardHeight != height) { d->keyboardHeight = height; -- cgit v1.2.3