Browse Source

Fix fail to register hotkeys after wake up (#1954)

tags/4.1.1
celeron533 6 years ago
parent
commit
80e4bec8c8
2 changed files with 6 additions and 3 deletions
  1. +5
    -2
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  2. +1
    -1
      shadowsocks-csharp/Program.cs

+ 5
- 2
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -89,10 +89,13 @@ namespace Shadowsocks.Controller
StartTrafficStatistics(61);
}
public void Start()
public void Start(bool regHotkeys = true)
{
Reload();
HotkeyReg.RegAllHotkeys();
if (regHotkeys)
{
HotkeyReg.RegAllHotkeys();
}
}
protected void ReportError(Exception e)


+ 1
- 1
shadowsocks-csharp/Program.cs View File

@@ -127,7 +127,7 @@ namespace Shadowsocks
Thread.Sleep(10 * 1000);
try
{
MainController.Start();
MainController.Start(false);
Logging.Info("controller started");
}
catch (Exception ex)


Loading…
Cancel
Save