mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-06 16:40:41 -07:00
popn: fix subscreen redraw option causing graphical glitches (#854)
## Link to GitHub Issue or related Pull Request, if one exists #0 ## Description of change Old behavior: Forced redraw presented the subscreen every main frame, even when the game already presented it, causing duplicate presents and tearing in popn (was fine in sdvx) New behavior: Forced redraw acts as a fallback, presenting only when the game skips or fails a subscreen update. ## Testing Popn - no more glitching Nabla - no regression
This commit is contained in:
@@ -96,6 +96,12 @@ HRESULT STDMETHODCALLTYPE WrappedIDirect3DSwapChain9::Present(const RECT *pSourc
|
||||
pDirtyRegion,
|
||||
dwFlags);
|
||||
|
||||
// a successful game subscreen present suppresses the next forced fallback present.
|
||||
if (SUCCEEDED(result) &&
|
||||
(this == pDev->implicit_sub_swapchain || this == pDev->sub_swapchain[0])) {
|
||||
graphics_d3d9_notify_subscreen_present();
|
||||
}
|
||||
|
||||
// Some drivers report S_PRESENT_MODE_CHANGED after Windows moves the portrait SMALL
|
||||
// head into the requested exclusive mode, leaving both group heads black. Toggle SMALL
|
||||
// through another supported mode and restore it once, then retry the interrupted MAIN
|
||||
|
||||
Reference in New Issue
Block a user