From 1b31741f0360f438b1e5e8e75f78f54f542dccfc Mon Sep 17 00:00:00 2001 From: collecting Date: Thu, 2 Oct 2025 07:10:08 +0000 Subject: [PATCH] Edit discord_impl.h --- src/citron/discord_impl.h | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/citron/discord_impl.h b/src/citron/discord_impl.h index 7ff97df13..ec834b438 100644 --- a/src/citron/discord_impl.h +++ b/src/citron/discord_impl.h @@ -4,30 +4,40 @@ #pragma once + +#include +#include #include "citron/discord.h" namespace Core { -class System; + class System; } namespace DiscordRPC { -class DiscordImpl: public DiscordInterface { -public: DiscordImpl(Core::System & system_); -~DiscordImpl() override; + class DiscordImpl: public DiscordInterface { + public: + DiscordImpl(Core::System & system_); + ~DiscordImpl() override; -void Pause() override; -void Update() override; + void Pause() override; + void Update() override; -private: void UpdateGameStatus(bool use_default); + // FIX: Add the function and members for the background thread + void ThreadRun(); + std::thread discord_thread; + std::atomic discord_thread_running; -std::string game_url {}; -std::string game_title {}; -std::string game_title_id {}; -std::string cached_url; + private: + void UpdateGameStatus(bool use_default); -Core::System & system; -u64 program_id = 0; -}; + std::string game_url {}; + std::string game_title {}; + std::string game_title_id {}; + std::string cached_url; + + Core::System & system; + u64 program_id = 0; + }; } // namespace DiscordRPC