mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-12 02:09:17 +00:00
Add lock to handle_button_press
We don't want to change UI elements while we are compiling.
This commit is contained in:
@@ -161,7 +161,7 @@ namespace rsx
|
||||
|
||||
void big_picture_game_grid::finish_reload(std::vector<std::unique_ptr<big_picture_game_tile>>&& tiles)
|
||||
{
|
||||
std::lock_guard lock(m_reload_mutex);
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
if (thread_ctrl::state() == thread_state::aborting)
|
||||
{
|
||||
@@ -280,6 +280,8 @@ namespace rsx
|
||||
|
||||
page_navigation big_picture_game_grid::handle_button_press(pad_button button_press, bool is_auto_repeat, u64 auto_repeat_interval_ms)
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
if (m_loading) return page_navigation::stay;
|
||||
|
||||
const bool do_play_sound = !is_auto_repeat || auto_repeat_interval_ms >= user_interface::m_auto_repeat_ms_interval_default;
|
||||
@@ -384,7 +386,7 @@ namespace rsx
|
||||
|
||||
compiled_resource& big_picture_game_grid::get_compiled()
|
||||
{
|
||||
std::lock_guard lock(m_reload_mutex);
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
if (!m_highlight->is_compiled() ||
|
||||
(!m_tiles.empty() && m_grid && !m_grid->is_compiled()) ||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace rsx
|
||||
static constexpr u16 m_columns = 5;
|
||||
static constexpr u16 m_tile_size = 200;
|
||||
|
||||
std::mutex m_reload_mutex;
|
||||
std::mutex m_mutex;
|
||||
std::unique_ptr<named_thread<std::function<void()>>> m_game_enumeration_thread;
|
||||
|
||||
game_enumeration<big_picture_game_info> m_game_enumeration;
|
||||
|
||||
Reference in New Issue
Block a user