diff options
author | wm4 <wm4@nowhere> | 2012-09-18 14:00:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-12 10:10:31 +0200 |
commit | cac7702565b560d5a16bc82bf553d1a4c08297e1 (patch) | |
tree | 5d1246e28da246dc26fa54de267c35545ac0f09f /DOCS/encoding.rst | |
parent | 3d67041089c7945dcea0162c0038e495d588b379 (diff) | |
download | mpv-cac7702565b560d5a16bc82bf553d1a4c08297e1.tar.bz2 mpv-cac7702565b560d5a16bc82bf553d1a4c08297e1.tar.xz |
commands: handle property stepping in a generic way
Instead of forcing each property implementation implement its own logic
for M_PROPERTY_STEP_UP/M_PROPERTY_STEP_DOWN, handle it in the generic
property code.
Rename the M_PROPERTY_STEP_UP command to M_PROPERTY_SWITCH (the other
property command, M_PROPERTY_STEP_DOWN, isn't needed anymore: stepping
downwards is done by passing a negative argument). Always use double as
argument type; it makes the code easier, and covers all property types.
Move the code which does the actual type-specific value stepping to
m_option.c (the idea is that m_option handles types).
Some properties still have custom handlers implemented with
M_PROPERTY_SWITCH. They can't be mapped to the generic mechanism,
because their value range is dynamic or entirely unknown.
For some properties, the default step stride is changed to 1. This is no
issue, because the default bindings in input.conf all use an explicit
stride in the affected cases.
Diffstat (limited to 'DOCS/encoding.rst')
0 files changed, 0 insertions, 0 deletions