Skip to content

Commit

Permalink
Fix discord ipc find (for me at least). Run async setActivity.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Feb 11, 2025
1 parent 378a28a commit e2f8bae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/tools/ecode/plugins/discordRPC/discordRPCplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ void DiscordRPCplugin::onRegisterListeners( UICodeEditor* editor, std::vector<Ui
a.largeImage = mcLangBindings.value( name, DISCORDRPC_DEFAULT_ICON );
}

mIPC.setActivity( std::move( a ) );
getUISceneNode()->getThreadPool()->run(
[this, a = std::move( a )]() mutable { mIPC.setActivity( std::move( a ) ); } );
}
} ) );
}
Expand Down
3 changes: 1 addition & 2 deletions src/tools/ecode/plugins/discordRPC/sdk/ipc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ bool DiscordIPC::tryConnect() {
validPaths.push_back( value );
}

validPaths.push_back( "/tmp" ); // Hard coded fallback

std::vector<std::string> checkPaths;
checkPaths.push_back( "/tmp" ); // Hard coded fallback

for ( const auto& basePath : validPaths ) {
for ( const auto& additionalPath : additionalPaths ) {
Expand Down

0 comments on commit e2f8bae

Please sign in to comment.