Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rpcs3/Emu/RSX/Overlays/BigPicture/overlay_big_picture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namespace rsx
break;
}

const bool main_menu_is_current_page = m_main_menu.is_current_page;
const page_navigation navigation = m_main_menu.handle_button_press(button_press, is_auto_repeat, m_auto_repeat_ms_interval);

switch (navigation)
Expand All @@ -110,6 +111,12 @@ namespace rsx
}
case page_navigation::exit:
{
// Don't exit if circle was pressed in the main menu
if (main_menu_is_current_page && button_press == pad_button::circle)
{
break;
}

// Don't call close() synchronously from the input thread - just like the pause menu's own
// "Exit Game", tearing down the shell on the main thread takes this dialog down as a side effect.
g_big_picture_mode_active = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -322,12 +324,8 @@ namespace rsx
if (button_press == pad_button::circle)
{
play_sound(sound_effect::cancel);
if (parent)
{
set_current_page(parent);
return page_navigation::back;
}
return page_navigation::exit;
set_current_page(ensure(parent));
return page_navigation::back;
}

return page_navigation::stay;
Expand Down Expand Up @@ -372,12 +370,8 @@ namespace rsx
return page_navigation::stay;
case pad_button::circle:
play_sound(sound_effect::cancel);
if (parent)
{
set_current_page(parent);
return page_navigation::back;
}
return page_navigation::exit;
set_current_page(ensure(parent));
return page_navigation::back;
default:
return page_navigation::stay;
}
Expand All @@ -392,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()) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "stdafx.h"
#include "overlay_manager.h"
#include "Emu/System.h"
#include <util/asm.hpp>

namespace rsx
Expand Down
4 changes: 4 additions & 0 deletions rpcs3/Emu/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,8 @@ bool Emulator::BootRsxCapture(const std::string& path)
GetCallbacks().on_ready();

GetCallbacks().init_gs_render(nullptr);
GetCallbacks().init_kb_handler();
GetCallbacks().init_mouse_handler();
GetCallbacks().init_pad_handler("");

GetCallbacks().on_run(false);
Expand Down Expand Up @@ -1001,6 +1003,8 @@ bool Emulator::BootBigPictureMode()
GetCallbacks().on_ready();

GetCallbacks().init_gs_render(nullptr);
GetCallbacks().init_kb_handler();
GetCallbacks().init_mouse_handler();
GetCallbacks().init_pad_handler("");

GetCallbacks().on_run(false);
Expand Down