summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-28 03:06:59 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-28 03:41:24 +0200
commiteb10f250254a0153abd789e49a36945d996631a7 (patch)
tree5f7a0e290892f1137ccd28420991ef7981377cf6 /src/video_core
parentOpenGL: Remove unused RendererOpenGL fields (diff)
downloadyuzu-eb10f250254a0153abd789e49a36945d996631a7.tar
yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.gz
yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.bz2
yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.lz
yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.xz
yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.zst
yuzu-eb10f250254a0153abd789e49a36945d996631a7.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp20
-rw-r--r--src/video_core/video_core.h15
2 files changed, 8 insertions, 27 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 456443e86..8b717e43d 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -561,20 +561,16 @@ RasterizerCacheOpenGL::GetFramebufferSurfaces(
color_params.is_tiled = depth_params.is_tiled = true;
// 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) {
+ float resolution_scale_factor = Settings::values.resolution_factor;
+ if (resolution_scale_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;
+ resolution_scale_factor = VideoCore::g_emu_window->GetFramebufferLayout().GetScalingRatio();
}
+ // Scale the resolution by the specified factor
+ color_params.res_scale_width = resolution_scale_factor;
+ depth_params.res_scale_width = resolution_scale_factor;
+ color_params.res_scale_height = resolution_scale_factor;
+ depth_params.res_scale_height = resolution_scale_factor;
color_params.addr = config.GetColorBufferPhysicalAddress();
color_params.pixel_format = CachedSurface::PixelFormatFromColorFormat(config.color_format);
diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h
index 4aba19ca0..94e0867f0 100644
--- a/src/video_core/video_core.h
+++ b/src/video_core/video_core.h
@@ -15,21 +15,6 @@ class RendererBase;
namespace VideoCore {
-// 3DS Video Constants
-// -------------------
-
-// NOTE: The LCDs actually rotate the image 90 degrees when displaying. Because of that the
-// framebuffers in video memory are stored in column-major order and rendered sideways, causing
-// the widths and heights of the framebuffers read by the LCD to be switched compared to the
-// heights and widths of the screens listed here.
-static const int kScreenTopWidth = 400; ///< 3DS top screen width
-static const int kScreenTopHeight = 240; ///< 3DS top screen height
-static const int kScreenBottomWidth = 320; ///< 3DS bottom screen width
-static const int kScreenBottomHeight = 240; ///< 3DS bottom screen height
-
-// Video core renderer
-// ---------------------
-
extern std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
extern EmuWindow* g_emu_window; ///< Emu window