fix filebrowser split crash due to capturing the lambda by ref, 0.11.1

This commit is contained in:
ITotalJustice
2025-05-27 17:59:06 +01:00
parent aeb6c64077
commit 695102405b
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(sphaira_VERSION 0.11.0) set(sphaira_VERSION 0.11.1)
project(sphaira project(sphaira
VERSION ${sphaira_VERSION} VERSION ${sphaira_VERSION}

View File

@@ -2130,7 +2130,7 @@ void Menu::SetSplitScreen(bool enable) {
m_split_screen = enable; m_split_screen = enable;
if (m_split_screen) { if (m_split_screen) {
const auto change_view = [this](auto& new_view){ const auto change_view = [this](auto new_view){
if (view != new_view) { if (view != new_view) {
view->OnFocusLost(); view->OnFocusLost();
view = new_view; view = new_view;
@@ -2145,10 +2145,10 @@ void Menu::SetSplitScreen(bool enable) {
view_right = std::make_shared<FsView>(this, view->m_path, view->GetFsEntry(), ViewSide::Right); view_right = std::make_shared<FsView>(this, view->m_path, view->GetFsEntry(), ViewSide::Right);
change_view(view_right); change_view(view_right);
SetAction(Button::LEFT, Action{[&](){ SetAction(Button::LEFT, Action{[this, change_view](){
change_view(view_left); change_view(view_left);
}}); }});
SetAction(Button::RIGHT, Action{[&](){ SetAction(Button::RIGHT, Action{[this, change_view](){
change_view(view_right); change_view(view_right);
}}); }});
} else { } else {