mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 19:13:56 +00:00
Merge branch 'presence_fix' into 'main'
Edit discord_impl.h See merge request citron/emulator!70
This commit is contained in:
@@ -4,30 +4,40 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
#include <thread>
|
||||||
#include "citron/discord.h"
|
#include "citron/discord.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace DiscordRPC {
|
namespace DiscordRPC {
|
||||||
|
|
||||||
class DiscordImpl: public DiscordInterface {
|
class DiscordImpl: public DiscordInterface {
|
||||||
public: DiscordImpl(Core::System & system_);
|
public:
|
||||||
~DiscordImpl() override;
|
DiscordImpl(Core::System & system_);
|
||||||
|
~DiscordImpl() override;
|
||||||
|
|
||||||
void Pause() override;
|
void Pause() override;
|
||||||
void Update() 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<bool> discord_thread_running;
|
||||||
|
|
||||||
std::string game_url {};
|
private:
|
||||||
std::string game_title {};
|
void UpdateGameStatus(bool use_default);
|
||||||
std::string game_title_id {};
|
|
||||||
std::string cached_url;
|
|
||||||
|
|
||||||
Core::System & system;
|
std::string game_url {};
|
||||||
u64 program_id = 0;
|
std::string game_title {};
|
||||||
};
|
std::string game_title_id {};
|
||||||
|
std::string cached_url;
|
||||||
|
|
||||||
|
Core::System & system;
|
||||||
|
u64 program_id = 0;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace DiscordRPC
|
} // namespace DiscordRPC
|
||||||
|
|||||||
Reference in New Issue
Block a user