summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/RenderBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index 82a4ec8a72..c7b18e509c 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -35,6 +35,7 @@
#include "Fifo.h"
#include "Timer.h"
#include "StringUtil.h"
+#include "Host.h"
#include <cmath>
#include <string>
@@ -318,6 +319,19 @@ void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
}
}
+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);
+
+ Host_RequestRenderWindowSize(width, height);
+}
+
void UpdateViewport()
{
g_renderer->UpdateViewport();