From 246cb75584af281596b938f898e8a3aedbcdb62a Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Wed, 16 Jul 2014 11:27:58 +0200 Subject: RegisterSet: Simplify code by using structs for register definition instead of unions. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/video_core/renderer_opengl/renderer_opengl.cpp') diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 8d9d61ae..50f820e4 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -80,17 +80,17 @@ void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& const auto& framebuffer_top = GPU::g_regs.Get(); const auto& framebuffer_sub = GPU::g_regs.Get(); - const u32 active_fb_top = (framebuffer_top.data.active_fb == 1) - ? framebuffer_top.data.address_left2 - : framebuffer_top.data.address_left1; - const u32 active_fb_sub = (framebuffer_sub.data.active_fb == 1) - ? framebuffer_sub.data.address_left2 - : framebuffer_sub.data.address_left1; + const u32 active_fb_top = (framebuffer_top.active_fb == 1) + ? framebuffer_top.address_left2 + : framebuffer_top.address_left1; + const u32 active_fb_sub = (framebuffer_sub.active_fb == 1) + ? framebuffer_sub.address_left2 + : framebuffer_sub.address_left1; DEBUG_LOG(GPU, "RenderXFB: %x bytes from %x(%xx%x), fmt %x", - framebuffer_top.data.stride * framebuffer_top.data.height, - GPU::GetFramebufferAddr(active_fb_top), (int)framebuffer_top.data.width, - (int)framebuffer_top.data.height, (int)framebuffer_top.data.format); + framebuffer_top.stride * framebuffer_top.height, + GPU::GetFramebufferAddr(active_fb_top), (int)framebuffer_top.width, + (int)framebuffer_top.height, (int)framebuffer_top.format); // TODO: This should consider the GPU registers for framebuffer width, height and stride. FlipFramebuffer(GPU::GetFramebufferPointer(active_fb_top), m_xfb_top_flipped); -- cgit v1.2.3