mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2025-02-07 23:11:21 +01:00
d3d9ex: fix framed and window sizes for IIDX
This commit is contained in:
parent
8e1151ac02
commit
6614cc801e
@ -130,11 +130,16 @@ static HWND STDCALL my_CreateWindowExA(
|
|||||||
HINSTANCE hInstance,
|
HINSTANCE hInstance,
|
||||||
LPVOID lpParam)
|
LPVOID lpParam)
|
||||||
{
|
{
|
||||||
if (d3d9ex_windowed && d3d9ex_window_framed) {
|
if (d3d9ex_windowed) {
|
||||||
|
if (d3d9ex_window_framed) {
|
||||||
/* use a different style */
|
/* use a different style */
|
||||||
dwStyle |= WS_OVERLAPPEDWINDOW;
|
dwStyle |= WS_OVERLAPPEDWINDOW;
|
||||||
/* also show mouse cursor */
|
/* also show mouse cursor */
|
||||||
ShowCursor(TRUE);
|
ShowCursor(TRUE);
|
||||||
|
} else {
|
||||||
|
dwStyle = dwStyle & ~WS_OVERLAPPEDWINDOW;
|
||||||
|
ShowCursor(FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND hwnd = real_CreateWindowExA(
|
HWND hwnd = real_CreateWindowExA(
|
||||||
@ -389,6 +394,17 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (uintptr_t) my_WndProc);
|
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (uintptr_t) my_WndProc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d3d9ex_windowed) {
|
||||||
|
if (d3d9ex_window_width > 0 && d3d9ex_window_height > 0) {
|
||||||
|
// set window size
|
||||||
|
RECT rect;
|
||||||
|
GetWindowRect(hwnd, &rect);
|
||||||
|
|
||||||
|
log_info("Calling SetWindowPos to fix window size: %dx%d", d3d9ex_window_width, d3d9ex_window_height);
|
||||||
|
SetWindowPos(hwnd, 0, rect.left, rect.top, d3d9ex_window_width, d3d9ex_window_height, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user