Auto-enable Steamless mode after startup reconnect

This commit is contained in:
ntspaceowl committed 2026-05-30 22:00:00 +09:00
1 parent a660f671b4
commit bc3e9932b1
4 files changed
+29

No files matched your search

+8
View File
@@ -14,6 +14,8 @@ TrayApp::TrayApp() {
}
TrayApp::~TrayApp() {
if (m_hwnd)
KillTimer(m_hwnd, TIMER_RECONNECT);
RemoveTrayIcon();
g_app = nullptr;
}
@@ -52,6 +54,7 @@ bool TrayApp::Init(HINSTANCE hInstance) {
LoadSettings();
AddTrayIcon();
SetTimer(m_hwnd, TIMER_RECONNECT, 2000, nullptr);
return true;
}
@@ -121,6 +124,11 @@ LRESULT TrayApp::HandleMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) {
m_controller->OnDeviceChange();
return TRUE;
case WM_TIMER:
if (wp == TIMER_RECONNECT)
m_controller->Tick();
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;