From 408eaeeee683732c1ff411db9ee5a3bb8a038ebb Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 3 May 2021 08:35:13 +1000 Subject: [PATCH] Fix empty titlebar on Windows 95/98 --- src/Window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Window.c b/src/Window.c index 392d0ba47..90843d013 100644 --- a/src/Window.c +++ b/src/Window.c @@ -756,7 +756,11 @@ void Window_Create(int width, int height) { void Window_SetTitle(const cc_string* title) { WCHAR str[NATIVE_STR_LEN]; Platform_EncodeUtf16(str, title); - SetWindowTextW(win_handle, str); + if (SetWindowTextW(win_handle, str)) return; + + /* Windows 9x does not support W API functions */ + Platform_Utf16ToAnsi(str); + SetWindowTextA(win_handle, (const char*)str); } void Clipboard_GetText(cc_string* value) {