Lagrange [work/v1.13]

Linux: Build fixes for terminal

=> 5845ae8e445afdabcf648f9f66544cfcab175f89

diff --git a/src/app.c b/src/app.c
index 92b1d641..c663e02b 100644
--- a/src/app.c
+++ b/src/app.c
@@ -544,7 +544,7 @@ static iRect initialWindowRect_App_(const iApp *d, size_t windowIndex) {
     /* Must scale by UI scaling factor. */
     mulfv_I2(&rect.size, desktopDPI_Win32());
 #endif
-#if defined (iPlatformLinux) && !defined (iPlatformAndroid)
+#if defined (iPlatformLinux) && !defined (iPlatformAndroid) && !defined (iPlatformTerminal)
     /* Scale by the primary (?) monitor DPI. */
     if (isRunningUnderWindowSystem_App()) {
         float vdpi;
@@ -891,7 +891,7 @@ static iBool hasCommandLineOpenableScheme_(const iRangecc uri) {
 }
 
 static void init_App_(iApp *d, int argc, char **argv) {
-#if defined (iPlatformLinux) && !defined (iPlatformAndroid)
+#if defined (iPlatformLinux) && !defined (iPlatformAndroid) && !defined (iPlatformTerminal)
     d->isRunningUnderWindowSystem = !iCmpStr(SDL_GetCurrentVideoDriver(), "x11") ||
                                     !iCmpStr(SDL_GetCurrentVideoDriver(), "wayland");
 #else
diff --git a/src/ui/window.c b/src/ui/window.c
index 337eaba5..fa1d01ab 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -332,7 +332,7 @@ static float displayScale_Window_(const iWindow *d) {
          LAGRANGE_OVERRIDE_DPI with the empty string. */
         setenv("LAGRANGE_OVERRIDE_DPI", "", 1);
     }
-#if defined (iPlatformApple)
+#if defined (iPlatformApple) || defined (iPlatformTerminal)
     iUnused(d);
     /* Apple UI sizes are fixed and only scaled by pixel ratio. */
     /* TODO: iOS text size setting? */
@@ -656,7 +656,7 @@ void init_MainWindow(iMainWindow *d, iRect rect) {
     useExecutableIconResource_SDLWindow(d->base.win);
     enableDarkMode_SDLWindow(d->base.win);
 #endif
-#if defined (iPlatformLinux)
+#if defined (iPlatformLinux) && !defined (iPlatformTerminal)
     SDL_SetWindowMinimumSize(d->base.win, minSize.x * d->base.pixelRatio, minSize.y * d->base.pixelRatio);
     /* Load the window icon. */ {
         SDL_Surface *surf = loadImage_(&imageLagrange64_Resources, 0);
@@ -885,7 +885,7 @@ static void savePlace_MainWindow_(iAny *mainWindow) {
         SDL_GetWindowPosition(d->base.win, &newPos.x, &newPos.y);
         d->place.normalRect.pos = newPos;
         iInt2 border = zero_I2();
-#if !defined(iPlatformApple)
+#if !defined(iPlatformApple) && !defined (iPlatformTerminal)
         SDL_GetWindowBordersSize(d->base.win, &border.y, &border.x, NULL, NULL);
         iAssert(~SDL_GetWindowFlags(d->base.win) & SDL_WINDOW_MAXIMIZED);
 #endif
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.13/cdiff/5845ae8e445afdabcf648f9f66544cfcab175f89
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
69.827159 milliseconds
Gemini-to-HTML Time
0.156607 milliseconds

This content has been proxied by September (ba2dc).