Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord presence - Clean up code and migrate to Lachee's Discord RPC C# library #32

Open
twopointzero opened this issue Apr 15, 2020 · 0 comments
Labels
chore Changes unrelated to enhancements or bug fixes

Comments

@twopointzero
Copy link
Owner

twopointzero commented Apr 15, 2020

Can you write a one-sentence description of your request?
The current Discord code is messy and depends on unmanaged code, so clean it up and migrate it to Lachee's Discord RPC C# library: https://github.com/Lachee/discord-rpc-csharp

What is the current behavior?
Discord presence code is poorly encapsulated and wraps and calls the deprecated unmanaged Discord RPC library.

What is the expected behavior?
It should be well encapsulated and call a supported library, preferably one which is purely managed code.

What is the motivation / use case for changing the behavior?

  • Original motivation is Sentry report TJAPLAYER3-K, which describes a crash when starting to play a song. The crash location is at the point of updating Discord presence, and its suspected provocation is an empty note chart.
  • Reviewing calls to update Discord presence revealed poor encapsulation of the Discord-related code together with manual management of memory utilized by unmanaged code.
  • It also reminded me that we currently carry the discord-rpc.dll unmanaged library alongside the exe when packaging for release, and it is always nice to eliminate unmanaged code where possible.
@twopointzero twopointzero added the chore Changes unrelated to enhancements or bug fixes label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes unrelated to enhancements or bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant