Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package limine for openSUSE:Factory checked 
in at 2025-12-11 18:40:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/limine (Old)
 and      /work/SRC/openSUSE:Factory/.limine.new.1939 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "limine"

Thu Dec 11 18:40:32 2025 rev:27 rq:1322149 version:10.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/limine/limine.changes    2025-12-01 
11:15:26.311883779 +0100
+++ /work/SRC/openSUSE:Factory/.limine.new.1939/limine.changes  2025-12-11 
18:43:16.358341728 +0100
@@ -1,0 +2,9 @@
+Thu Dec 11 08:23:47 UTC 2025 - Marvin Friedrich <[email protected]>
+
+- Update to 10.5.0:
+  * Add new `interface_help_colour` global configuration file option to
+    allow changing the colour of "helper" messages in the interface.
+  * Add new `interface_rotation` global configuration option to allow
+    rotating the output interface be 0, 90, 180, or 270 degrees.
+
+-------------------------------------------------------------------

Old:
----
  limine-10.4.0.tar.gz

New:
----
  limine-10.5.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ limine.spec ++++++
--- /var/tmp/diff_new_pack.IWCReW/_old  2025-12-11 18:43:17.714398704 +0100
+++ /var/tmp/diff_new_pack.IWCReW/_new  2025-12-11 18:43:17.738399712 +0100
@@ -15,7 +15,7 @@
 #
 
 Name:           limine
-Version:        10.4.0
+Version:        10.5.0
 Release:        0
 Summary:        Modern, advanced, portable, multiprotocol bootloader and boot 
manager
 License:        BSD-2-Clause

++++++ limine-10.4.0.tar.gz -> limine-10.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/CONFIG.md new/limine-10.5.0/CONFIG.md
--- old/limine-10.4.0/CONFIG.md 2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/CONFIG.md 2025-12-11 06:19:26.000000000 +0100
@@ -120,23 +120,29 @@
   Limine will pick a resolution automatically. If the resolution is not
   available, Limine will pick another one automatically. Ignored if using text
   mode.
+* `interface_rotation` - Specifies the rotation of the Limine interface.
+  It can be any of the following values: `0`, `90`, `180`, `270`. Default is 
`0`.
 * `interface_branding` - A string that will be displayed on top of the Limine
   interface.
 * `interface_branding_colour` - A value between 0 and 7 specifying the colour
-  of the branding string.
-  | Code | Color          |
-  |------|----------------|
-  | 0    | Black          |
-  | 1    | Red            |
-  | 2    | Green          |
-  | 3    | Yellow         |
-  | 4    | Blue           |
-  | 5    | Magenta        |
-  | 6    | Cyan (Default) |
-  | 7    | White          |
+  of the branding string. See below for a table of colours. Default is `6`.
 * `interface_branding_color` - Alias of `interface_branding_colour`.
 * `interface_help_hidden` - Hides the help text located at the top of the
   screen showing the key bindings.
+* `interface_help_colour` - A value between 0 and 7 specifying the colour
+  of the help strings. See below for a table of colours. Default is `2`.
+* `interface_help_color` - Alias of `interface_help_colour`.
+
+ | Code | Color   |
+ |------|---------|
+ | 0    | Black   |
+ | 1    | Red     |
+ | 2    | Green   |
+ | 3    | Yellow  |
+ | 4    | Blue    |
+ | 5    | Magenta |
+ | 6    | Cyan    |
+ | 7    | Gray    |
 
 Limine graphical terminal control options:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/ChangeLog new/limine-10.5.0/ChangeLog
--- old/limine-10.4.0/ChangeLog 2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/ChangeLog 2025-12-11 06:19:26.000000000 +0100
@@ -1,3 +1,15 @@
+2025-12-11  Mintsuki  <[email protected]>
+
+    *** Release 10.5.0 ***
+
+    Noteworthy changes compared to the previous release, 10.4.0:
+
+    New features:
+        - Add new `interface_help_colour` global configuration file option to
+          allow changing the colour of "helper" messages in the interface.
+        - Add new `interface_rotation` global configuration option to allow
+          rotating the output interface be 0, 90, 180, or 270 degrees.
+
 2025-11-30  Mintsuki  <[email protected]>
 
     *** Release 10.4.0 ***
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/bootstrap new/limine-10.5.0/bootstrap
--- old/limine-10.4.0/bootstrap 2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/bootstrap 2025-12-11 06:19:26.000000000 +0100
@@ -104,7 +104,7 @@
     clone_repo_commit \
         https://codeberg.org/Mintsuki/Flanterm.git \
         flanterm \
-        ea6a6cdecf3b830f2a8cb4ffe3e58098937224c3
+        f9d424145bdde18872714094434797e2f44ff5b4
 
     download_by_hash \
         
https://github.com/nothings/stb/raw/5c205738c191bcb0abc65c4febfa9bd25ff35234/stb_image.h
 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/common/lib/gterm.c 
new/limine-10.5.0/common/lib/gterm.c
--- old/limine-10.4.0/common/lib/gterm.c        2025-11-30 01:56:35.000000000 
+0100
+++ new/limine-10.5.0/common/lib/gterm.c        2025-12-11 06:19:26.000000000 
+0100
@@ -525,6 +525,18 @@
     margin = 64;
     margin_gradient = 4;
 
+    int fb_rotation = FLANTERM_FB_ROTATE_0;
+    char *rotation_str = config_get_value(config, 0, "INTERFACE_ROTATION");
+    if (rotation_str != NULL) {
+        int rotation_val = strtoui(rotation_str, NULL, 10);
+        switch (rotation_val) {
+            case 90: fb_rotation = FLANTERM_FB_ROTATE_90; break;
+            case 180: fb_rotation = FLANTERM_FB_ROTATE_180; break;
+            case 270: fb_rotation = FLANTERM_FB_ROTATE_270; break;
+        }
+        pmm_free(rotation_str, strlen(rotation_str) + 1);
+    }
+
     uint32_t ansi_colours[8];
 
     ansi_colours[0] = 0x00000000; // black
@@ -713,6 +725,12 @@
             continue;
         }
 
+        if (fb_rotation == FLANTERM_FB_ROTATE_90 || fb_rotation == 
FLANTERM_FB_ROTATE_270) {
+            uint64_t tmp = fb->framebuffer_width;
+            fb->framebuffer_width = fb->framebuffer_height;
+            fb->framebuffer_height = tmp;
+        }
+
         if (background != NULL) {
             char *background_layout = config_get_value(config, 0, 
"WALLPAPER_STYLE");
             if (background_layout != NULL && strcmp(background_layout, 
"centered") == 0) {
@@ -740,6 +758,12 @@
             }
         }
 
