mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -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
|
||||
// visible.
|
||||
|
||||
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 {
|
||||
if(!_overlay_windows_supported) {
|
||||
// Normally, we can just do the fast flip operation.
|
||||
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
|
||||
// waiting for vsync?
|
||||
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)) {
|
||||
CheckCooperativeLevel();
|
||||
} else {
|
||||
dxgsg_cat.error() << "show_frame() - Flip failed w/unexpected error code: " << ConvD3DErrorToString(hr) << endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user