2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

fixed renderer to use correct framebuffer location

This commit is contained in:
bunnei 2014-04-27 12:42:01 -04:00
parent a6c925112a
commit 1142ccba03
2 changed files with 7 additions and 8 deletions

View file

@ -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)
@ -79,8 +78,8 @@ void RendererOpenGL::FlipFramebuffer(u32 addr, u8* out) {
*/
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
// ------------------------

View file

@ -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