fix d3d9 not rendering xmb and temporarily disable widgets due to segfault

This commit is contained in:
LazyBumHorse 2019-06-24 14:53:03 +02:00
parent d4ea084f3d
commit 1f69f3960a
6 changed files with 11 additions and 27 deletions

View File

@ -2092,7 +2092,7 @@ static bool d3d9_has_windowed(void *data)
static bool d3d9_menu_widgets_enabled(void *data)
{
(void)data;
return true;
return false; /* currently disabled due to memory issues */
}
#endif

View File

@ -55,6 +55,7 @@ struct menu_animation
{
tween_array_t list;
tween_array_t pending;
bool initialized;
bool pending_deletes;
bool in_update;
};
@ -66,7 +67,7 @@ typedef struct menu_animation menu_animation_t;
static const char ticker_spacer_default[] = TICKER_SPACER_DEFAULT;
static menu_animation_t anim;
static menu_animation_t anim = {0};
static retro_time_t cur_time = 0;
static retro_time_t old_time = 0;
static uint64_t ticker_idx = 0; /* updated every TICKER_SPEED ms */
@ -385,18 +386,6 @@ static void menu_animation_ticker_loop(uint64_t idx,
*width3 = width;
}
void menu_animation_init(void)
{
da_init(anim.list);
da_init(anim.pending);
}
void menu_animation_free(void)
{
da_free(anim.list);
da_free(anim.pending);
}
static void menu_delayed_animation_cb(void *userdata)
{
menu_delayed_animation_t *delayed_animation = (menu_delayed_animation_t*) userdata;
@ -552,6 +541,13 @@ bool menu_animation_push(menu_animation_ctx_entry_t *entry)
if (!t.easing || t.duration == 0 || t.initial_value == t.target_value)
return false;
if (!anim.initialized)
{
da_init(anim.list);
da_init(anim.pending);
anim.initialized = true;
}
if (anim.in_update)
da_push(anim.pending, t);
else
@ -854,6 +850,7 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data)
}
da_free(anim.list);
da_free(anim.pending);
memset(&anim, 0, sizeof(menu_animation_t));
}

View File

@ -145,10 +145,6 @@ void menu_timer_start(menu_timer_t *timer, menu_timer_ctx_entry_t *timer_entry);
void menu_timer_kill(menu_timer_t *timer);
void menu_animation_init(void);
void menu_animation_free(void);
bool menu_animation_update(void);
bool menu_animation_ticker(menu_animation_ctx_ticker_t *ticker);

View File

@ -2224,17 +2224,11 @@ static bool menu_driver_context_reset(bool video_is_threaded)
bool menu_driver_init(bool video_is_threaded)
{
menu_animation_init();
if (menu_driver_init_internal(video_is_threaded))
return menu_driver_context_reset(video_is_threaded);
return false;
}
void menu_driver_free(void)
{
menu_animation_free();
}
void menu_driver_navigation_set(bool scroll)
{
if (menu_driver_ctx->navigation_set)

View File

@ -525,8 +525,6 @@ bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list);
bool menu_driver_init(bool video_is_threaded);
void menu_driver_free(void);
void menu_driver_set_thumbnail_system(char *s, size_t len);
void menu_driver_get_thumbnail_system(char *s, size_t len);

View File

@ -12340,7 +12340,6 @@ void driver_uninit(int flags)
menu_widgets_free();
#endif
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
menu_driver_free();
}
#endif