mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 21:40:06 +00:00
Abstract SDL_SysWM into compat functions
This commit is contained in:
1 parent
dd2a99a96b
commit
13b2b28c2f
20 files changed
+347
-246
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user