summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-12-30 05:28:27 +0100
committerbunnei <bunneidev@gmail.com>2017-01-07 09:23:22 +0100
commit22ad9094e6355e84f2e45abcd66748b2c74dfaf9 (patch)
tree1124bc25253f2c4f6adc7ec9a90aa9a3d2213ba6 /src/video_core
parentMerge pull request #2410 from Subv/sleepthread (diff)
downloadyuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar.gz
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar.bz2
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar.lz
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar.xz
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.tar.zst
yuzu-22ad9094e6355e84f2e45abcd66748b2c74dfaf9.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp13
-rw-r--r--src/video_core/video_core.cpp1
-rw-r--r--src/video_core/video_core.h1
3 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 85aa06cd5..ef3b06a7b 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -556,14 +556,21 @@ RasterizerCacheOpenGL::GetFramebufferSurfaces(const Pica::Regs::FramebufferConfi
color_params.width = depth_params.width = config.GetWidth();
color_params.height = depth_params.height = config.GetHeight();
color_params.is_tiled = depth_params.is_tiled = true;
- if (VideoCore::g_scaled_resolution_enabled) {
- auto layout = VideoCore::g_emu_window->GetFramebufferLayout();
- // Assume same scaling factor for top and bottom screens
+ // Set the internal resolution, assume the same scaling factor for top and bottom screens
+ const Layout::FramebufferLayout& layout = VideoCore::g_emu_window->GetFramebufferLayout();
+ if (Settings::values.resolution_factor == 0.0f) {
+ // Auto - scale resolution to the window size
color_params.res_scale_width = depth_params.res_scale_width =
(float)layout.top_screen.GetWidth() / VideoCore::kScreenTopWidth;
color_params.res_scale_height = depth_params.res_scale_height =
(float)layout.top_screen.GetHeight() / VideoCore::kScreenTopHeight;
+ } else {
+ // Otherwise, scale the resolution by the specified factor
+ color_params.res_scale_width = Settings::values.resolution_factor;
+ depth_params.res_scale_width = Settings::values.resolution_factor;
+ color_params.res_scale_height = Settings::values.resolution_factor;
+ depth_params.res_scale_height = Settings::values.resolution_factor;
}
color_params.addr = config.GetColorBufferPhysicalAddress();
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index 8db882f59..7186a7652 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -19,7 +19,6 @@ std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
std::atomic<bool> g_hw_renderer_enabled;
std::atomic<bool> g_shader_jit_enabled;
-std::atomic<bool> g_scaled_resolution_enabled;
std::atomic<bool> g_vsync_enabled;
std::atomic<bool> g_toggle_framelimit_enabled;
diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h
index c397c1974..4aba19ca0 100644
--- a/src/video_core/video_core.h
+++ b/src/video_core/video_core.h
@@ -37,7 +37,6 @@ extern EmuWindow* g_emu_window; ///< Emu window
// qt ui)
extern std::atomic<bool> g_hw_renderer_enabled;
extern std::atomic<bool> g_shader_jit_enabled;
-extern std::atomic<bool> g_scaled_resolution_enabled;
extern std::atomic<bool> g_toggle_framelimit_enabled;
/// Start the video core