From 35d8afc174b186e1872565b9e7d1c7d5d4a7c13d Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 26 Oct 2012 15:28:15 -0500 Subject: [PATCH] Hopefully fixed the black screen bug with certain emulators. --- changelog.txt | 3 +++ src/Renderer_init_rpi.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 81d1f393c..d2e74ce7c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +October 26 +-Hopefully fixed the black screen bug with certain programs. + October 25 -Added gameImageNotFound tag for an image to display if a game image is not found/defined. -Fixed keyboard not skipping joystick input configuration. diff --git a/src/Renderer_init_rpi.cpp b/src/Renderer_init_rpi.cpp index 138aac4df..17944af75 100644 --- a/src/Renderer_init_rpi.cpp +++ b/src/Renderer_init_rpi.cpp @@ -172,10 +172,6 @@ namespace Renderer void destroySurface() { - SDL_FreeSurface(sdlScreen); - sdlScreen = NULL; - SDL_Quit(); - eglSwapBuffers(display, surface); eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface(display, surface); @@ -185,6 +181,10 @@ namespace Renderer display = EGL_NO_DISPLAY; surface = EGL_NO_SURFACE; context = EGL_NO_CONTEXT; + + SDL_FreeSurface(sdlScreen); + sdlScreen = NULL; + SDL_Quit(); } bool init(int w, int h)