+static float get_layout_scale()
+{
+ char config_path[BCTEXTLEN];
+ sprintf(config_path,"%s/%s", File::get_config_path(), CONFIG_FILE);
+ FILE *fp = fopen(config_path,"r");
+ if( !fp ) return 0;
+ float scale = 0;
+ char line[BCTEXTLEN];
+ line[BCTEXTLEN-1] = 0;
+ while( fgets(line, BCTEXTLEN-1, fp) ) {
+ if( !strncmp(line, "LAYOUT_SCALE ",12+1) ) {
+ scale = atof(line+12);
+ break;
+ }
+ }
+ fclose(fp);
+ return scale;
+}
+