+        if (fb_rotation == FLANTERM_FB_ROTATE_90 || fb_rotation == 
FLANTERM_FB_ROTATE_270) {
+            uint64_t tmp = fb->framebuffer_width;
+            fb->framebuffer_width = fb->framebuffer_height;
+            fb->framebuffer_height = tmp;
+        }
+
         terms[terms_i] = flanterm_fb_init(ext_mem_alloc,
                             pmm_free,
                             (void *)(uintptr_t)fb->framebuffer_addr,
@@ -753,7 +777,7 @@
                             &default_bg_bright, &default_fg_bright,
                             font, font_width, font_height, font_spacing,
                             font_scale_x, font_scale_y,
-                            margin);
+                            margin, fb_rotation);
 
         if (terms[terms_i] != NULL) {
             terms_i++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/common/lib/libc.s2.c 
new/limine-10.5.0/common/lib/libc.s2.c
--- old/limine-10.4.0/common/lib/libc.s2.c      2025-11-30 01:56:35.000000000 
+0100
+++ new/limine-10.5.0/common/lib/libc.s2.c      2025-12-11 06:19:26.000000000 
+0100
@@ -62,31 +62,37 @@
 
 int strcmp(const char *s1, const char *s2) {
     for (size_t i = 0; ; i++) {
-        char c1 = s1[i], c2 = s2[i];
-        if (c1 != c2)
+        unsigned char c1 = ((unsigned char *)s1)[i], c2 = ((unsigned char 
*)s2)[i];
+        if (c1 != c2) {
             return c1 < c2 ? -1 : 1;
-        if (!c1)
+        }
+        if (c1 == 0) {
             return 0;
+        }
     }
 }
 
 int strcasecmp(const char *s1, const char *s2) {
     for (size_t i = 0; ; i++) {
-        char c1 = s1[i], c2 = s2[i];
-        if (tolower(c1) != tolower(c2))
+        unsigned char c1 = ((unsigned char *)s1)[i], c2 = ((unsigned char 
*)s2)[i];
+        if (tolower(c1) != tolower(c2)) {
             return c1 < c2 ? -1 : 1;
-        if (!c1)
+        }
+        if (c1 == 0) {
             return 0;
+        }
     }
 }
 
 int strncmp(const char *s1, const char *s2, size_t n) {
     for (size_t i = 0; i < n; i++) {
-        char c1 = s1[i], c2 = s2[i];
-        if (c1 != c2)
+        unsigned char c1 = ((unsigned char *)s1)[i], c2 = ((unsigned char 
*)s2)[i];
+        if (c1 != c2) {
             return c1 < c2 ? -1 : 1;
-        if (!c1)
+        }
+        if (c1 == 0) {
             return 0;
+        }
     }
 
     return 0;
@@ -94,11 +100,13 @@
 
 int strncasecmp(const char *s1, const char *s2, size_t n) {
     for (size_t i = 0; i < n; i++) {
-        char c1 = s1[i], c2 = s2[i];
-        if (tolower(c1) != tolower(c2))
+        unsigned char c1 = ((unsigned char *)s1)[i], c2 = ((unsigned char 
*)s2)[i];
+        if (tolower(c1) != tolower(c2)) {
             return c1 < c2 ? -1 : 1;
-        if (!c1)
+        }
+        if (c1 == 0) {
             return 0;
+        }
     }
 
     return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/common/lib/term.c 
new/limine-10.5.0/common/lib/term.c
--- old/limine-10.4.0/common/lib/term.c 2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/common/lib/term.c 2025-12-11 06:19:26.000000000 +0100
@@ -295,7 +295,8 @@
             NULL, NULL,
             NULL, 0, 0, 1,
             0, 0,
-            0
+            0,
+            FLANTERM_FB_ROTATE_0
         );
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/common/lib/uri.c 
new/limine-10.5.0/common/lib/uri.c
--- old/limine-10.4.0/common/lib/uri.c  2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/common/lib/uri.c  2025-12-11 06:19:26.000000000 +0100
@@ -28,7 +28,7 @@
         if (strlen(uri + i) < 1)
             return false;
 
-        if (!memcmp(uri + i, "(", 1)) {
+        if (!strncmp(uri + i, "(", 1)) {
             *resource = uri;
             uri[i] = 0;
             uri += i + 1;
@@ -41,7 +41,7 @@
         if (strlen(uri + i) < 3)
             return false;
 
-        if (!memcmp(uri + i, "):/", 3)) {
+        if (!strncmp(uri + i, "):/", 3)) {
             *root = uri;
             uri[i] = 0;
             uri += i + 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/common/menu.c 
new/limine-10.5.0/common/menu.c
--- old/limine-10.4.0/common/menu.c     2025-11-30 01:56:35.000000000 +0100
+++ new/limine-10.5.0/common/menu.c     2025-12-11 06:19:26.000000000 +0100
@@ -35,6 +35,9 @@
 #define TOK_BADKEY 3
 #define TOK_COMMENT 4
 
+static char interface_help_colour[] = "\e[32m";
+static char interface_help_colour_bright[] = "\e[92m";
+
 static char *menu_branding = NULL;
 static char *menu_branding_colour = NULL;
 no_unwind bool booting_from_editor = false;
@@ -234,7 +237,7 @@
         print("\n\n");
     }
 
-    print("    \e[32mESC\e[0m Discard and Exit    \e[32mF10\e[0m Boot\n\n");
+    print("    %sESC\e[0m Discard and Exit    %sF10\e[0m Boot\n\n", 
interface_help_colour, interface_help_colour);
 
     print(serial ? "/" : "┌");
     for (size_t i = 0; i < terms[0]->cols - 2; i++) {
@@ -817,6 +820,16 @@
         help_hidden = strcmp(help_hidden_str, "yes") == 0;
     }
 
+    char *interface_help_colour_str = config_get_value(NULL, 0, 
"INTERFACE_HELP_COLOUR");
+    if (interface_help_colour_str == NULL) {
+        interface_help_colour_str = config_get_value(NULL, 0, 
"INTERFACE_HELP_COLOR");
+    }
+    if (interface_help_colour_str != NULL) {
+        interface_help_colour[3] = interface_help_colour_str[0];
+        interface_help_colour_bright[3] = interface_help_colour_str[0];
+        pmm_free(interface_help_colour_str, strlen(interface_help_colour_str) 
+ 1);
+    }
+
     menu_branding = config_get_value(NULL, 0, "INTERFACE_BRANDING");
     if (menu_branding == NULL) {
 #if defined (BIOS)
@@ -1004,22 +1017,24 @@
             set_cursor_pos_helper(0, 3);
             if (max_entries != 0) {
                 if (selected_menu_entry->sub == NULL) {
-                    print("    \e[32mARROWS\e[0m Select    \e[32mENTER\e[0m 
Boot    %s",
-                          editor_enabled ? "\e[32mE\e[0m Edit" : "");
+                    print("    %sARROWS\e[0m Select    %sENTER\e[0m Boot    
%s%s",
+                          interface_help_colour, interface_help_colour, 
interface_help_colour,
+                          editor_enabled ? "E\e[0m Edit" : "\e[0m");
                 } else {
-                    print("    \e[32mARROWS\e[0m Select    \e[32mENTER\e[0m 
%s",
+                    print("    %sARROWS\e[0m Select    %sENTER\e[0m %s",
+                          interface_help_colour, interface_help_colour,
                           selected_menu_entry->expanded ? "Collapse" : 
"Expand");
                 }
             }
 #if defined(UEFI)
             if (reboot_to_firmware_supported) {
                 set_cursor_pos_helper(terms[0]->cols - (editor_enabled ? 37 : 
20), 3);
-                print("\e[32mS\e[0m Firmware Setup");
+                print("%sS\e[0m Firmware Setup", interface_help_colour);
             }
 #endif
             if (editor_enabled) {
                 set_cursor_pos_helper(terms[0]->cols - 17, 3);
-                print("\e[32mB\e[0m Blank Entry");
+                print("%sB\e[0m Blank Entry", interface_help_colour);
             }
         }
         set_cursor_pos_helper(x, y);
@@ -1035,7 +1050,8 @@
         for (size_t i = timeout; i; i--) {
             set_cursor_pos_helper(0, terms[0]->rows - 1);
             FOR_TERM(TERM->scroll_enabled = false);
-            print("\e[2K\e[32mBooting automatically in \e[92m%u\e[32m, press 
any key to stop the countdown...\e[0m", i);
+            print("\e[2K%sBooting automatically in %s%u%s, press any key to 
stop the countdown...\e[0m",
+                  interface_help_colour, interface_help_colour_bright, i, 
interface_help_colour);
             FOR_TERM(TERM->scroll_enabled = true);
             FOR_TERM(TERM->double_buffer_flush(TERM));
             if ((c = pit_sleep_and_quit_on_keypress(1))) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/configure new/limine-10.5.0/configure
--- old/limine-10.4.0/configure 2025-11-30 01:56:40.000000000 +0100
+++ new/limine-10.5.0/configure 2025-12-11 06:19:30.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for Limine 10.4.0.
+# Generated by GNU Autoconf 2.72 for Limine 10.5.0.
 #
 # Report bugs to <https://codeberg.org/Limine/Limine/issues>.
 #
@@ -604,8 +604,8 @@
 # Identity of this package.
 PACKAGE_NAME='Limine'
 PACKAGE_TARNAME='limine'
-PACKAGE_VERSION='10.4.0'
-PACKAGE_STRING='Limine 10.4.0'
+PACKAGE_VERSION='10.5.0'
+PACKAGE_STRING='Limine 10.5.0'
 PACKAGE_BUGREPORT='https://codeberg.org/Limine/Limine/issues'
 PACKAGE_URL='https://limine-bootloader.org/'
 
@@ -1324,7 +1324,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures Limine 10.4.0 to adapt to many kinds of systems.
+'configure' configures Limine 10.5.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1390,7 +1390,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Limine 10.4.0:";;
+     short | recursive ) echo "Configuration of Limine 10.5.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1509,7 +1509,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Limine configure 10.4.0
+Limine configure 10.5.0
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1621,7 +1621,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Limine $as_me 10.4.0, which was
+It was created by Limine $as_me 10.5.0, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -6334,7 +6334,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Limine $as_me 10.4.0, which was
+This file was extended by Limine $as_me 10.5.0, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6390,7 +6390,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-Limine config.status 10.4.0
+Limine config.status 10.5.0
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/flanterm/src/flanterm_backends/fb.c 
new/limine-10.5.0/flanterm/src/flanterm_backends/fb.c
--- old/limine-10.4.0/flanterm/src/flanterm_backends/fb.c       2025-11-30 
01:56:36.000000000 +0100
+++ new/limine-10.5.0/flanterm/src/flanterm_backends/fb.c       2025-12-11 
06:19:27.000000000 +0100
@@ -481,10 +481,38 @@
     y = ctx->offset_y + y * ctx->glyph_height;
 
     bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
+
+    volatile uint32_t *dest;
+    int outer_stride, inner_stride;
+
+    switch (ctx->rotation) {
+        default:
+        case FLANTERM_FB_ROTATE_0:
+            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
+            outer_stride = ctx->pitch / 4;
+            inner_stride = 1;
+            break;
+        case FLANTERM_FB_ROTATE_90:
+            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch 
/ 4);
+            outer_stride = -1;
+            inner_stride = ctx->pitch / 4;
+            break;
+        case FLANTERM_FB_ROTATE_180:
+            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 
- y) * (ctx->pitch / 4);
+            outer_stride = -(ctx->pitch / 4);
+            inner_stride = -1;
+            break;
+        case FLANTERM_FB_ROTATE_270:
+            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 
4);
+            outer_stride = 1;
+            inner_stride = -(ctx->pitch / 4);
+            break;
+    }
+
     // naming: fx,fy for font coordinates, gx,gy for glyph coordinates
     for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
         uint8_t fy = gy / ctx->font_scale_y;
-        volatile uint32_t *fb_line = ctx->framebuffer + x + (y + gy) * 
(ctx->pitch / 4);
+        volatile uint32_t *fb_line = dest;
         uint32_t *canvas_line = ctx->canvas + x + (y + gy) * ctx->width;
         bool *glyph_pointer = glyph + (fy * ctx->font_width);
         for (size_t fx = 0; fx < ctx->font_width; fx++) {
@@ -492,10 +520,12 @@
                 size_t gx = ctx->font_scale_x * fx + i;
                 uint32_t bg = c->bg == 0xffffffff ? canvas_line[gx] : c->bg;
                 uint32_t fg = c->fg == 0xffffffff ? canvas_line[gx] : c->fg;
-                fb_line[gx] = *glyph_pointer ? fg : bg;
+                *fb_line = *glyph_pointer ? fg : bg;
+                fb_line += inner_stride;
             }
             glyph_pointer++;
         }
+        dest += outer_stride;
     }
 }
 
@@ -515,18 +545,47 @@
     y = ctx->offset_y + y * ctx->glyph_height;
 
     bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
+
+    volatile uint32_t *dest;
+    int outer_stride, inner_stride;
+
+    switch (ctx->rotation) {
+        default:
+        case FLANTERM_FB_ROTATE_0:
+            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
+            outer_stride = ctx->pitch / 4;
+            inner_stride = 1;
+            break;
+        case FLANTERM_FB_ROTATE_90:
+            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch 
/ 4);
+            outer_stride = -1;
+            inner_stride = ctx->pitch / 4;
+            break;
+        case FLANTERM_FB_ROTATE_180:
+            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 
- y) * (ctx->pitch / 4);
+            outer_stride = -(ctx->pitch / 4);
+            inner_stride = -1;
+            break;
+        case FLANTERM_FB_ROTATE_270:
+            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 
4);
+            outer_stride = 1;
+            inner_stride = -(ctx->pitch / 4);
+            break;
+    }
+
     // naming: fx,fy for font coordinates, gx,gy for glyph coordinates
     for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
         uint8_t fy = gy / ctx->font_scale_y;
-        volatile uint32_t *fb_line = ctx->framebuffer + x + (y + gy) * 
(ctx->pitch / 4);
+        volatile uint32_t *fb_line = dest;
         bool *glyph_pointer = glyph + (fy * ctx->font_width);
         for (size_t fx = 0; fx < ctx->font_width; fx++) {
             for (size_t i = 0; i < ctx->font_scale_x; i++) {
-                size_t gx = ctx->font_scale_x * fx + i;
-                fb_line[gx] = *glyph_pointer ? fg : bg;
+                *fb_line = *glyph_pointer ? fg : bg;
+                fb_line += inner_stride;
             }
             glyph_pointer++;
         }
+        dest += outer_stride;
     }
 }
 
@@ -541,16 +600,46 @@
     y = ctx->offset_y + y * ctx->glyph_height;
 
     bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
+
+    volatile uint32_t *dest;
+    int outer_stride, inner_stride;
+
+    switch (ctx->rotation) {
+        default:
+        case FLANTERM_FB_ROTATE_0:
+            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
+            outer_stride = ctx->pitch / 4;
+            inner_stride = 1;
+            break;
+        case FLANTERM_FB_ROTATE_90:
+            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch 
/ 4);
+            outer_stride = -1;
+            inner_stride = ctx->pitch / 4;
+            break;
+        case FLANTERM_FB_ROTATE_180:
+            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 
- y) * (ctx->pitch / 4);
+            outer_stride = -(ctx->pitch / 4);
+            inner_stride = -1;
+            break;
+        case FLANTERM_FB_ROTATE_270:
+            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 
4);
+            outer_stride = 1;
+            inner_stride = -(ctx->pitch / 4);
+            break;
+    }
+
     // naming: fx,fy for font coordinates, gx,gy for glyph coordinates
     for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
