Panda3DS/include/discord_rpc.hpp
Jonian Guveli 156328fbfb
[WIP] Qt: Add config window controls (#655)
* Qt: Add config window controls

* Fix Windows build

* Fix audio slider

* Qt configs: Make thread-safe, properly update audio enable & renderdoc settings

* Qt configs: Add `connectCheckbox` function

* Qt configs: Add `connectCheckbox` function

* Rename spuLayout

* Add Discord RPC reloading

* Allow configuring the app icon

* Qt: Serialize icon & theme, properly set them

* Add rnap and rcow icons

* Qt: Fix forceShadergen config

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
2024-12-01 23:06:47 +02:00

25 lines
No EOL
426 B
C++

#pragma once
#ifdef PANDA3DS_ENABLE_DISCORD_RPC
#include <discord_rpc.h>
#include <cstdint>
#include <string>
namespace Discord {
enum class RPCStatus { Idling, Playing };
class RPC {
std::uint64_t startTimestamp;
bool enabled = false;
public:
void init();
void update(RPCStatus status, const std::string& title);
void stop();
bool running() const { return enabled; }
};
} // namespace Discord
#endif