overlays/tabs: Fix crash when scrolling through tabs quickly
This commit is contained in:
@@ -82,6 +82,8 @@ namespace rsx::overlays
|
|||||||
|
|
||||||
void tabbed_container::reflow_layout()
|
void tabbed_container::reflow_layout()
|
||||||
{
|
{
|
||||||
|
std::lock_guard lock(m_mutex);
|
||||||
|
|
||||||
if (m_headers_width > w)
|
if (m_headers_width > w)
|
||||||
{
|
{
|
||||||
// Invalid config
|
// Invalid config
|
||||||
@@ -140,6 +142,8 @@ namespace rsx::overlays
|
|||||||
|
|
||||||
compiled_resource& tabbed_container::get_compiled()
|
compiled_resource& tabbed_container::get_compiled()
|
||||||
{
|
{
|
||||||
|
std::lock_guard lock(m_mutex);
|
||||||
|
|
||||||
// NOTE: Caching is difficult as the subviews are themselves dynamic.
|
// NOTE: Caching is difficult as the subviews are themselves dynamic.
|
||||||
// Doable but not worth the effort
|
// Doable but not worth the effort
|
||||||
compiled_resources.clear();
|
compiled_resources.clear();
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ namespace rsx::overlays
|
|||||||
u16 m_headers_width = 0;
|
u16 m_headers_width = 0;
|
||||||
u32 m_selected_idx = umax;
|
u32 m_selected_idx = umax;
|
||||||
bool m_is_in_tab_selection_mode = true;
|
bool m_is_in_tab_selection_mode = true;
|
||||||
|
|
||||||
|
std::mutex m_mutex;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user