set minimum window size
This commit is contained in:
parent
ab6761b733
commit
9d745e3475
@ -698,8 +698,8 @@ INTERNAL struct dx11_texture *dx11_texture_alloc(enum renderer_texture_format fo
|
|||||||
}
|
}
|
||||||
|
|
||||||
D3D11_TEXTURE2D_DESC desc = ZI;
|
D3D11_TEXTURE2D_DESC desc = ZI;
|
||||||
desc.Width = size.x;
|
desc.Width = max_i32(size.x, 1);
|
||||||
desc.Height = size.y;
|
desc.Height = max_i32(size.y, 1);
|
||||||
desc.MipLevels = 1;
|
desc.MipLevels = 1;
|
||||||
desc.ArraySize = 1;
|
desc.ArraySize = 1;
|
||||||
desc.SampleDesc.Count = 1;
|
desc.SampleDesc.Count = 1;
|
||||||
|
|||||||
@ -1188,6 +1188,13 @@ INTERNAL LRESULT CALLBACK win32_window_proc(HWND hwnd, UINT msg, WPARAM wparam,
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
/* Minmax info */
|
||||||
|
case WM_GETMINMAXINFO: {
|
||||||
|
/* Set minimum window size */
|
||||||
|
LPMINMAXINFO mmi = (LPMINMAXINFO)lparam;
|
||||||
|
mmi->ptMinTrackSize.x = 100;
|
||||||
|
mmi->ptMinTrackSize.y = 100;
|
||||||
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
result = DefWindowProcW(hwnd, msg, wparam, lparam);
|
result = DefWindowProcW(hwnd, msg, wparam, lparam);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user