Lagrange [dev]

TUI: Fixed build

=> e8295f0065e8ecddab2e291e420098ac7981e0a9

diff --git a/src/ui/keys.c b/src/ui/keys.c
index 065325a7..0e0621d4 100644
--- a/src/ui/keys.c
+++ b/src/ui/keys.c
@@ -506,10 +506,14 @@ const iPtrArray *list_Keys(void) {
 }
 
 iBool isDown_Keys(const iBinding *binding) {
+#if defined (iPlatformTerminal)
+    return iFalse;
+#else
     int numKeys = 0;
     const uint8_t *keys = SDL_GetKeyboardState(&numKeys);
     const int scancode = SDL_GetScancodeFromKey(binding->key);
     const int scancode2 = (scancode == SDL_SCANCODE_RALT ? SDL_SCANCODE_LALT :
                            scancode == SDL_SCANCODE_LALT ? SDL_SCANCODE_RALT : scancode);
     return (scancode < numKeys && keys[scancode]) || (scancode2 < numKeys && keys[scancode2]);
+#endif
 }
diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c
index a975630e..06b2cb6b 100644
--- a/src/ui/text_simple.c
+++ b/src/ui/text_simple.c
@@ -63,7 +63,7 @@ iLocalDef iBool isMeasuring_(enum iRunMode mode) {
 }
 
 static void runSimple_Font_(iFont *d, const iRunArgs *args) {
-    /* This function shapes text using a simplified, incomplete algorithm. It works for English 
+    /* This function shapes text using a simplified, incomplete algorithm. It works for English
        and other non-complex LTR scripts. Composed glyphs are not supported (must rely on text
        being in a pre-composed form). This algorithm is used if HarfBuzz is not available. */
     const iInt2 orig        = args->pos;
@@ -146,7 +146,11 @@ static void runSimple_Font_(iFont *d, const iRunArgs *args) {
                     iColor clr = get_Color(args->color);
                     ansiColors_Color(capturedRange_RegExpMatch(&m, 1),
                                      current_Text()->baseFgColorId,
-                                     none_ColorId, &clr, NULL);
+                                     none_ColorId,
+                                     iFalse,
+                                     &clr,
+                                     NULL,
+                                     NULL);
 #if defined (LAGRANGE_ENABLE_STB_TRUETYPE)
                     SDL_SetTextureColorMod(cache, clr.r, clr.g, clr.b);
 #endif
diff --git a/src/ui/util.c b/src/ui/util.c
index a31a629d..29ef6093 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1531,10 +1531,12 @@ void openMenuAnchorFlags_Widget(iWidget *d, iRect windowAnchorRect, int menuOpen
                 }
             }
             iWindow *win = newPopup_Window(menuPos, d); /* window takes the widget */
+#if !defined (iPlatformTerminal)
             if (isFromMenuBar && menuPos.y + menuSize.y > bottom_Rect(displayRect)) {
                 const int maxMenuHeight = bottom_Rect(displayRect) - menuPos.y;
                 SDL_SetWindowMaximumSize(win->win, displayRect.size.x, maxMenuHeight);
             }
+#endif
             setCurrent_Window(win);
             SDL_SetWindowTitle(win->win, "Menu");
             arrange_Widget(d);
diff --git a/src/ui/window.c b/src/ui/window.c
index 769d089c..a14c02db 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -783,7 +783,7 @@ void init_MainWindow(iMainWindow *d, iRect rect) {
         SDL_Surface *surf = loadImage_(&imageLogo_Resources, 0);
         d->logo = SDL_CreateTextureFromSurface(d->base.render, surf);
         SDL_SetTextureBlendMode(d->logo, SDL_BLENDMODE_BLEND);
-#if SDL_VERSION_ATLEAST(2, 0, 12)
+#if SDL_VERSION_ATLEAST(2, 0, 12) && !defined (iPlatformTerminal)
         SDL_SetTextureScaleMode(d->logo, SDL_ScaleModeBest);
 #endif
         free(surf->pixels);
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/dev/cdiff/e8295f0065e8ecddab2e291e420098ac7981e0a9
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
28.814551 milliseconds
Gemini-to-HTML Time
0.169702 milliseconds

This content has been proxied by September (ba2dc).