mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add anvideo config option to automatically resize the render window to the size of the game's output resolution. This avoids artifacts that appear when the render target is scaled to fit a window of a different size.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6764 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1235,7 +1235,12 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
||||
#endif
|
||||
|
||||
// Finish up the current frame, print some stats
|
||||
|
||||
if (g_ActiveConfig.bAdjustWindowSize)
|
||||
SetWindowSize(fbWidth, fbHeight);
|
||||
|
||||
OpenGL_Update(); // just updates the render window position and the backbuffer size
|
||||
|
||||
bool xfbchanged = false;
|
||||
|
||||
if (s_XFB_width != fbWidth || s_XFB_height != fbHeight)
|
||||
@ -1592,4 +1597,17 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
|
||||
return result;
|
||||
}
|
||||
|
||||
void Renderer::SetWindowSize(int width, int height)
|
||||
{
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
|
||||
// Scale the window size by the EFB scale.
|
||||
CalculateTargetScale(width, height, width, height);
|
||||
|
||||
g_VideoInitialize.pRequestWindowSize(width, height);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user