(GX) Fill in gx_free (move code from platform_gx.c to gx/gx_video.c)

This commit is contained in:
twinaphex 2014-05-29 05:55:21 +02:00
parent 5cef7e89b0
commit 0fce77fd1b
2 changed files with 9 additions and 15 deletions

View File

@ -324,20 +324,6 @@ static void frontend_gx_exitspawn(void)
#endif
}
static void frontend_gx_deinit(void *data)
{
(void)data;
#ifndef IS_SALAMANDER
// we never init GX/VIDEO subsystems in salamander
GX_DrawDone();
GX_AbortFrame();
GX_Flush();
VIDEO_SetBlack(true);
VIDEO_Flush();
VIDEO_WaitVSync();
#endif
}
static int frontend_gx_process_args(int argc, char *argv[], void *args)
{
int ret = 0;
@ -381,7 +367,7 @@ static int frontend_gx_get_rating(void)
const frontend_ctx_driver_t frontend_ctx_gx = {
frontend_gx_get_environment_settings, /* get_environment_settings */
frontend_gx_init, /* init */
frontend_gx_deinit, /* deinit */
NULL, /* deinit */
frontend_gx_exitspawn, /* exitspawn */
frontend_gx_process_args, /* process_args */
NULL, /* process_events */

View File

@ -482,6 +482,7 @@ static void *gx_init(const video_info_t *video,
#endif
g_vsync = video->vsync;
//TODO/FIXME - should probably be removed - we're going to do full teardown/setup now
if (driver.video_data)
{
gx_video_t *gx = (gx_video_t*)driver.video_data;
@ -1035,6 +1036,13 @@ static void gx_free(void *data)
if (gx)
gx_free_overlay(gx);
#endif
GX_DrawDone();
GX_AbortFrame();
GX_Flush();
VIDEO_SetBlack(true);
VIDEO_Flush();
VIDEO_WaitVSync();
}
static void gx_set_rotation(void *data, unsigned orientation)