diff options
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r-- | libvo/video_out.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c index 3ae3e319ed..64b2a605c5 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -496,84 +496,3 @@ void vo_mouse_movement(struct vo *vo, int posx, int posy) snprintf(cmd_str, sizeof(cmd_str), "set_mouse_pos %i %i", posx, posy); mp_input_queue_cmd(vo->input_ctx, mp_input_parse_cmd(cmd_str)); } - -#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA) -/* Borrowed from vo_fbdev.c -Monitor ranges related functions*/ - -char *monitor_hfreq_str = NULL; -char *monitor_vfreq_str = NULL; -char *monitor_dotclock_str = NULL; - -float range_max(range_t *r) -{ -float max = 0; - - for (/* NOTHING */; (r->min != -1 && r->max != -1); r++) - if (max < r->max) max = r->max; - return max; -} - - -int in_range(range_t *r, float f) -{ - for (/* NOTHING */; (r->min != -1 && r->max != -1); r++) - if (f >= r->min && f <= r->max) - return 1; - return 0; -} - -range_t *str2range(char *s) -{ - float tmp_min, tmp_max; - char *endptr = s; // to start the loop - range_t *r = NULL; - int i; - - if (!s) - return NULL; - for (i = 0; *endptr; i++) { - if (*s == ',') - goto out_err; - if (!(r = realloc(r, sizeof(*r) * (i + 2)))) { - mp_msg(MSGT_GLOBAL, MSGL_WARN,"can't realloc 'r'\n"); - return NULL; - } - tmp_min = strtod(s, &endptr); - if (*endptr == 'k' || *endptr == 'K') { - tmp_min *= 1000.0; - endptr++; - } else if (*endptr == 'm' || *endptr == 'M') { - tmp_min *= 1000000.0; - endptr++; - } - if (*endptr == '-') { - tmp_max = strtod(endptr + 1, &endptr); - if (*endptr == 'k' || *endptr == 'K') { - tmp_max *= 1000.0; - endptr++; - } else if (*endptr == 'm' || *endptr == 'M') { - tmp_max *= 1000000.0; - endptr++; - } - if (*endptr != ',' && *endptr) - goto out_err; - } else if (*endptr == ',' || !*endptr) { - tmp_max = tmp_min; - } else - goto out_err; - r[i].min = tmp_min; - r[i].max = tmp_max; - if (r[i].min < 0 || r[i].max < 0) - goto out_err; - s = endptr + 1; - } - r[i].min = r[i].max = -1; - return r; -out_err: - free(r); - return NULL; -} - -/* Borrowed from vo_fbdev.c END */ -#endif |