X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcresources.C;h=1d52855990ee9e7e5a10eb32f518e446e98d3087;hb=cec4b4235b1b164d1afd583169c4dbde1f9bf784;hp=2683bd20ba0d6407ef2147eb56b05dcc25683184;hpb=0df48ad2d876409c5beeae2e21933a728ea76c33;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C index 2683bd20..1d528559 100644 --- a/cinelerra-5.1/guicast/bcresources.C +++ b/cinelerra-5.1/guicast/bcresources.C @@ -362,27 +362,20 @@ VFrame *BC_Resources::default_vscroll_data[10] = { 0, }; VFrame *BC_Resources::default_hscroll_data[10] = { 0, }; VFrame *BC_Resources::default_icon_img = 0; -BC_Resources::BC_Resources() +BC_Resources::BC_Resources(float x_scale, float y_scale) { + BC_WindowBase::resources = this; synchronous = 0; vframe_shm = 0; - double default_scale = 1; - char *env = getenv("BC_SCALE"); - if( !env ) { - BC_DisplayInfo info; - int wx, wy, ww, wh; - int cins = info.xinerama_big_screen(); - if( !info.xinerama_geometry(cins, wx, wy, ww, wh) ) { - x_scale = ww / 1920.; - y_scale = wh / 1080.; - default_scale = bmin(x_scale, y_scale); - } - } - else { - if( (default_scale = atof(env)) <= 0 ) default_scale = 1; - x_scale = y_scale = default_scale; - } - env = getenv("BC_FONT_DEBUG"); + use_shm = -1; + shm_reply = 1; + + if( x_scale <= 0 ) x_scale = 1; + if( y_scale <= 0 ) y_scale = x_scale; + this->x_scale = x_scale; + this->y_scale = y_scale; + float default_scale = bmin(x_scale, y_scale); + const char *env = getenv("BC_FONT_DEBUG"); font_debug = env ? atoi(env) : 0; env = getenv("BC_FONT_SCALE"); font_scale = env ? atof(env) : default_scale; @@ -766,9 +759,6 @@ new_vframes(10,default_vscroll_data, generic_button_margin = xS(15); draw_clock_background=1; - use_shm = -1; - shm_reply = 1; - // Initialize bg_color = ORANGE; bg_shadow1 = DKGREY;