Video: fix Auto Resolution Scale not updating when the window was resized.

Also fixes the widescreen hack not fully updating when the aspect ratio setting changed on the spot.
This commit is contained in:
Filoppi
2023-09-07 02:36:31 +03:00
parent b3aa6ad93b
commit fdd1934f12
3 changed files with 35 additions and 0 deletions

View File

@ -55,6 +55,7 @@ public:
void SetSuggestedWindowSize(int width, int height);
void SetBackbuffer(int backbuffer_width, int backbuffer_height);
void SetBackbuffer(SurfaceInfo info);
void OnBackbufferSet(bool size_changed, bool is_first_set);
void UpdateDrawRectangle();
@ -104,6 +105,8 @@ private:
void ProcessFrameDumping(u64 ticks) const;
void OnBackBufferSizeChanged();
std::tuple<int, int> CalculateOutputDimensions(int width, int height,
bool allow_stretch = true) const;
std::tuple<float, float> ApplyStandardAspectCrop(float width, float height,
@ -132,6 +135,8 @@ private:
// Offsets imply black borders (if the window aspect ratio doesn't match the game's one).
MathUtil::Rectangle<int> m_target_rectangle = {};
u32 m_auto_resolution_scale = 1;
RcTcacheEntry m_xfb_entry;
MathUtil::Rectangle<int> m_xfb_rect;