Add an Apply button to the Web UI when running as a Win32 Service (#700)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <csignal>
|
||||
#include <filesystem>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
@@ -522,4 +523,16 @@ void streaming_will_stop() {
|
||||
DwmEnableMMCSS(false);
|
||||
}
|
||||
|
||||
bool restart_supported() {
|
||||
// Restart is supported if we're running from the service
|
||||
return (GetConsoleWindow() == NULL);
|
||||
}
|
||||
|
||||
bool restart() {
|
||||
// Raise SIGINT to trigger the graceful exit logic. The service will
|
||||
// restart us in a few seconds.
|
||||
std::raise(SIGINT);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace platf
|
||||
Reference in New Issue
Block a user