feat(display): Add revert display config on disconnect option (#3613)
This commit is contained in:
parent
ce28e36a47
commit
5b36357133
7 changed files with 46 additions and 0 deletions
|
|
@ -1882,11 +1882,17 @@ namespace stream {
|
|||
|
||||
// If this is the last session, invoke the platform callbacks
|
||||
if (--running_sessions == 0) {
|
||||
bool revert_display_config {config::video.dd.config_revert_on_disconnect};
|
||||
if (proc::proc.running()) {
|
||||
#if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1
|
||||
system_tray::update_tray_pausing(proc::proc.get_last_run_app_name());
|
||||
#endif
|
||||
} else {
|
||||
// We have no app running and also no clients anymore.
|
||||
revert_display_config = true;
|
||||
}
|
||||
|
||||
if (revert_display_config) {
|
||||
display_device::revert_configuration();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue