Handle change of res/colours in zms by reloading the monitor object.

pull/4202/head
Isaac Connor 2023-12-08 10:14:38 -05:00
parent ca24b43f36
commit 2770a9caa7
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ bool StreamBase::loadMonitor(int p_monitor_id) {
if ( !monitor->connect() ) {
Error("Unable to connect to monitor id %d for streaming", monitor_id);
monitor->disconnect();
// If we couldn't connect, it might be due to size mismatch in shm. Need to reload
if ( !(monitor = Monitor::Load(monitor_id, false, Monitor::QUERY)))
Error("Unable to reload monitor id %d for streaming", monitor_id);
return false;
}