Skip to content

Commit

Permalink
Handle change of res/colours in zms by reloading the monitor object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Oct 16, 2024
1 parent ca24b43 commit 2770a9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/zm_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2770a9c

Please sign in to comment.