mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-31 06:59:45 +08:00
GUI: Discord Rich Presence (#73)
Publish launcher status to Discord over its local IPC named pipe with no external dependency: framed-JSON handshake and SET_ACTIVITY, a background worker with reconnection and latest-state dedup, and silent no-op behavior when Discord is not running. - "Browsing the library" (game count, session elapsed) while idle; "Playing <game>" with title id and elapsed time during emulation. Activities always carry timestamps: Discord accepts but does not render activities without them - Presence flips back to browsing immediately on Stop instead of waiting for process exit: a game wedged in a GPU driver call can outlive termination for a while. Stop also terminates the job object so the whole child tree dies even in that state - Toggle in the Options panel (persisted); client id configurable in gui-settings.json; SHARPEMU_LOG_DISCORD=1 traces queue/send/failure
This commit is contained in:
@@ -252,10 +252,14 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<TextBlock Classes="fieldLabel" Text="Log to file" />
|
||||
<ToggleSwitch x:Name="LogToFileToggle" OnContent="On" OffContent="Off" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<StackPanel Margin="0,0,24,0">
|
||||
<TextBlock Classes="fieldLabel" Text="Title music" />
|
||||
<ToggleSwitch x:Name="TitleMusicToggle" OnContent="On" OffContent="Off" IsChecked="True" />
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Classes="fieldLabel" Text="Discord presence" />
|
||||
<ToggleSwitch x:Name="DiscordToggle" OnContent="On" OffContent="Off" />
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
Reference in New Issue
Block a user