move is_wine bool to g_config

This commit is contained in:
FunkyFr3sh 2023-11-04 03:20:30 +01:00
parent f79b7db8cd
commit e9b585f440
7 changed files with 15 additions and 13 deletions

View file

@ -228,7 +228,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
pos->hwndInsertAfter, pos->x, pos->y, pos->cx, pos->cy);
*/
if (g_ddraw->wine &&
if (g_config.is_wine &&
!g_config.windowed &&
(pos->x > 0 || pos->y > 0) &&
g_ddraw->last_set_window_pos_tick + 500 < timeGetTime())
@ -460,7 +460,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
util_update_bnet_pos(x, y);
}
if (in_size_move || (g_ddraw->wine && !g_config.fullscreen && g_ddraw->render.thread))
if (in_size_move || (g_config.is_wine && !g_config.fullscreen && g_ddraw->render.thread))
{
if (x != -32000)
g_config.window_rect.left = x; /* -32000 = Exit/Minimize */
@ -477,7 +477,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
}
case WM_NCMOUSELEAVE:
{
if (!g_ddraw->wine) /* hack: disable aero snap */
if (!g_config.is_wine) /* hack: disable aero snap */
{
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
@ -490,7 +490,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
}
case WM_SYSCOMMAND:
{
if ((wParam & ~0x0F) == SC_MOVE && !g_ddraw->wine) /* hack: disable aero snap */
if ((wParam & ~0x0F) == SC_MOVE && !g_config.is_wine) /* hack: disable aero snap */
{
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
@ -594,7 +594,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
mouse_unlock();
if (g_ddraw->wine && g_ddraw->last_set_window_pos_tick + 500 > timeGetTime())
if (g_config.is_wine && g_ddraw->last_set_window_pos_tick + 500 > timeGetTime())
return 0;
if (!g_config.windowed)