From 2eb0c77a8771ef08b1fefa73814d19ffcc756179 Mon Sep 17 00:00:00 2001 From: Valerio Date: Sun, 19 Oct 2025 11:42:47 +0200 Subject: [PATCH] window title in OSD --- src/unix/unix_osd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/unix/unix_osd.c b/src/unix/unix_osd.c index f6037cbbd..9e9efc645 100644 --- a/src/unix/unix_osd.c +++ b/src/unix/unix_osd.c @@ -43,6 +43,10 @@ extern SDL_mutex *sdl_mutex; // interface back to main unix monitor implementation extern void unix_executeLine(char *line); +// interface to the currently set window title, this can't be seen normally in a fullscreen setup +extern wchar_t sdl_win_title[512]; +char sdl_win_title_mb[512] = ""; + static SDL_Texture *font_texture = NULL; typedef enum { @@ -177,6 +181,12 @@ void draw_menu(SDL_Renderer *renderer, int selected) draw_text(renderer, "MAIN MENU", x0 + 20, y0 + 5, (SDL_Color){255,255,255,255}); + if (sdl_win_title != NULL) + { + int length = wcstombs(sdl_win_title_mb, sdl_win_title, 256); + draw_text(renderer, sdl_win_title_mb, x0 + 120, y0 + 5, (SDL_Color){255,255,255,255}); + } + for (int i = 0; i < MENU_ITEMS; i++) { int tx = x0 + 20;