CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/UI/DiscordIntegration.h
Views: 1401
1
#pragma once
2
3
#include <string_view>
4
5
// Simple wrapper around the Discord api.
6
7
// All platforms should call it, but we only actually take action on
8
// platforms where we want it enabled (only PC initially).
9
10
// All you need to call is FrameCallback, Shutdown, and UpdatePresence.
11
12
class Discord {
13
public:
14
~Discord();
15
void Update(); // Call every frame or at least regularly. Will initialize if necessary.
16
void Shutdown();
17
18
void SetPresenceGame(std::string_view gameTitle);
19
void SetPresenceMenu();
20
void ClearPresence();
21
22
private:
23
void Init();
24
bool IsEnabled() const;
25
26
bool initialized_ = false;
27
};
28
29
extern Discord g_Discord;
30
31