summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-04-27 18:42:01 +0200
committerbunnei <ericbunnie@gmail.com>2014-04-27 18:42:01 +0200
commit1142ccba035afbe75ab707a81633c6cc26515848 (patch)
treefb0aa6f63cdeb42b079e9fa7a6a6fa5cb1545e0e /src
parenthackish but working way to set the framebuffer location to VRAM (used in ARM11 demos tested thus far, e.g. yeti3DS) (diff)
downloadyuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar.gz
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar.bz2
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar.lz
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar.xz
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.tar.zst
yuzu-1142ccba035afbe75ab707a81633c6cc26515848.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp11
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index cf7b029ab..b63a73d18 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -53,12 +53,11 @@ void RendererOpenGL::SwapBuffers() {
/**
* Helper function to flip framebuffer from left-to-right to top-to-bottom
- * @param addr Address of framebuffer in RAM
+ * @param in Pointer to input raw framebuffer in V/RAM
* @param out Pointer to output buffer with flipped framebuffer
* @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
*/
-void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out) {
- u8* in = Memory::GetPointer(addr);
+void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
for (int y = 0; y < VideoCore::kScreenTopHeight; y++) {
for (int x = 0; x < VideoCore::kScreenTopWidth; x++) {
int in_coord = (VideoCore::kScreenTopHeight * 3 * x) + (VideoCore::kScreenTopHeight * 3)
@@ -77,10 +76,10 @@ void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out) {
* @param src_rect Source rectangle in XFB to copy
* @param dst_rect Destination rectangle in output framebuffer to copy to
*/
-void RendererOpenGL::RenderXFB(const Rect& src_rect, const Rect& dst_rect) {
+void RendererOpenGL::RenderXFB(const Rect& src_rect, const Rect& dst_rect) {
- FlipFramebuffer(LCD::TOP_RIGHT_FRAME1, m_xfb_top_flipped);
- FlipFramebuffer(LCD::SUB_FRAME1, m_xfb_bottom_flipped);
+ FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_top_left_1), m_xfb_top_flipped);
+ FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped);
// Blit the top framebuffer
// ------------------------
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h
index 00aa17649..676a0ea02 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.h
+++ b/src/video_core/renderer_opengl/renderer_opengl.h
@@ -55,11 +55,11 @@ private:
/**
* Helper function to flip framebuffer from left-to-right to top-to-bottom
- * @param addr Address of framebuffer in RAM
+ * @param in Pointer to input raw framebuffer in V/RAM
* @param out Pointer to output buffer with flipped framebuffer
* @todo Early on hack... I'd like to find a more efficient way of doing this /bunnei
*/
- void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out);
+ void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out);
EmuWindow* m_render_window; ///< Handle to render window