absorb Putnam's work on the windows hooks

develop
Myk Taylor 2022-12-16 11:54:42 -08:00 committed by Kelly Kinkade
parent 768c95ecb6
commit 003b74bf73
1 changed files with 10 additions and 0 deletions

@ -664,6 +664,13 @@ DFhackCExport void SDL_DestroySemaphore(void *sem)
_SDL_DestroySemaphore(sem);
}
static vPtr (*_SDL_ListModes)(vPtr format, uint32_t flags) = 0;
DFhackCExport vPtr SDL_ListModes(vPtr format, uint32_t flags)
{
InitSDLPointers();
return _SDL_ListModes(format, flags);
}
static uint8_t (*_SDL_GetAppState)(void) = 0;
DFhackCExport uint8_t SDL_GetAppState(void)
{
@ -817,6 +824,9 @@ void FirstCall()
_SDL_getenv = (char* (*)(const char*))GetProcAddress(realSDLlib,"SDL_getenv");
_SDL_strlcat = (size_t (*)(char*, const char*, size_t))GetProcAddress(realSDLlib,"SDL_strlcat");
// new in DF v50.01
_SDL_ListModes = (void *(*)(void*, uint32_t))GetProcAddress(realSDLlib,"SDL_ListModes");
_SDL_EnableUNICODE(1);
fprintf(stderr,"Initized HOOKS!\n");