diff --git a/binding/miniffi-binding.cpp b/binding/miniffi-binding.cpp index 138629c4..a2d320c4 100644 --- a/binding/miniffi-binding.cpp +++ b/binding/miniffi-binding.cpp @@ -48,6 +48,7 @@ MiniFFI_GetFunctionHandle(void *lib, const char *func) CAPTURE(GetCursorPos); CAPTURE(ScreenToClient); CAPTURE(SetWindowPos); + CAPTURE(SetWindowTextA); CAPTURE(GetWindowRect); CAPTURE(RegisterHotKey); #endif diff --git a/src/fake-api.cpp b/src/fake-api.cpp index 86e73df3..6cdfdf47 100644 --- a/src/fake-api.cpp +++ b/src/fake-api.cpp @@ -115,6 +115,13 @@ MKXP_SetWindowPos(HWND hWnd, return true; } +BOOL __stdcall +MKXP_SetWindowTextA(HWND hWnd, LPCSTR lpString) +{ + SDL_SetWindowTitle(shState->sdlWindow(), (const char*)lpString); + return true; +} + // Games that use this to resize the window won't center // themselves, but it's better than having the window sent diff --git a/src/fake-api.h b/src/fake-api.h index a9c79575..6278785f 100644 --- a/src/fake-api.h +++ b/src/fake-api.h @@ -63,6 +63,9 @@ MKXP_SetWindowPos(HWND hWnd, int cy, UINT uFlags); +BOOL __stdcall +MKXP_SetWindowTextA(HWND hWnd, LPCSTR lpString); + BOOL __stdcall MKXP_GetWindowRect(HWND hWnd, LPRECT lpRect);