[App/Discord] Rework how rich presence is managed.

Updating rich presence state every time the window title changes
is a bad idea(tm).
This commit is contained in:
gibbed
2019-08-03 08:12:37 -05:00
parent 763274654d
commit c16ef67ff9
7 changed files with 38 additions and 22 deletions

View File

@@ -53,6 +53,7 @@ namespace xe {
Emulator::Emulator(const std::wstring& command_line,
const std::wstring& content_root)
: on_launch(),
on_terminate(),
on_exit(),
command_line_(command_line),
content_root_(content_root),
@@ -233,6 +234,7 @@ X_STATUS Emulator::TerminateTitle() {
kernel_state_->TerminateTitle();
title_id_ = 0;
game_title_ = L"";
on_terminate();
return X_STATUS_SUCCESS;
}
@@ -671,7 +673,7 @@ X_STATUS Emulator::CompleteLaunch(const std::wstring& path,
}
main_thread_ = main_thread;
on_launch();
on_launch(title_id_, game_title_);
return X_STATUS_SUCCESS;
}