mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-04-10 15:44:33 +00:00
refactor(process): re-order variables to avoid unused variable when tray is disabled (#1963)
This commit is contained in:
parent
c0164caaaa
commit
852db4877d
@ -258,13 +258,11 @@ namespace proc {
|
|||||||
|
|
||||||
void
|
void
|
||||||
proc_t::terminate() {
|
proc_t::terminate() {
|
||||||
bool has_run = _app_id > 0;
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
placebo = false;
|
placebo = false;
|
||||||
process_end(_process, _process_handle);
|
process_end(_process, _process_handle);
|
||||||
_process = bp::child();
|
_process = bp::child();
|
||||||
_process_handle = bp::group();
|
_process_handle = bp::group();
|
||||||
_app_id = -1;
|
|
||||||
|
|
||||||
for (; _app_prep_it != _app_prep_begin; --_app_prep_it) {
|
for (; _app_prep_it != _app_prep_begin; --_app_prep_it) {
|
||||||
auto &cmd = *(_app_prep_it - 1);
|
auto &cmd = *(_app_prep_it - 1);
|
||||||
@ -293,12 +291,16 @@ namespace proc {
|
|||||||
|
|
||||||
_pipe.reset();
|
_pipe.reset();
|
||||||
#if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1
|
#if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1
|
||||||
|
bool has_run = _app_id > 0;
|
||||||
|
|
||||||
// Only show the Stopped notification if we actually have an app to stop
|
// Only show the Stopped notification if we actually have an app to stop
|
||||||
// Since terminate() is always run when a new app has started
|
// Since terminate() is always run when a new app has started
|
||||||
if (proc::proc.get_last_run_app_name().length() > 0 && has_run) {
|
if (proc::proc.get_last_run_app_name().length() > 0 && has_run) {
|
||||||
system_tray::update_tray_stopped(proc::proc.get_last_run_app_name());
|
system_tray::update_tray_stopped(proc::proc.get_last_run_app_name());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
_app_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<ctx_t> &
|
const std::vector<ctx_t> &
|
||||||
|
Loading…
x
Reference in New Issue
Block a user