Add an Apply button to the Web UI when running as a Win32 Service (#700)
This commit is contained in:
@@ -318,6 +318,9 @@ void adjust_thread_priority(thread_priority_e priority);
|
||||
void streaming_will_start();
|
||||
void streaming_will_stop();
|
||||
|
||||
bool restart_supported();
|
||||
bool restart();
|
||||
|
||||
input_t input();
|
||||
void move_mouse(input_t &input, int deltaX, int deltaY);
|
||||
void abs_mouse(input_t &input, const touch_port_t &touch_port, float x, float y);
|
||||
|
||||
@@ -165,6 +165,16 @@ void streaming_will_stop() {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
bool restart_supported() {
|
||||
// Restart not supported yet
|
||||
return false;
|
||||
}
|
||||
|
||||
bool restart() {
|
||||
// Restart not supported yet
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace source {
|
||||
enum source_e : std::size_t {
|
||||
#ifdef SUNSHINE_BUILD_CUDA
|
||||
|
||||
@@ -143,6 +143,16 @@ void streaming_will_stop() {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
bool restart_supported() {
|
||||
// Restart not supported yet
|
||||
return false;
|
||||
}
|
||||
|
||||
bool restart() {
|
||||
// Restart not supported yet
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace platf
|
||||
|
||||
namespace dyn {
|
||||
|
||||
@@ -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