mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Video: The Auto-Adjust Window Size
setting was calculating the window size based on the resolution of the window in the previous frame if we used the "stretch" aspect ratio setting, so it's result would be self influence in a loop and behave unreliably (e.g. when changing resolution between Auto/Native/2x the automatic window scaling would behave randomly)
This commit is contained in:
@ -58,7 +58,7 @@ public:
|
||||
|
||||
void UpdateDrawRectangle();
|
||||
|
||||
float CalculateDrawAspectRatio() const;
|
||||
float CalculateDrawAspectRatio(bool allow_stretch = true) const;
|
||||
|
||||
// Crops the target rectangle to the framebuffer dimensions, reducing the size of the source
|
||||
// rectangle if it is greater. Works even if the source and target rectangles don't have a
|
||||
@ -103,9 +103,12 @@ private:
|
||||
|
||||
void ProcessFrameDumping(u64 ticks) const;
|
||||
|
||||
std::tuple<int, int> CalculateOutputDimensions(int width, int height) const;
|
||||
std::tuple<float, float> ApplyStandardAspectCrop(float width, float height) const;
|
||||
std::tuple<float, float> ScaleToDisplayAspectRatio(int width, int height) const;
|
||||
std::tuple<int, int> CalculateOutputDimensions(int width, int height,
|
||||
bool allow_stretch = true) const;
|
||||
std::tuple<float, float> ApplyStandardAspectCrop(float width, float height,
|
||||
bool allow_stretch = true) const;
|
||||
std::tuple<float, float> ScaleToDisplayAspectRatio(int width, int height,
|
||||
bool allow_stretch = true) const;
|
||||
|
||||
// Use this to convert a single target rectangle to two stereo rectangles
|
||||
std::tuple<MathUtil::Rectangle<int>, MathUtil::Rectangle<int>>
|
||||
|
Reference in New Issue
Block a user