Skip to content

Commit bc137e9

Browse files
G3darclaude
andcommitted
Feature: Auto-launch Stream Deck on MonsterDeck startup
- Add EnsureStreamDeckRunning() to automatically detect and launch Stream Deck - Prevents connection issues after system reboots - Searches common installation paths for StreamDeck.exe - Bump version to 0.1.3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7272b1b commit bc137e9

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

apps/MonsterDeck/MainWindow.xaml.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,62 @@ private async void Window_Loaded(object sender, RoutedEventArgs e)
5353
InitTrayIcon();
5454
InitHotkeys();
5555
StartForegroundWatcher();
56+
EnsureStreamDeckRunning();
5657
InitStreamDeckBridge();
5758
}
5859

60+
private void EnsureStreamDeckRunning()
61+
{
62+
try
63+
{
64+
// Check if Stream Deck is already running
65+
var existingProcess = Process.GetProcessesByName("StreamDeck");
66+
if (existingProcess.Length > 0)
67+
{
68+
System.Diagnostics.Debug.WriteLine("StreamDeck: Already running");
69+
return;
70+
}
71+
72+
// Common Stream Deck installation paths
73+
var streamDeckPaths = new[]
74+
{
75+
@"C:\Program Files\Elgato\StreamDeck\StreamDeck.exe",
76+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Elgato\StreamDeck\StreamDeck.exe"),
77+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Elgato\StreamDeck\StreamDeck.exe")
78+
};
79+
80+
string? streamDeckExe = null;
81+
foreach (var path in streamDeckPaths)
82+
{
83+
if (File.Exists(path))
84+
{
85+
streamDeckExe = path;
86+
break;
87+
}
88+
}
89+
90+
if (streamDeckExe == null)
91+
{
92+
System.Diagnostics.Debug.WriteLine("StreamDeck: Not installed");
93+
return;
94+
}
95+
96+
// Launch Stream Deck
97+
System.Diagnostics.Debug.WriteLine($"StreamDeck: Launching from {streamDeckExe}");
98+
Process.Start(new ProcessStartInfo
99+
{
100+
FileName = streamDeckExe,
101+
UseShellExecute = true
102+
});
103+
104+
System.Diagnostics.Debug.WriteLine("StreamDeck: Launched successfully");
105+
}
106+
catch (Exception ex)
107+
{
108+
System.Diagnostics.Debug.WriteLine($"StreamDeck: Failed to launch: {ex.Message}");
109+
}
110+
}
111+
59112
private void InitStreamDeckBridge()
60113
{
61114
try

installer/monsterdeck.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define MyAppName "MonsterDeck"
55
#ifndef MyAppVersion
6-
#define MyAppVersion "0.1.2"
6+
#define MyAppVersion "0.1.3"
77
#endif
88
#define MyAppPublisher "G3dar"
99
#define MyAppURL "https://github.com/G3dar/worktools"

0 commit comments

Comments
 (0)