Fix empty titlebar on Windows 95/98

This commit is contained in:
UnknownShadow200 2021-05-03 08:35:13 +10:00
parent 27c62541cb
commit 408eaeeee6

View File

@ -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) {