ref: a983417771bca8636ebd2720cf121ba8217c1089
parent: be0c61018bfefcdf4ccbfc9db3148465f4eb9db2
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Apr 15 18:03:59 EDT 2020
Update Wii U backend
--- a/src/Backends/WiiU/Window-Software.cpp
+++ b/src/Backends/WiiU/Window-Software.cpp
@@ -16,7 +16,7 @@
//static uint32_t tv_buffer_size;
static uint32_t drc_buffer_size;
-unsigned char* WindowBackend_Software_CreateWindow(const char *window_title, int screen_width, int screen_height, bool fullscreen, size_t *pitch)
+bool WindowBackend_Software_CreateWindow(const char *window_title, int screen_width, int screen_height, bool fullscreen)
{
(void)window_title;
(void)fullscreen;
@@ -38,11 +38,9 @@
// OSScreenSetBufferEx(SCREEN_TV, tv_framebuffer);
OSScreenSetBufferEx(SCREEN_DRC, drc_framebuffer);
- fake_framebuffer = (unsigned char*)malloc(screen_width * screen_height * 3);
+ fake_framebuffer = (unsigned char*)malloc(framebuffer_width * framebuffer_height * 3);
- *pitch = screen_width * 3;
-
- return fake_framebuffer;
+ return true;
}
void WindowBackend_Software_DestroyWindow(void)
@@ -51,6 +49,13 @@
free(drc_framebuffer);
// free(tv_framebuffer);
OSScreenShutdown();
+}
+
+unsigned char* WindowBackend_Software_GetFramebuffer(size_t *pitch)
+{
+ *pitch = framebuffer_width * 3;
+
+ return fake_framebuffer;
}
void WindowBackend_Software_Display(void)