summaryrefslogtreecommitdiffstats
path: root/mpvcore/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-31 23:23:38 +0100
committerwm4 <wm4@nowhere>2013-10-31 23:30:14 +0100
commit71ded03123a704ddcbf018dcb0ec633475ccb04a (patch)
treebddcea247a2e2396fbf414168b25aac2a57316d7 /mpvcore/m_option.h
parent94542abf2e2ccb123cf3b0c9eef76a2290dd19b1 (diff)
downloadmpv-71ded03123a704ddcbf018dcb0ec633475ccb04a.tar.bz2
mpv-71ded03123a704ddcbf018dcb0ec633475ccb04a.tar.xz
command: add generic "multiply" command
Essentially works like "add".
Diffstat (limited to 'mpvcore/m_option.h')
-rw-r--r--mpvcore/m_option.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mpvcore/m_option.h b/mpvcore/m_option.h
index d357456f63..443412a035 100644
--- a/mpvcore/m_option.h
+++ b/mpvcore/m_option.h
@@ -273,6 +273,10 @@ struct m_option_type {
// the value is clipped, or wraps around to the opposite max/min.
void (*add)(const m_option_t *opt, void *val, double add, bool wrap);
+ // Multiply the value with the factor f. The callback must clip the result
+ // to the valid value range of the option.
+ void (*multiply)(const m_option_t *opt, void *val, double f);
+
// Clamp the value in val to the option's valid value range.
// Return values:
// M_OPT_OUT_OF_RANGE: val was invalid, and modified (clamped) to be valid