ref: 29f7c19a026c5f48e014c8b2f303bc7969edc461
parent: 5596c33b38938c404e339d4a3c3e04762ed4326a
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed May 6 19:15:02 EDT 2020
Fixed Null backend
--- a/src/Backends/Rendering/Window/Software/Null.cpp
+++ b/src/Backends/Rendering/Window/Software/Null.cpp
@@ -4,8 +4,9 @@
#include <stdlib.h>
static unsigned char *framebuffer;
+static size_t framebuffer_pitch;
-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;
@@ -14,17 +15,24 @@
if (framebuffer != NULL)
{- *pitch = screen_width * 3;
+ framebuffer_pitch = screen_width * 3;
- return framebuffer;
+ return true;
}
- return NULL;
+ return false;
}
void WindowBackend_Software_DestroyWindow(void)
{free(framebuffer);
+}
+
+unsigned char* WindowBackend_Software_GetFramebuffer(size_t *pitch)
+{+ *pitch = framebuffer_pitch;
+
+ return framebuffer;
}
void WindowBackend_Software_Display(void)
--
⑨