-        volatile uint32_t *fb_line = ctx->framebuffer + x + (y + gy) * 
(ctx->pitch / 4);
+        volatile uint32_t *fb_line = dest;
         uint32_t *canvas_line = ctx->canvas + x + (y + gy) * ctx->width;
         bool *glyph_pointer = glyph + (gy * ctx->font_width);
         for (size_t fx = 0; fx < ctx->font_width; fx++) {
             uint32_t bg = c->bg == 0xffffffff ? canvas_line[fx] : c->bg;
             uint32_t fg = c->fg == 0xffffffff ? canvas_line[fx] : c->fg;
-            fb_line[fx] = *(glyph_pointer++) ? fg : bg;
+            *fb_line = *(glyph_pointer++) ? fg : bg;
+            fb_line += inner_stride;
         }
+        dest += outer_stride;
     }
 }
 
@@ -570,13 +659,43 @@
     y = ctx->offset_y + y * ctx->glyph_height;
 
     bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
+
+    volatile uint32_t *dest;
+    int outer_stride, inner_stride;
+
+    switch (ctx->rotation) {
+        default:
+        case FLANTERM_FB_ROTATE_0:
+            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
+            outer_stride = ctx->pitch / 4;
+            inner_stride = 1;
+            break;
+        case FLANTERM_FB_ROTATE_90:
+            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch 
/ 4);
+            outer_stride = -1;
+            inner_stride = ctx->pitch / 4;
+            break;
+        case FLANTERM_FB_ROTATE_180:
+            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 
- y) * (ctx->pitch / 4);
+            outer_stride = -(ctx->pitch / 4);
+            inner_stride = -1;
+            break;
+        case FLANTERM_FB_ROTATE_270:
+            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 
4);
+            outer_stride = 1;
+            inner_stride = -(ctx->pitch / 4);
+            break;
+    }
+
     // naming: fx,fy for font coordinates, gx,gy for glyph coordinates
     for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
