Updated shell to support 32-bit video output

This commit is contained in:
rdanbrook 2018-02-03 22:26:21 -05:00
parent 3db43eb00c
commit 0088eb5f5b
2 changed files with 5 additions and 5 deletions

View file

@ -270,13 +270,13 @@ int main (int argc, char *argv[]) {
if (err.type != GB_INI_ERROR_NONE) { return 1; }
// Create video buffer
pixels = calloc(VIDEO_WIDTH_SMS * VIDEO_HEIGHT_SMS * 2, 1);
pixels = calloc(VIDEO_WIDTH_SMS * VIDEO_HEIGHT_SMS * 4, 1);
// Set parameters for internal bitmap
bitmap.width = VIDEO_WIDTH_SMS;
bitmap.height = VIDEO_HEIGHT_SMS;
bitmap.depth = 16;
bitmap.granularity = 2;
bitmap.depth = 32;
bitmap.granularity = 4;
bitmap.data = pixels;
bitmap.pitch = (bitmap.width * bitmap.granularity);
bitmap.viewport.w = VIDEO_WIDTH_SMS;

View file

@ -51,8 +51,8 @@ void ogl_render() {
VIDEO_WIDTH_SMS,
VIDEO_HEIGHT_SMS,
0,
GL_RGB,
GL_UNSIGNED_SHORT_5_6_5,
GL_BGRA,
GL_UNSIGNED_BYTE,
pixels);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);