window title in OSD

This commit is contained in:
Valerio
2025-10-19 11:42:47 +02:00
parent 340a43ad64
commit 2eb0c77a87

View File

@@ -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;