From d5177570533824e9eb404036f993da4a42abfbc3 Mon Sep 17 00:00:00 2001 From: tfarley Date: Fri, 15 May 2015 22:42:25 -0700 Subject: [PATCH] Respond to notify iff hw rendering, current fb ptrs --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 37b346f62..591324a6f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -170,6 +170,9 @@ void RasterizerOpenGL::DrawTriangles() { } void RasterizerOpenGL::NotifyPreCopy(PAddr src_addr, u32 size) { + if (!Settings::values.use_hw_renderer) + return; + render_window->MakeCurrent(); state.Apply(); @@ -199,6 +202,9 @@ void RasterizerOpenGL::NotifyPreCopy(PAddr src_addr, u32 size) { } void RasterizerOpenGL::NotifyFlush(PAddr addr, u32 size) { + if (!Settings::values.use_hw_renderer) + return; + render_window->MakeCurrent(); state.Apply(); @@ -538,7 +544,7 @@ void RasterizerOpenGL::SyncDrawState() { } void RasterizerOpenGL::ReloadColorBuffer() { - u8* color_buffer = Memory::GetPhysicalPointer(last_fb_color_addr); + u8* color_buffer = Memory::GetPhysicalPointer(Pica::registers.framebuffer.GetColorBufferPhysicalAddress()); if (color_buffer == nullptr) return; @@ -571,7 +577,7 @@ void RasterizerOpenGL::ReloadColorBuffer() { void RasterizerOpenGL::ReloadDepthBuffer() { // TODO: Appears to work, but double-check endianness of depth values and order of depth-stencil - u8* depth_buffer = Memory::GetPhysicalPointer(last_fb_depth_addr); + u8* depth_buffer = Memory::GetPhysicalPointer(Pica::registers.framebuffer.GetDepthBufferPhysicalAddress()); if (depth_buffer == nullptr) { return;