input/overlays: fix premature pad interception removal

shader compilation and trophy notifications shouldn't cancel the pad interception during proper dialogs
This commit is contained in:
Megamouse 2020-03-09 23:00:26 +01:00
parent 4e25daffa6
commit 3ea94c286b
9 changed files with 14 additions and 11 deletions

View File

@ -116,7 +116,7 @@ struct msg_dlg_thread_info
continue; continue;
} }
dlg->close(); dlg->close(true, true);
} }
} }
else if (const auto dlg = g_fxo->get<msg_info>()->get()) else if (const auto dlg = g_fxo->get<msg_info>()->get())
@ -463,7 +463,7 @@ error_code cellMsgDialogAbort()
if (auto dlg = manager->get<rsx::overlays::message_dialog>()) if (auto dlg = manager->get<rsx::overlays::message_dialog>())
{ {
g_fxo->get<msg_dlg_thread>()->wait_until = 0; g_fxo->get<msg_dlg_thread>()->wait_until = 0;
dlg->close(false); dlg->close(false, true);
return CELL_OK; return CELL_OK;
} }
} }

View File

@ -50,6 +50,6 @@ namespace rsx
void shader_loading_dialog_native::close() void shader_loading_dialog_native::close()
{ {
dlg->return_code = CELL_OK; dlg->return_code = CELL_OK;
dlg->close(); dlg->close(false, false);
} }
} }

View File

@ -159,7 +159,7 @@ namespace rsx
default: return; default: return;
} }
close(); close(true, true);
} }
error_code message_dialog::show(bool is_blocking, const std::string& text, const MsgDialogType& type, std::function<void(s32 status)> on_close) error_code message_dialog::show(bool is_blocking, const std::string& text, const MsgDialogType& type, std::function<void(s32 status)> on_close)

View File

@ -23,7 +23,7 @@ namespace rsx
} }
visible = false; visible = false;
close(); close(true, true);
}; };
fade_animation.active = true; fade_animation.active = true;

View File

@ -122,7 +122,7 @@ namespace rsx
return_code = m_list->get_selected_index(); return_code = m_list->get_selected_index();
// Fall through // Fall through
case pad_button::circle: case pad_button::circle:
close(); close(true, true);
break; break;
case pad_button::dpad_up: case pad_button::dpad_up:
m_list->select_previous(); m_list->select_previous();

View File

@ -72,7 +72,7 @@ namespace rsx
{ {
auto current_time = get_system_time(); auto current_time = get_system_time();
if (current_time > expire_time) if (current_time > expire_time)
close(); close(false, false);
update_animation(current_time); update_animation(current_time);

View File

@ -78,7 +78,7 @@ namespace rsx
sliding_animation.on_finish = [this] sliding_animation.on_finish = [this]
{ {
s_trophy_semaphore.release(); s_trophy_semaphore.release();
close(); close(false, false);
}; };
sliding_animation.active = true; sliding_animation.active = true;

View File

@ -181,7 +181,7 @@ namespace rsx
return 0; return 0;
} }
void user_interface::close(bool use_callback) void user_interface::close(bool use_callback, bool stop_pad_interception)
{ {
// Force unload // Force unload
exit.release(true); exit.release(true);
@ -197,7 +197,10 @@ namespace rsx
thread_bits.wait(b); thread_bits.wait(b);
} }
pad::SetIntercepted(false); if (stop_pad_interception)
{
pad::SetIntercepted(false);
}
if (on_close && use_callback) if (on_close && use_callback)
{ {

View File

@ -90,7 +90,7 @@ namespace rsx
virtual void on_button_pressed(pad_button /*button_press*/) {} virtual void on_button_pressed(pad_button /*button_press*/) {}
void close(bool use_callback = true); void close(bool use_callback, bool stop_pad_interception);
s32 run_input_loop(); s32 run_input_loop();
}; };