Compare commits

..

No commits in common. "main" and "v1.3.3" have entirely different histories.
main ... v1.3.3

1 changed files with 8 additions and 6 deletions

View File

@ -24,18 +24,20 @@ LastFM* lastfm = nullptr;
void handleRPCTasks() { void handleRPCTasks() {
while (true) { while (true) {
while (!Discord_IsConnected()) { while (true) {
DiscordEventHandlers handlers{}; DiscordEventHandlers discordHandler{};
auto app = utils::getApp(lastMediaSource); auto app = utils::getApp(lastMediaSource);
Discord_Initialize(app.clientId.c_str(), &handlers); Discord_Initialize(app.clientId.c_str(), &discordHandler);
if (Discord_IsConnected())
break;
std::this_thread::sleep_for(std::chrono::seconds(1)); std::this_thread::sleep_for(std::chrono::seconds(1));
} }
while (true) {
while (Discord_IsConnected()) {
Discord_RunCallbacks(); Discord_RunCallbacks();
if (!Discord_IsConnected())
break;
std::this_thread::sleep_for(std::chrono::seconds(1)); std::this_thread::sleep_for(std::chrono::seconds(1));
} }
Discord_Shutdown(); Discord_Shutdown();
} }
} }