X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcresources.C;h=3fa8bed1f53ba30d891a90a65d13ded8a7107dac;hp=2fb8f4f8b200aaeeff7fd47e256e07d0e3d201f4;hb=refs%2Fheads%2Fmaster;hpb=3643286e2dbb3002604a62e3e6fd834716b4ae63 diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C index 2fb8f4f8..3fa8bed1 100644 --- a/cinelerra-5.1/guicast/bcresources.C +++ b/cinelerra-5.1/guicast/bcresources.C @@ -39,6 +39,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include #include @@ -298,6 +301,7 @@ int BC_Resources::machine_cpus = 1; int BC_Resources::get_machine_cpus() { +#if !defined(__FreeBSD__) int cpus = 1; FILE *proc = fopen("/proc/cpuinfo", "r"); if( proc ) { @@ -315,6 +319,14 @@ int BC_Resources::get_machine_cpus() fclose(proc); } return cpus; +#else + int mib[2], ncpu; + size_t len = sizeof(ncpu); + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1; + return ncpu; +#endif } void BC_Resources::new_vframes(int n, VFrame *vframes[], ...) @@ -367,9 +379,13 @@ BC_Resources::BC_Resources(float x_scale, float y_scale) BC_WindowBase::resources = this; synchronous = 0; vframe_shm = 0; +#if !defined(__FreeBSD__) use_shm = -1; shm_reply = 1; - +#else + use_shm = 0; + shm_reply = 0; +#endif if( x_scale <= 0 ) x_scale = 1; if( y_scale <= 0 ) y_scale = x_scale; this->x_scale = x_scale; @@ -785,6 +801,7 @@ new_vframes(10,default_vscroll_data, button_uphighlighted = RED; // upper side when highlighted tumble_data = 0; + tumblepatch_data = 0; tumble_duration = 150; ok_images = default_ok_images; @@ -856,14 +873,14 @@ new_vframes(10,default_vscroll_data, filebox_columntype[1] = FILEBOX_SIZE; filebox_columntype[2] = FILEBOX_DATE; filebox_columntype[3] = FILEBOX_EXTENSION; - filebox_columnwidth[0] = xS(200); + filebox_columnwidth[0] = xS(300); filebox_columnwidth[1] = xS(100); - filebox_columnwidth[2] = xS(100); - filebox_columnwidth[3] = xS(100); + filebox_columnwidth[2] = xS(150); + filebox_columnwidth[3] = xS(49); dirbox_columntype[0] = FILEBOX_NAME; dirbox_columntype[1] = FILEBOX_DATE; - dirbox_columnwidth[0] = xS(200); - dirbox_columnwidth[1] = xS(100); + dirbox_columnwidth[0] = xS(400); + dirbox_columnwidth[1] = xS(199); filebox_text_images = default_filebox_text_images; filebox_icons_images = default_filebox_icons_images;