track->Timer = atof(str + 6);
} else if (!strncmp(str,"WrapStyle:", 10)) {
track->WrapStyle = atoi(str + 10);
+ } else if (!strncmp(str, "ScaledBorderAndShadow:", 22)) {
+ track->ScaledBorderAndShadow = parse_bool(str + 22);
}
return 0;
}
frame_context.font_scale = global_settings->font_size_coeff *
frame_context.orig_height / frame_context.track->PlayResY;
- frame_context.border_scale = ((double)frame_context.orig_height) / frame_context.track->PlayResY;
+ if (frame_context.track->ScaledBorderAndShadow)
+ frame_context.border_scale = ((double)frame_context.orig_height) / frame_context.track->PlayResY;
+ else
+ frame_context.border_scale = 1.;
frame_context.font_scale_x = 1.;
int PlayResY;
double Timer;
int WrapStyle;
+ char ScaledBorderAndShadow;
int default_style; // index of default style
return result;
}
+// Return a boolean value for a string
+char parse_bool(char* str) {
+ while (*str == ' ' || *str == '\t')
+ str++;
+ if (!strncasecmp(str, "yes", 3))
+ return 1;
+ else if (strtol(str, NULL, 10) > 0)
+ return 1;
+ return 0;
+}
+
#if 0
static void sprint_tag(uint32_t tag, char* dst)
{
int mystrtou32(char** p, int base, uint32_t* res);
int mystrtod(char** p, double* res);
int strtocolor(char** q, uint32_t* res);
+char parse_bool(char* str);
static inline int d6_to_int(int x) {
return (x + 32) >> 6;