mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
add resizeable bool
This commit is contained in:
parent
f394d7f7ce
commit
43224a0f65
@ -128,6 +128,7 @@ typedef struct IDirectDrawImpl
|
||||
BOOL altenter;
|
||||
BOOL hidecursor;
|
||||
BOOL accurateTimers;
|
||||
BOOL resizable;
|
||||
BOOL bnetActive;
|
||||
BOOL bnetWasFullscreen;
|
||||
SpeedLimiter ticksLimiter;
|
||||
|
23
src/main.c
23
src/main.c
@ -1016,10 +1016,31 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
case WM_NCLBUTTONUP:
|
||||
case WM_NCACTIVATE:
|
||||
case WM_NCPAINT:
|
||||
case WM_NCHITTEST:
|
||||
{
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
case WM_NCHITTEST:
|
||||
{
|
||||
LRESULT result = DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
|
||||
if (!ddraw->resizable)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
case HTBOTTOM:
|
||||
case HTBOTTOMLEFT:
|
||||
case HTBOTTOMRIGHT:
|
||||
case HTLEFT:
|
||||
case HTRIGHT:
|
||||
case HTTOP:
|
||||
case HTTOPLEFT:
|
||||
case HTTOPRIGHT:
|
||||
return HTBORDER;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
case WM_SETCURSOR:
|
||||
{
|
||||
// show resize cursor on window borders
|
||||
|
@ -42,6 +42,7 @@ void Settings_Load()
|
||||
ddraw->noactivateapp = GetBool("noactivateapp", FALSE);
|
||||
ddraw->vhack = GetBool("vhack", FALSE);
|
||||
ddraw->accurateTimers = GetBool("accuratetimers", FALSE);
|
||||
ddraw->resizable = GetBool("resizable", TRUE);
|
||||
|
||||
WindowRect.right = GetInt("width", 0);
|
||||
WindowRect.bottom = GetInt("height", 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user