Abstract SDL_SysWM into compat functions

This commit is contained in:
Cameron Gutman
2025-01-30 22:41:40 -06:00
parent dd2a99a96b
commit 13b2b28c2f
20 changed files with 347 additions and 246 deletions
@@ -47,21 +47,7 @@ bool DxVsyncSource::initialize(SDL_Window* window, int)
return false;
}
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if (!SDL_GetWindowWMInfo(window, &info)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"SDL_GetWindowWMInfo() failed: %s",
SDL_GetError());
return false;
}
// Pacer should only create us on Win32
SDL_assert(info.subsystem == SDL_SYSWM_WINDOWS);
m_Window = info.info.win.window;
m_Window = (HWND)SDLC_Win32_GetHwnd(window);
return true;
}