X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmain.C;h=4b04a11b2f6347b17a08831a6a19d822d12916f0;hb=033efab12586e8086014c814a5360f211d228ac3;hp=f422092ea8b219211ab5c2cc2e4b5bda4582f3bc;hpb=3bf30d220f7855b995b887dc10812ae3780e6805;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/main.C b/cinelerra-5.1/cinelerra/main.C index f422092e..4b04a11b 100644 --- a/cinelerra-5.1/cinelerra/main.C +++ b/cinelerra-5.1/cinelerra/main.C @@ -46,7 +46,24 @@ #include #ifdef LEAKER -#define STRC(v) printf("==new %p from %p sz %jd\n", v, __builtin_return_address(0), n) +#if 0 // track allocators +#include +#define BT_BUF_SIZE 100 +static void leaker() +{ + void *buffer[BT_BUF_SIZE]; + int nptrs = backtrace(buffer, BT_BUF_SIZE); + char **trace = backtrace_symbols(buffer, nptrs); + if( !trace ) return; + for( int i=0; i filenames; + filenames.set_array_delete(); FileSystem fs; time_t st; time(&st); @@ -241,7 +278,10 @@ int main(int argc, char *argv[]) } } - + float scale = operation == DO_GUI ? + get_layout_scale() : 1; + // runs XInitThreads + BC_WindowBase::init_resources(scale); if( operation == DO_GUI || operation == DO_DEAMON || operation == DO_DEAMON_FG || @@ -310,7 +350,7 @@ int main(int argc, char *argv[]) break; } case DO_BATCHRENDER: { - BatchRenderThread *thread = new BatchRenderThread; + BatchRenderThread *thread = new BatchRenderThread(0); thread->start_rendering(config_path, batch_path); break; } @@ -384,6 +424,7 @@ DISABLE_BUFFER filenames.remove_all_objects(); Units::finit(); + BC_WindowBase::finit_resources(); time_t et; time(&et); long dt = et - st;