- MainLoop(doc, bounds, c);
- else if (mode == OUTPUT_TO_BMP)
- OverlayBMP(doc, output_to_bmp, bounds, c);
+ MainLoop(doc, scr, view);
+ else if (mode == OUTPUT_TO_BMP) //TODO: Remove this shit
+ OverlayBMP(doc, input_bmp, output_bmp, bounds, c);
+
+ #ifndef CONTROLPANEL_DISABLED
+
+ if (cp_thread != NULL)
+ {
+ int cp_return;
+ qApp->quit(); // will close the control panel
+ // (seems to not explode if the qApp has already been quit)
+ SDL_WaitThread(cp_thread, &cp_return);
+ Debug("ControlPanel thread returned %d", cp_return);
+ }
+ #endif //CONTROLPANEL_DISABLED