mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 00:40:25 +00:00
displays: changed api for mainloop
- removed `needs_mainloop` attribute and deduce if mainloop is needed from the presence of _run callback (the information is now redundant only displays needing/running mainloop should announce _run callback) - run the custom mainloop (currently only Syphon!) only when display doesn't run its mainloop. This allows running Syphon and GL/SDL display because it connects to the display mainloop.
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1658,17 +1658,7 @@ int main(int argc, char *argv[])
|
||||
control_start(control);
|
||||
kc.start();
|
||||
|
||||
if(mainloop) {
|
||||
if (display_needs_mainloop(uv.display_device)) {
|
||||
throw string("Cannot run display when "
|
||||
"another mainloop registered!\n");
|
||||
}
|
||||
display_run_new_thread(uv.display_device);
|
||||
mainloop(mainloop_udata);
|
||||
display_join(uv.display_device);
|
||||
} else {
|
||||
display_run_this_thread(uv.display_device);
|
||||
}
|
||||
display_run_mainloop(uv.display_device);
|
||||
|
||||
} catch (ug_no_error const &e) {
|
||||
exit_uv(0);
|
||||
|
||||
Reference in New Issue
Block a user