-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D3D9: Make windowed GetFrontBufferData more accurate #3843
Conversation
src/d3d9/d3d9_device.h
Outdated
m_mostRecentlyUsedSwapchain = swapchain; | ||
} | ||
|
||
void ResetLastUsedSwapchain() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming this to RefreshLastUsedSwapchain()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it doesn't refresh it, it resets it to the built-in swapchain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two remarks
Fixes #3724
Total War Medieval 2 uses GetFrontBufferData to take a screenshot and then copies that screenshot to a texture which is used to render the background of the loading screen.
In windowed mode, GetFrontbufferData will in fact take a screenshot of the entire screen. We don't implement it that way in DXVK, we always blit the most recent front buffer.
There's two problems with our implementations in Medieval 2:
So to solve this without having to implement GetFrontBufferData properly (taking a screenshot of the entire screen), I propose that we: