mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
restore Alt-tab handling for fullscreen Bltflip
This commit is contained in:
parent
de6a97f1c0
commit
f2bd33cd7c
@ -6522,12 +6522,7 @@ void DXGraphicsStateGuardian::show_full_screen_frame(void) {
|
|||||||
// Flip the front and back buffers, to make what we just rendered
|
// Flip the front and back buffers, to make what we just rendered
|
||||||
// visible.
|
// visible.
|
||||||
|
|
||||||
if (_overlay_windows_supported) {
|
if(!_overlay_windows_supported) {
|
||||||
// If we're asking for overlay windows, we have to blt instead of
|
|
||||||
// flip, so we don't lose the window.
|
|
||||||
hr = scrn.pddsPrimary->Blt( NULL, scrn.pddsBack, NULL, DDBLT_WAIT, NULL );
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// Normally, we can just do the fast flip operation.
|
// Normally, we can just do the fast flip operation.
|
||||||
DWORD dwFlipFlags = DDFLIP_WAIT;
|
DWORD dwFlipFlags = DDFLIP_WAIT;
|
||||||
|
|
||||||
@ -6544,17 +6539,20 @@ void DXGraphicsStateGuardian::show_full_screen_frame(void) {
|
|||||||
// bugbug: dont we want triple buffering instead of wasting time
|
// bugbug: dont we want triple buffering instead of wasting time
|
||||||
// waiting for vsync?
|
// waiting for vsync?
|
||||||
hr = scrn.pddsPrimary->Flip( NULL, dwFlipFlags);
|
hr = scrn.pddsPrimary->Flip( NULL, dwFlipFlags);
|
||||||
|
} else {
|
||||||
|
// If we're asking for overlay windows, we have to blt instead of
|
||||||
|
// flip, so we don't lose the window.
|
||||||
|
hr = scrn.pddsPrimary->Blt( NULL, scrn.pddsBack, NULL, DDBLT_WAIT, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
if(FAILED(hr)) {
|
if(FAILED(hr)) {
|
||||||
if((hr == DDERR_SURFACELOST) || (hr == DDERR_SURFACEBUSY)) {
|
if((hr == DDERR_SURFACELOST) || (hr == DDERR_SURFACEBUSY)) {
|
||||||
CheckCooperativeLevel();
|
CheckCooperativeLevel();
|
||||||
} else {
|
} else {
|
||||||
dxgsg_cat.error() << "show_frame() - Flip failed w/unexpected error code: " << ConvD3DErrorToString(hr) << endl;
|
dxgsg_cat.error() << "show_frame() - Flip failed w/unexpected error code: " << ConvD3DErrorToString(hr) << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user