diff --git a/engine/client/sys_win.c b/engine/client/sys_win.c index fd6e59dc6..6c458d397 100644 --- a/engine/client/sys_win.c +++ b/engine/client/sys_win.c @@ -3155,6 +3155,15 @@ static int Sys_ProcessCommandline(char **argv, int maxargc, char *argv0) return i; } +int MessageBoxU(HWND hWnd, char *lpText, char *lpCaption, UINT uType) +{ + wchar_t widecaption[256]; + wchar_t widetext[2048]; + widen(widetext, sizeof(widetext), lpText); + widen(widecaption, sizeof(widecaption), lpCaption); + return MessageBoxW(hWnd, widetext, widecaption, uType); +} + #ifdef WEBCLIENT //using this like posix' access function, but with much more code, microsoftisms, and no errno codes/info //no, I don't really have a clue why it needs to be so long. @@ -3192,15 +3201,6 @@ static BOOL microsoft_accessU(LPCSTR pszFolder, DWORD dwAccessDesired) return microsoft_accessW(widen(wpath, sizeof(wpath), pszFolder), dwAccessDesired); } -int MessageBoxU(HWND hWnd, char *lpText, char *lpCaption, UINT uType) -{ - wchar_t widecaption[256]; - wchar_t widetext[2048]; - widen(widetext, sizeof(widetext), lpText); - widen(widecaption, sizeof(widecaption), lpCaption); - return MessageBoxW(hWnd, widetext, widecaption, uType); -} - static WNDPROC omgwtfwhyohwhy; diff --git a/engine/common/fs.c b/engine/common/fs.c index 6f1207882..e40dae0a1 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -3188,7 +3188,7 @@ static qboolean Sys_SteamHasFile(char *basepath, int basepathlen, char *steamdir return false; } -#ifdef _WIN32 +#ifndef SERVERONLY static INT CALLBACK StupidBrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) { //'stolen' from microsoft's knowledge base. //required to work around microsoft being annoying.