Dynload winmm, which is weird but it fixes vs2022 builds
This commit is contained in:
parent
6f976ae0ce
commit
9856979906
5 changed files with 28 additions and 3 deletions
14
src/core.c
14
src/core.c
|
|
@ -1090,7 +1090,19 @@ int MwLibraryInit(void) {
|
|||
int i;
|
||||
|
||||
#ifdef _WIN32
|
||||
timeBeginPeriod(10);
|
||||
/*
|
||||
There's no Windows configuration that Milsko supports that doesn't have winmm.
|
||||
However, uhh, Visual Studio 2022. For some fucking reason.
|
||||
Thanks for coming to my TED Talk.
|
||||
*/
|
||||
char winmmPath[MAX_PATH] = {0};
|
||||
GetSystemDirectory(winmmPath, MAX_PATH);
|
||||
strcat_s(winmmPath, MAX_PATH, "\\winmm.dll");
|
||||
MwLL_winmmLib = LoadLibraryA(winmmPath);
|
||||
MwLL_PFN_timeGetTime = (void *)GetProcAddress(MwLL_winmmLib, "timeGetTime");
|
||||
MwLL_PFN_timeBeginPeriod = (void *)GetProcAddress(MwLL_winmmLib, "timeBeginPeriod");
|
||||
|
||||
MwLL_PFN_timeBeginPeriod(10);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WAYLAND
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue