mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
rsx/overlays: Add a name to the input thread context
This commit is contained in:
parent
aabd388070
commit
d320867569
@ -165,7 +165,7 @@ namespace rsx
|
|||||||
auto& overlayman = g_fxo->get<display_manager>();
|
auto& overlayman = g_fxo->get<display_manager>();
|
||||||
|
|
||||||
overlayman.attach_thread_input(
|
overlayman.attach_thread_input(
|
||||||
uid,
|
uid, "Home menu",
|
||||||
[¬ify]() { *notify = true; notify->notify_one(); }
|
[¬ify]() { *notify = true; notify->notify_one(); }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -151,6 +151,7 @@ namespace rsx
|
|||||||
|
|
||||||
void display_manager::attach_thread_input(
|
void display_manager::attach_thread_input(
|
||||||
u32 uid,
|
u32 uid,
|
||||||
|
const std::string_view& name,
|
||||||
std::function<void()> on_input_loop_enter,
|
std::function<void()> on_input_loop_enter,
|
||||||
std::function<void(s32)> on_input_loop_exit,
|
std::function<void(s32)> on_input_loop_exit,
|
||||||
std::function<s32()> input_loop_override)
|
std::function<s32()> input_loop_override)
|
||||||
@ -158,6 +159,7 @@ namespace rsx
|
|||||||
if (auto iface = std::dynamic_pointer_cast<user_interface>(get(uid)))
|
if (auto iface = std::dynamic_pointer_cast<user_interface>(get(uid)))
|
||||||
{
|
{
|
||||||
m_input_token_stack.push(
|
m_input_token_stack.push(
|
||||||
|
name,
|
||||||
std::move(iface),
|
std::move(iface),
|
||||||
on_input_loop_enter,
|
on_input_loop_enter,
|
||||||
on_input_loop_exit,
|
on_input_loop_exit,
|
||||||
@ -209,7 +211,7 @@ namespace rsx
|
|||||||
}
|
}
|
||||||
else if (result && result != user_interface::selection_code::canceled)
|
else if (result && result != user_interface::selection_code::canceled)
|
||||||
{
|
{
|
||||||
rsx_log.error("Input loop exited with error code=%d", result);
|
rsx_log.error("%s exited with error code=%d", input_context.name, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +157,7 @@ namespace rsx
|
|||||||
// Enable input thread attach to the specified interface
|
// Enable input thread attach to the specified interface
|
||||||
void attach_thread_input(
|
void attach_thread_input(
|
||||||
u32 uid, // The input target
|
u32 uid, // The input target
|
||||||
|
const std::string_view& name, // The name of the target
|
||||||
std::function<void()> on_input_loop_enter = nullptr, // [optional] What to do before running the input routine
|
std::function<void()> on_input_loop_enter = nullptr, // [optional] What to do before running the input routine
|
||||||
std::function<void(s32)> on_input_loop_exit = nullptr, // [optional] What to do with the result if any
|
std::function<void(s32)> on_input_loop_exit = nullptr, // [optional] What to do with the result if any
|
||||||
std::function<s32()> input_loop_override = nullptr); // [optional] What to do during the input loop. By default calls user_interface::run_input_loop
|
std::function<s32()> input_loop_override = nullptr); // [optional] What to do during the input loop. By default calls user_interface::run_input_loop
|
||||||
@ -169,6 +170,7 @@ namespace rsx
|
|||||||
|
|
||||||
struct input_thread_context_t
|
struct input_thread_context_t
|
||||||
{
|
{
|
||||||
|
std::string_view name;
|
||||||
std::shared_ptr<user_interface> target;
|
std::shared_ptr<user_interface> target;
|
||||||
std::function<void()> input_loop_prologue = nullptr;
|
std::function<void()> input_loop_prologue = nullptr;
|
||||||
std::function<void(s32)> input_loop_epilogue = nullptr;
|
std::function<void(s32)> input_loop_epilogue = nullptr;
|
||||||
|
@ -303,14 +303,14 @@ namespace rsx
|
|||||||
if (interactive)
|
if (interactive)
|
||||||
{
|
{
|
||||||
overlayman.attach_thread_input(
|
overlayman.attach_thread_input(
|
||||||
uid,
|
uid, "Message dialog",
|
||||||
[¬ify]() { *notify = true; notify->notify_one(); }
|
[¬ify]() { *notify = true; notify->notify_one(); }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
overlayman.attach_thread_input(
|
overlayman.attach_thread_input(
|
||||||
uid,
|
uid, "Message dialog",
|
||||||
[¬ify]() { *notify = true; notify->notify_one(); },
|
[¬ify]() { *notify = true; notify->notify_one(); },
|
||||||
nullptr,
|
nullptr,
|
||||||
[&]()
|
[&]()
|
||||||
|
@ -1624,7 +1624,7 @@ namespace rsx
|
|||||||
auto& overlayman = g_fxo->get<display_manager>();
|
auto& overlayman = g_fxo->get<display_manager>();
|
||||||
|
|
||||||
overlayman.attach_thread_input(
|
overlayman.attach_thread_input(
|
||||||
uid,
|
uid, "OSK",
|
||||||
[¬ify]() { *notify = true; notify->notify_one(); }
|
[¬ify]() { *notify = true; notify->notify_one(); }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ namespace rsx
|
|||||||
auto& overlayman = g_fxo->get<display_manager>();
|
auto& overlayman = g_fxo->get<display_manager>();
|
||||||
|
|
||||||
overlayman.attach_thread_input(
|
overlayman.attach_thread_input(
|
||||||
uid,
|
uid, "User list dialog",
|
||||||
[¬ify]() { *notify = true; notify->notify_one(); }
|
[¬ify]() { *notify = true; notify->notify_one(); }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user