summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-15 19:50:22 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-15 19:50:22 +0300
commit32e7104dd03357dfd2032d200c528e88656daa69 (patch)
tree11184efde581fa6edd915bd727ea852db863df1f /src/ui/window.c
parent9d7469ded746cbfa1e86c1ecd67e4a36f29f635b (diff)
parent0cbb300784aab7c8bb6bcbcfb044a48a5f9a19ac (diff)
Merge branch 'dev' into work/v1.7
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c7
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;
65static float initialUiScale_ = 1.1f; 65static float initialUiScale_ = 1.1f;
66#endif 66#endif
67 67
68static iBool isOpenGLRenderer_;
69
68iDefineTypeConstructionArgs(Window, (iRect rect), rect) 70iDefineTypeConstructionArgs(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
1193iBool isOpenGLRenderer_Window(void) {
1194 return isOpenGLRenderer_;
1195}
1196
1190void setKeyboardHeight_Window(iWindow *d, int height) { 1197void setKeyboardHeight_Window(iWindow *d, int height) {
1191 if (d->keyboardHeight != height) { 1198 if (d->keyboardHeight != height) {
1192 d->keyboardHeight = height; 1199 d->keyboardHeight = height;