mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
added minor suggestions from pr
This commit is contained in:
parent
9e9cd41c27
commit
05c98bc4f3
3 changed files with 6 additions and 6 deletions
|
@ -7,10 +7,10 @@
|
|||
|
||||
namespace DiscordRPCHandler {
|
||||
|
||||
void RPC::init() {
|
||||
void RPC::init(const std::string& appId) {
|
||||
DiscordEventHandlers handlers{};
|
||||
std::string discordAppId = "1290207945476280360";
|
||||
Discord_Initialize(discordAppId.c_str(), &handlers, 1, nullptr);
|
||||
|
||||
Discord_Initialize(appId.c_str(), &handlers, 1, nullptr);
|
||||
startTimestamp = time(nullptr);
|
||||
enabled = true;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ void RPC::init() {
|
|||
void RPC::setStatusIdling() {
|
||||
DiscordRichPresence rpc{};
|
||||
rpc.largeImageKey = "https://github.com/shadps4-emu/shadPS4/raw/main/.github/shadps4.png";
|
||||
rpc.largeImageText = "ShadPS4 is a PS4 emulator";
|
||||
rpc.largeImageText = "shadPS4 is a PS4 emulator";
|
||||
rpc.startTimestamp = startTimestamp;
|
||||
rpc.details = "Idle";
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class RPC {
|
|||
bool enabled = false;
|
||||
|
||||
public:
|
||||
void init();
|
||||
void init(const std::string& appId);
|
||||
void setStatusIdling();
|
||||
void setStatusPlaying(const std::string& game_name, const std::string& game_id);
|
||||
};
|
||||
|
|
|
@ -71,7 +71,7 @@ bool MainWindow::Init() {
|
|||
statusBar->showMessage(statusMessage);
|
||||
|
||||
// Initialize Discord RPC
|
||||
discordRPC.init();
|
||||
discordRPC.init("1290207945476280360");
|
||||
discordRPC.setStatusIdling();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue