diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; | |||
65 | static float initialUiScale_ = 1.1f; | 65 | static float initialUiScale_ = 1.1f; |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | static iBool isOpenGLRenderer_; | ||
69 | |||
68 | iDefineTypeConstructionArgs(Window, (iRect rect), rect) | 70 | iDefineTypeConstructionArgs(Window, (iRect rect), rect) |
69 | 71 | ||
70 | /* TODO: Define menus per platform. */ | 72 | /* TODO: Define menus per platform. */ |
@@ -446,6 +448,7 @@ void init_Window(iWindow *d, iRect rect) { | |||
446 | /* Some info. */ { | 448 | /* Some info. */ { |
447 | SDL_RendererInfo info; | 449 | SDL_RendererInfo info; |
448 | SDL_GetRendererInfo(d->render, &info); | 450 | SDL_GetRendererInfo(d->render, &info); |
451 | isOpenGLRenderer_ = !iCmpStr(info.name, "opengl"); | ||
449 | printf("[window] renderer: %s%s\n", info.name, | 452 | printf("[window] renderer: %s%s\n", info.name, |
450 | info.flags & SDL_RENDERER_ACCELERATED ? " (accelerated)" : ""); | 453 | info.flags & SDL_RENDERER_ACCELERATED ? " (accelerated)" : ""); |
451 | #if !defined (NDEBUG) | 454 | #if !defined (NDEBUG) |
@@ -1187,6 +1190,10 @@ iWindow *get_Window(void) { | |||
1187 | return theWindow_; | 1190 | return theWindow_; |
1188 | } | 1191 | } |
1189 | 1192 | ||
1193 | iBool isOpenGLRenderer_Window(void) { | ||
1194 | return isOpenGLRenderer_; | ||
1195 | } | ||
1196 | |||
1190 | void setKeyboardHeight_Window(iWindow *d, int height) { | 1197 | void setKeyboardHeight_Window(iWindow *d, int height) { |
1191 | if (d->keyboardHeight != height) { | 1198 | if (d->keyboardHeight != height) { |
1192 | d->keyboardHeight = height; | 1199 | d->keyboardHeight = height; |