From 0f9ba38b76e624c7846b4b7591d9e6ef9fb0c3c9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 6 Dec 2015 17:17:08 +0100 Subject: [PATCH] Make sure all static local variables from video_driver_ctl are reset back to default state after calling RARCH_DISPLAY_CTL_DESTROY --- gfx/video_driver.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 5556aad4c8..63bc7ddbc0 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1481,8 +1481,12 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data) case RARCH_DISPLAY_CTL_INIT: return init_video(); case RARCH_DISPLAY_CTL_DESTROY: - video_driver_ctl(RARCH_DISPLAY_CTL_UNSET_RGBA, NULL); - current_video = NULL; + video_driver_use_rgba = false; + video_driver_data_own = false; + video_driver_cache_context = false; + video_driver_cache_context_ack = false; + video_driver_active = false; + current_video = NULL; break; case RARCH_DISPLAY_CTL_DESTROY_DATA: video_driver_data = NULL;