Skip to content

Commit

Permalink
fix resizable .ini setting in wine
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Oct 6, 2024
1 parent 92df125 commit fc9bb11
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,14 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
real_SetWindowLongA(g_ddraw.hwnd, GWL_EXSTYLE, exstyle & ~(WS_EX_CLIENTEDGE));
}

if (!g_config.resizable && IsWine())
{
real_SetWindowLongA(
g_ddraw.hwnd,
GWL_STYLE,
(real_GetWindowLongA(g_ddraw.hwnd, GWL_STYLE) | WS_MINIMIZEBOX) & ~(WS_MAXIMIZEBOX | WS_THICKFRAME));
}

/* center the window with correct dimensions */
int cy = g_ddraw.mode.dmPelsWidth ? g_ddraw.mode.dmPelsWidth : g_ddraw.render.width;
int cx = g_ddraw.mode.dmPelsHeight ? g_ddraw.mode.dmPelsHeight : g_ddraw.render.height;
Expand Down

0 comments on commit fc9bb11

Please sign in to comment.