use inline functions for WINE checks
This commit is contained in:
parent
6626480358
commit
e18eb931eb
9 changed files with 36 additions and 44 deletions
12
src/dd.c
12
src/dd.c
|
@ -875,7 +875,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||
if (g_config.remove_menu && GetMenu(g_ddraw.hwnd))
|
||||
SetMenu(g_ddraw.hwnd, NULL);
|
||||
|
||||
if (!verhelp_is_wine())
|
||||
if (!IsWine())
|
||||
{
|
||||
MSG msg; /* workaround for "Not Responding" window problem in cnc games */
|
||||
real_PeekMessageA(&msg, g_ddraw.hwnd, 0, 0, PM_NOREMOVE | PM_QS_INPUT);
|
||||
|
@ -905,7 +905,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||
real_SetWindowLongA(g_ddraw.hwnd, GWL_EXSTYLE, exstyle & ~(WS_EX_TOOLWINDOW));
|
||||
}
|
||||
|
||||
if (verhelp_is_wine())
|
||||
if (IsWine())
|
||||
{
|
||||
real_SetWindowLongA(
|
||||
g_ddraw.hwnd,
|
||||
|
@ -1053,7 +1053,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||
Fix wayland bug:
|
||||
ChangeDisplaySettings fails silently - enable borderless mode in case display resolution was not changed
|
||||
*/
|
||||
if (verhelp_is_wine() &&
|
||||
if (IsWine() &&
|
||||
(g_ddraw.render.mode.dmPelsWidth != real_GetSystemMetrics(SM_CXSCREEN) ||
|
||||
g_ddraw.render.mode.dmPelsHeight != real_GetSystemMetrics(SM_CYSCREEN)))
|
||||
{
|
||||
|
@ -1066,7 +1066,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||
}
|
||||
}
|
||||
|
||||
if (verhelp_is_wine())
|
||||
if (IsWine())
|
||||
{
|
||||
real_SetWindowLongA(
|
||||
g_ddraw.hwnd,
|
||||
|
@ -1273,7 +1273,7 @@ HRESULT dd_WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
|
|||
if (g_config.maxgameticks == -2)
|
||||
{
|
||||
/* Workaround for DwmFlush() freeze (e.g. slow alt+tab) issue on windows 7 SP1 */
|
||||
if (g_ddraw.renderer == ogl_render_main && !verhelp_is_wine() && !IsWindows8OrGreater())
|
||||
if (g_ddraw.renderer == ogl_render_main && !IsWine() && !IsWindows8OrGreater())
|
||||
{
|
||||
if (fpsl_wait_for_vblank())
|
||||
return DD_OK;
|
||||
|
@ -1556,7 +1556,7 @@ HRESULT dd_CreateEx(GUID* lpGuid, LPVOID* lplpDD, REFIID iid, IUnknown* pUnkOute
|
|||
}
|
||||
else /* auto */
|
||||
{
|
||||
if (!verhelp_is_wine() && d3d9_is_available())
|
||||
if (!IsWine() && d3d9_is_available())
|
||||
{
|
||||
g_ddraw.renderer = d3d9_render_main;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue