1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add new setting to enable (very bugged) resize in wine

This commit is contained in:
FunkyFr3sh 2024-05-24 02:26:46 +02:00
parent 1d4403db57
commit c1a14a31d5
4 changed files with 10 additions and 8 deletions

View File

@ -77,6 +77,7 @@ typedef struct CNCDDRAWCONFIG
BOOL direct3d_passthrough;
BOOL center_cursor_fix;
char fake_mode[128];
BOOL wine_allow_resize;
/* Hotkeys */

View File

@ -90,6 +90,7 @@ void cfg_load()
GET_BOOL(g_config.direct3d_passthrough, "direct3d_passthrough", FALSE);
GET_BOOL(g_config.center_cursor_fix, "center_cursor_fix", FALSE);
GET_STRING("fake_mode", "", g_config.fake_mode, sizeof(g_config.fake_mode));
GET_BOOL(g_config.wine_allow_resize, "wine_allow_resize", FALSE);
/* Hotkeys */
@ -303,6 +304,7 @@ static void cfg_create_ini()
"direct3d_passthrough=false\n"
"center_cursor_fix=false\n"
";fake_mode=640x480x32\n"
"wine_allow_resize=false\n"
"\n"
"\n"
"\n"

View File

@ -938,7 +938,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
real_SetWindowLongA(g_ddraw.hwnd, GWL_EXSTYLE, exstyle & ~(WS_EX_CLIENTEDGE));
}
if (IsWine())
if (!g_config.wine_allow_resize && IsWine())
{
real_SetWindowLongA(
g_ddraw.hwnd,

View File

@ -431,15 +431,14 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
g_config.window_rect.right = LOWORD(lParam);
g_config.window_rect.bottom = HIWORD(lParam);
}
/*
else if (g_ddraw.wine)
else if (!in_size_move && !g_config.fullscreen && g_config.wine_allow_resize && IsLinux())
{
WindowRect.right = LOWORD(lParam);
WindowRect.bottom = HIWORD(lParam);
if (WindowRect.right != g_ddraw.render.width || WindowRect.bottom != g_ddraw.render.height)
dd_SetDisplayMode(g_ddraw.width, g_ddraw.height, g_ddraw.bpp);
g_config.window_rect.right = LOWORD(lParam);
g_config.window_rect.bottom = HIWORD(lParam);
if (g_config.window_rect.right != g_ddraw.render.width || g_config.window_rect.bottom != g_ddraw.render.height)
dd_SetDisplayMode(g_ddraw.width, g_ddraw.height, g_ddraw.bpp, 0);
}
*/
}
}