summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-20 16:32:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-20 16:32:28 +0300
commit7a4f4db86de9ed610b9968f905f860d3b6272e61 (patch)
tree2dcc8e3f65f41103855ba71a8c90e14827bdd831 /src
parent3a439789b7f84675a84d13bd89b17c5e97f04961 (diff)
iOS: Fixing the build
Diffstat (limited to 'src')
-rw-r--r--src/fontpack.h3
-rw-r--r--src/ui/sidebarwidget.c2
-rw-r--r--src/ui/window.c5
3 files changed, 8 insertions, 2 deletions
diff --git a/src/fontpack.h b/src/fontpack.h
index 5d592822..d86de945 100644
--- a/src/fontpack.h
+++ b/src/fontpack.h
@@ -131,7 +131,8 @@ struct Impl_FontSpec {
131}; 131};
132 132
133iLocalDef int scaleType_FontSpec(enum iFontSize sizeId) { 133iLocalDef int scaleType_FontSpec(enum iFontSize sizeId) {
134 return sizeId / contentRegular_FontSize; 134 iAssert(sizeId >= 0 && sizeId < max_FontSize);
135 return sizeId < contentRegular_FontSize ? 0 : 1;
135} 136}
136 137
137/*----------------------------------------------------------------------------------------------*/ 138/*----------------------------------------------------------------------------------------------*/
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 42661f6b..821f8118 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -743,7 +743,7 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {
743#if defined (iPlatformMobile) 743#if defined (iPlatformMobile)
744 if (deviceType_App() == phone_AppDeviceType) { 744 if (deviceType_App() == phone_AppDeviceType) {
745 d->itemFonts[0] = uiLabelBig_FontId; 745 d->itemFonts[0] = uiLabelBig_FontId;
746 d->itemFonts[1] = defaultBigBold_FontId; 746 d->itemFonts[1] = uiLabelBigBold_FontId;
747 } 747 }
748 d->widthAsGaps = 73.0f; 748 d->widthAsGaps = 73.0f;
749#else 749#else
diff --git a/src/ui/window.c b/src/ui/window.c
index 569ec919..83dae427 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -537,6 +537,7 @@ void init_MainWindow(iMainWindow *d, iRect rect) {
537#elif defined (iPlatformAppleMobile) 537#elif defined (iPlatformAppleMobile)
538 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); 538 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");
539 flags |= SDL_WINDOW_METAL; 539 flags |= SDL_WINDOW_METAL;
540 d->base.isExposed = iTrue;
540#else 541#else
541 if (!forceSoftwareRender_App()) { 542 if (!forceSoftwareRender_App()) {
542 flags |= SDL_WINDOW_OPENGL; 543 flags |= SDL_WINDOW_OPENGL;
@@ -615,7 +616,11 @@ void init_MainWindow(iMainWindow *d, iRect rect) {
615 SDL_EventState(SDL_SYSWMEVENT, SDL_TRUE); 616 SDL_EventState(SDL_SYSWMEVENT, SDL_TRUE);
616 } 617 }
617#endif 618#endif
619#if defined (iPlatformDesktop)
618 SDL_HideWindow(d->base.win); 620 SDL_HideWindow(d->base.win);
621#else
622 SDL_ShowWindow(d->base.win);
623#endif
619} 624}
620 625
621void deinit_MainWindow(iMainWindow *d) { 626void deinit_MainWindow(iMainWindow *d) {