mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
fix fullscreen failure case
This commit is contained in:
parent
0d169cb3e8
commit
b61d739f19
@ -750,6 +750,11 @@ do_fullscreen_resize(int x_size, int y_size) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool WinGraphicsWindow::
|
bool WinGraphicsWindow::
|
||||||
do_fullscreen_switch() {
|
do_fullscreen_switch() {
|
||||||
|
if (!do_fullscreen_enable()) {
|
||||||
|
// Couldn't get fullscreen.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
DWORD window_style = make_style(true);
|
DWORD window_style = make_style(true);
|
||||||
SetWindowLong(_hWnd, GWL_STYLE, window_style);
|
SetWindowLong(_hWnd, GWL_STYLE, window_style);
|
||||||
|
|
||||||
@ -758,10 +763,9 @@ do_fullscreen_switch() {
|
|||||||
if (!calculate_metrics(true, window_style, metrics, has_origin)){
|
if (!calculate_metrics(true, window_style, metrics, has_origin)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWindowPos(_hWnd, HWND_NOTOPMOST, 0, 0, metrics.width, metrics.height,
|
SetWindowPos(_hWnd, HWND_NOTOPMOST, 0, 0, metrics.width, metrics.height,
|
||||||
SWP_FRAMECHANGED | SWP_SHOWWINDOW);
|
SWP_FRAMECHANGED | SWP_SHOWWINDOW);
|
||||||
do_fullscreen_enable();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user