diff options
| author | bunnei <bunneidev@gmail.com> | 2017-01-08 12:25:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-08 12:25:12 -0500 |
| commit | 9fc8ead8424a1e9fa46ab9b15777416b256a77d1 (patch) | |
| tree | 3757cf233b6b57155c287c7f968cad5e41761a05 /src/video_core/renderer_opengl | |
| parent | 7cfe3ef0463ace034b1e5786c9581cfa5f2e810c (diff) | |
| parent | 22ad9094e6355e84f2e45abcd66748b2c74dfaf9 (diff) | |
Merge pull request #2384 from bunnei/internal-res-option
config: Add option for specifying screen resolution scale factor.
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 13 |
1 files changed, 10 insertions, 3 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(); |
