]> Shamusworld >> Repos - apple2/blobdiff - src/video.cpp
Added miscellaneous warnings, minor documentation
[apple2] / src / video.cpp
index 170b2380fd192aba1c18a09ed6526c01c20e61fc..5f8ff84dbe960199837c8cb2874b81cdb79c0f71 100755 (executable)
@@ -190,13 +190,21 @@ WriteLog("\n");//*/
 //
 void VideoDone(void)
 {
+       WriteLog("Video: Shutting down OpenGL...\n");
        if (settings.useOpenGL)
                sdlemu_close_opengl();
 
+       WriteLog("Video: Shutting down joystick....\n");
        SDL_JoystickClose(joystick);
+       WriteLog("Video: Freeing 'surface'...\n");
        SDL_FreeSurface(surface);
+#warning "The problem is here: Doing either of the SDL_Quitxxx functions causes a double free. !!! FIX !!!"
+#warning "Some googling suggests that it may be the thread component causing the trouble."
+       WriteLog("Video: Shutting down SDL subsystems...\n");
        SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO | SDL_INIT_TIMER);
+       WriteLog("Video: Shutting down SDL...\n");
        SDL_Quit();
+       WriteLog("Video: Done.\n");
 }
 
 //