From 6673298c1e570727df9ce46dfa1b88686187605c Mon Sep 17 00:00:00 2001 From: rogerman Date: Sat, 13 Jun 2015 23:23:56 +0000 Subject: [PATCH] GTK/CLI Ports: - Fix compiling for CLI port. (Regression from r5198.) - Fix issue with GTK port where the video output framebuffer wasn't getting cleared on reset. (Regression from r5198.) --- desmume/src/cli/main.cpp | 2 +- desmume/src/gtk/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/cli/main.cpp b/desmume/src/cli/main.cpp index 4571f9862..bfaf5c7a6 100644 --- a/desmume/src/cli/main.cpp +++ b/desmume/src/cli/main.cpp @@ -488,7 +488,7 @@ static void desmume_cycle(struct ctrls_event_config * cfg) } #ifdef HAVE_LIBAGG -T_AGG_RGB555 agg_targetScreen_cli(GPU_screen, 256, 384, 512); +T_AGG_RGB555 agg_targetScreen_cli((u8 *)GPU_screen, 256, 384, 512); #endif int main(int argc, char ** argv) { diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 373dc2304..98c518ea7 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -1413,7 +1413,7 @@ static void Reset() Pause(); NDS_Reset(); // Clear the NDS screen - memset(GPU_screen, 0xFF, sizeof(GPU_screen)); + memset(GPU_screen, 0xFF, GPU_GetFramebufferWidth() * GPU_GetFramebufferHeight() * 2 * sizeof(u16)); RedrawScreen(); if (shouldBeRunning) { Launch();