From 2d20ffeb06a1bc77910133a7b4c5d95beb54d30f Mon Sep 17 00:00:00 2001 From: collecting Date: Thu, 2 Oct 2025 23:59:25 +0000 Subject: [PATCH] fix: Discord Presence Timer --- src/citron/discord_impl.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/citron/discord_impl.h b/src/citron/discord_impl.h index ec834b438..09ae5c0db 100644 --- a/src/citron/discord_impl.h +++ b/src/citron/discord_impl.h @@ -4,8 +4,8 @@ #pragma once - #include +#include #include #include "citron/discord.h" @@ -15,15 +15,14 @@ namespace Core { namespace DiscordRPC { - class DiscordImpl: public DiscordInterface { + class DiscordImpl : public DiscordInterface { public: - DiscordImpl(Core::System & system_); + DiscordImpl(Core::System& system_); ~DiscordImpl() override; void Pause() override; void Update() override; - // FIX: Add the function and members for the background thread void ThreadRun(); std::thread discord_thread; std::atomic discord_thread_running; @@ -31,13 +30,17 @@ namespace DiscordRPC { private: void UpdateGameStatus(bool use_default); - std::string game_url {}; - std::string game_title {}; - std::string game_title_id {}; + std::string game_url{}; + std::string game_title{}; + std::string game_title_id{}; std::string cached_url; - Core::System & system; + Core::System& system; u64 program_id = 0; + + s64 current_state_start_time = 0; + + bool was_powered_on = false; }; } // namespace DiscordRPC