Skip to content

Commit 03c63c5

Browse files
committed
Ozone: Animation blocking fix
1 parent 42ccdc0 commit 03c63c5

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

menu/drivers/ozone.c

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ enum ozone_handle_flags2
448448
OZONE_FLAG2_PENDING_CURSOR_IN_SIDEBAR = (1 << 9),
449449
OZONE_FLAG2_IS_QUICK_MENU = (1 << 10),
450450
OZONE_FLAG2_IS_PLAYLISTS_TAB = (1 << 11),
451-
OZONE_FLAG2_IGNORE_MISSING_ASSETS = (1 << 12)
451+
OZONE_FLAG2_IGNORE_MISSING_ASSETS = (1 << 12),
452+
OZONE_FLAG2_BLOCK_ANIMATION = (1 << 13)
452453
};
453454

454455
struct ozone_handle
@@ -9104,6 +9105,7 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
91049105
ozone->num_search_terms_old = 0;
91059106

91069107
ozone->flags2 &= ~OZONE_FLAG2_CURSOR_WIGGLING;
9108+
ozone->flags2 &= ~OZONE_FLAG2_BLOCK_ANIMATION;
91079109

91089110
if (!(ozone->screensaver = menu_screensaver_init()))
91099111
goto error;
@@ -9336,7 +9338,7 @@ static void ozone_refresh_thumbnail_image(void *data, size_t i)
93369338
ozone->flags &= ~OZONE_FLAG_SKIP_THUMBNAIL_RESET;
93379339
ozone_unload_thumbnail_textures(ozone);
93389340

9339-
ozone->flags |= OZONE_FLAG_FIRST_FRAME;
9341+
ozone->flags2 |= OZONE_FLAG2_BLOCK_ANIMATION;
93409342

93419343
/* Refresh metadata */
93429344
if (!i)
@@ -11978,6 +11980,15 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
1197811980
}
1197911981
}
1198011982

11983+
if (ozone->flags & OZONE_FLAG_FIRST_FRAME)
11984+
{
11985+
menu_input_get_pointer_state(&ozone->pointer);
11986+
11987+
ozone->cursor_x_old = ozone->pointer.x;
11988+
ozone->cursor_y_old = ozone->pointer.y;
11989+
ozone->flags &= ~OZONE_FLAG_FIRST_FRAME;
11990+
}
11991+
1198111992
/* OSK Fade detection */
1198211993
if (draw_osk != draw_osk_old)
1198311994
{
@@ -12381,9 +12392,6 @@ static void ozone_list_open(
1238112392

1238212393
ozone->flags |= OZONE_FLAG_DRAW_OLD_LIST;
1238312394

12384-
if (ozone->flags & OZONE_FLAG_FIRST_FRAME)
12385-
animate = false;
12386-
1238712395
/* Sidebar animation */
1238812396
ozone_sidebar_update_collapse(ozone, ozone_collapse_sidebar, animate);
1238912397

@@ -12636,16 +12644,11 @@ static void ozone_populate_entries(
1263612644

1263712645
if (animate)
1263812646
if (ozone->categories_selection_ptr == ozone->categories_active_idx_old)
12639-
ozone_list_open(ozone, ozone_collapse_sidebar, (!(ozone->flags & OZONE_FLAG_FIRST_FRAME)));
12640-
12641-
if (ozone->flags & OZONE_FLAG_FIRST_FRAME)
12642-
{
12643-
menu_input_get_pointer_state(&ozone->pointer);
12647+
ozone_list_open(ozone, ozone_collapse_sidebar,
12648+
( !(ozone->flags & OZONE_FLAG_FIRST_FRAME)
12649+
&& !(ozone->flags2 & OZONE_FLAG2_BLOCK_ANIMATION)));
1264412650

12645-
ozone->cursor_x_old = ozone->pointer.x;
12646-
ozone->cursor_y_old = ozone->pointer.y;
12647-
ozone->flags &= ~OZONE_FLAG_FIRST_FRAME;
12648-
}
12651+
ozone->flags2 &= ~OZONE_FLAG2_BLOCK_ANIMATION;
1264912652

1265012653
/* Reset savestate thumbnails always */
1265112654
ozone_update_savestate_thumbnail_path(ozone, (unsigned)menu_st->selection_ptr);

0 commit comments

Comments
 (0)