Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix background game input during overlays #7745

Merged
merged 2 commits into from Mar 10, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp
Expand Up @@ -116,7 +116,7 @@ struct msg_dlg_thread_info
continue;
}

dlg->close();
dlg->close(true, true);
}
}
else if (const auto dlg = g_fxo->get<msg_info>()->get())
Expand Down Expand Up @@ -463,7 +463,7 @@ error_code cellMsgDialogAbort()
if (auto dlg = manager->get<rsx::overlays::message_dialog>())
{
g_fxo->get<msg_dlg_thread>()->wait_until = 0;
dlg->close(false);
dlg->close(false, true);
return CELL_OK;
}
}
Expand Down
Expand Up @@ -50,6 +50,6 @@ namespace rsx
void shader_loading_dialog_native::close()
{
dlg->return_code = CELL_OK;
dlg->close();
dlg->close(false, false);
}
}
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp
Expand Up @@ -159,7 +159,7 @@ namespace rsx
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)
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_osk.cpp
Expand Up @@ -23,7 +23,7 @@ namespace rsx
}

visible = false;
close();
close(true, true);
};

fade_animation.active = true;
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_save_dialog.cpp
Expand Up @@ -122,7 +122,7 @@ namespace rsx
return_code = m_list->get_selected_index();
// Fall through
case pad_button::circle:
close();
close(true, true);
break;
case pad_button::dpad_up:
m_list->select_previous();
Expand Down
Expand Up @@ -72,7 +72,7 @@ namespace rsx
{
auto current_time = get_system_time();
if (current_time > expire_time)
close();
close(false, false);

update_animation(current_time);

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_trophy_notification.cpp
Expand Up @@ -78,7 +78,7 @@ namespace rsx
sliding_animation.on_finish = [this]
{
s_trophy_semaphore.release();
close();
close(false, false);
};

sliding_animation.active = true;
Expand Down
7 changes: 5 additions & 2 deletions rpcs3/Emu/RSX/Overlays/overlays.cpp
Expand Up @@ -181,7 +181,7 @@ namespace rsx
return 0;
}

void user_interface::close(bool use_callback)
void user_interface::close(bool use_callback, bool stop_pad_interception)
{
// Force unload
exit.release(true);
Expand All @@ -197,7 +197,10 @@ namespace rsx
thread_bits.wait(b);
}

pad::SetIntercepted(false);
if (stop_pad_interception)
{
pad::SetIntercepted(false);
}

if (on_close && use_callback)
{
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlays.h
Expand Up @@ -90,7 +90,7 @@ namespace rsx

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();
};
Expand Down