mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 19:13:56 +00:00
fix: Discord Presence Timer
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <cstdint>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include "citron/discord.h"
|
#include "citron/discord.h"
|
||||||
|
|
||||||
@@ -15,15 +15,14 @@ namespace Core {
|
|||||||
|
|
||||||
namespace DiscordRPC {
|
namespace DiscordRPC {
|
||||||
|
|
||||||
class DiscordImpl: public DiscordInterface {
|
class DiscordImpl : public DiscordInterface {
|
||||||
public:
|
public:
|
||||||
DiscordImpl(Core::System & system_);
|
DiscordImpl(Core::System& system_);
|
||||||
~DiscordImpl() override;
|
~DiscordImpl() override;
|
||||||
|
|
||||||
void Pause() override;
|
void Pause() override;
|
||||||
void Update() override;
|
void Update() override;
|
||||||
|
|
||||||
// FIX: Add the function and members for the background thread
|
|
||||||
void ThreadRun();
|
void ThreadRun();
|
||||||
std::thread discord_thread;
|
std::thread discord_thread;
|
||||||
std::atomic<bool> discord_thread_running;
|
std::atomic<bool> discord_thread_running;
|
||||||
@@ -31,13 +30,17 @@ namespace DiscordRPC {
|
|||||||
private:
|
private:
|
||||||
void UpdateGameStatus(bool use_default);
|
void UpdateGameStatus(bool use_default);
|
||||||
|
|
||||||
std::string game_url {};
|
std::string game_url{};
|
||||||
std::string game_title {};
|
std::string game_title{};
|
||||||
std::string game_title_id {};
|
std::string game_title_id{};
|
||||||
std::string cached_url;
|
std::string cached_url;
|
||||||
|
|
||||||
Core::System & system;
|
Core::System& system;
|
||||||
u64 program_id = 0;
|
u64 program_id = 0;
|
||||||
|
|
||||||
|
s64 current_state_start_time = 0;
|
||||||
|
|
||||||
|
bool was_powered_on = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace DiscordRPC
|
} // namespace DiscordRPC
|
||||||
|
|||||||
Reference in New Issue
Block a user