-        volatile uint32_t *fb_line = ctx->framebuffer + x + (y + gy) * 
(ctx->pitch / 4);
+        volatile uint32_t *fb_line = dest;
         bool *glyph_pointer = glyph + (gy * ctx->font_width);
         for (size_t fx = 0; fx < ctx->font_width; fx++) {
-            fb_line[fx] = *(glyph_pointer++) ? fg : bg;
+            *fb_line = *(glyph_pointer++) ? fg : bg;
+            fb_line += inner_stride;
         }
+        dest += outer_stride;
     }
 }
 
@@ -876,10 +995,27 @@
 
     for (size_t y = 0; y < ctx->height; y++) {
         for (size_t x = 0; x < ctx->width; x++) {
+            size_t px, py;
+            switch (ctx->rotation) {
+                default:
+                case FLANTERM_FB_ROTATE_0:
+                    px = x; py = y;
+                    break;
+                case FLANTERM_FB_ROTATE_90:
+                    px = ctx->height - 1 - y; py = x;
+                    break;
+                case FLANTERM_FB_ROTATE_180:
+                    px = ctx->width - 1 - x; py = ctx->height - 1 - y;
+                    break;
+                case FLANTERM_FB_ROTATE_270:
+                    px = y; py = ctx->width - 1 - x;
+                    break;
+            }
+
             if (ctx->canvas != NULL) {
-                ctx->framebuffer[y * (ctx->pitch / sizeof(uint32_t)) + x] = 
ctx->canvas[y * ctx->width + x];
+                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = 
ctx->canvas[y * ctx->width + x];
             } else {
-                ctx->framebuffer[y * (ctx->pitch / sizeof(uint32_t)) + x] = 
default_bg;
+                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = 
default_bg;
             }
         }
     }
@@ -939,8 +1075,15 @@
     uint32_t *default_bg_bright, uint32_t *default_fg_bright,
     void *font, size_t font_width, size_t font_height, size_t font_spacing,
     size_t font_scale_x, size_t font_scale_y,
-    size_t margin
+    size_t margin,
+    int rotation
 ) {
+    if (rotation == FLANTERM_FB_ROTATE_90 || rotation == 
FLANTERM_FB_ROTATE_270) {
+        size_t tmp = width;
+        width = height;
+        height = tmp;
+    }
+
     if (font_scale_x == 0 || font_scale_y == 0) {
         font_scale_x = 1;
         font_scale_y = 1;
@@ -1055,6 +1198,8 @@
     ctx->text_fg = ctx->default_fg;
     ctx->text_bg = 0xffffffff;
 
+    ctx->rotation = rotation;
+
     ctx->framebuffer = (void *)framebuffer;
     ctx->width = width;
     ctx->height = height;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/flanterm/src/flanterm_backends/fb.h 
new/limine-10.5.0/flanterm/src/flanterm_backends/fb.h
--- old/limine-10.4.0/flanterm/src/flanterm_backends/fb.h       2025-11-30 
01:56:36.000000000 +0100
+++ new/limine-10.5.0/flanterm/src/flanterm_backends/fb.h       2025-12-11 
06:19:27.000000000 +0100
@@ -42,6 +42,11 @@
 
 #endif
 
+#define FLANTERM_FB_ROTATE_0 0
+#define FLANTERM_FB_ROTATE_90 1
+#define FLANTERM_FB_ROTATE_180 2
+#define FLANTERM_FB_ROTATE_270 3
+
 struct flanterm_context *flanterm_fb_init(
     /* If _malloc and _free are nulled, use the bump allocated instance (1 use 
only). */
     void *(*_malloc)(size_t size),
@@ -58,7 +63,9 @@
     void *font, size_t font_width, size_t font_height, size_t font_spacing,
     /* If scale_x and scale_y are 0, automatically scale font based on 
resolution. */
     size_t font_scale_x, size_t font_scale_y,
-    size_t margin
+    size_t margin,
+    /* One of FLANTERM_FB_ROTATE_* values. */
+    int rotation
 );
 
 void flanterm_fb_set_flush_callback(struct flanterm_context *ctx, void 
(*flush_callback)(volatile void *address, size_t length));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/limine-10.4.0/flanterm/src/flanterm_backends/fb_private.h 
new/limine-10.5.0/flanterm/src/flanterm_backends/fb_private.h
--- old/limine-10.4.0/flanterm/src/flanterm_backends/fb_private.h       
2025-11-30 01:56:36.000000000 +0100
+++ new/limine-10.5.0/flanterm/src/flanterm_backends/fb_private.h       
2025-12-11 06:19:27.000000000 +0100
@@ -77,6 +77,8 @@
     uint8_t green_mask_size, green_mask_shift;
     uint8_t blue_mask_size, blue_mask_shift;
 
+    int rotation;
+
     size_t font_bits_size;
     uint8_t *font_bits;
     size_t font_bool_size;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/timestamps new/limine-10.5.0/timestamps
--- old/limine-10.4.0/timestamps        2025-11-30 01:56:37.000000000 +0100
+++ new/limine-10.5.0/timestamps        2025-12-11 06:19:27.000000000 +0100
@@ -1,3 +1,3 @@
-REGEN_DATE="November 2025"
-SOURCE_DATE_EPOCH="1764463125"
-SOURCE_DATE_EPOCH_TOUCH="202511300138"
+REGEN_DATE="December 2025"
+SOURCE_DATE_EPOCH="1765429397"
+SOURCE_DATE_EPOCH_TOUCH="202512110603"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/limine-10.4.0/version new/limine-10.5.0/version
--- old/limine-10.4.0/version   2025-11-30 01:56:40.000000000 +0100
+++ new/limine-10.5.0/version   2025-12-11 06:19:30.000000000 +0100
@@ -1 +1 @@
-10.4.0
+10.5.0

Reply via email to