+void BC_WindowBase::init_resources(float scale)
+{
+ if( resources ) return;
+ XInitThreads();
+ const char *env = getenv("BC_SCALE");
+ if( env ) scale = atof(env);
+ float x_scale = 1, y_scale = 1;
+ if( scale <= 0 ) {
+ BC_DisplayInfo info;
+ int wx, wy, ww, wh;
+ int cins = info.xinerama_big_screen();
+ if( !info.xinerama_geometry(cins, wx, wy, ww, wh) ) {
+ if( (x_scale = ww/1920.) < 1 ) x_scale = 1;
+ if( (y_scale = wh/1080.) < 1 ) y_scale = 1;
+ }
+ }
+ else
+ x_scale = y_scale = scale;
+ // constructor sets BC_WindowBase::resources
+ new BC_Resources(x_scale, y_scale);
+}
+void BC_WindowBase::finit_resources()
+{
+ delete resources; resources = 0;
+}
+