summaryrefslogtreecommitdiffstats
path: root/m_option.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-03-31 06:19:29 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:05 +0300
commit9db0c118d3acee07880472e590dc0a25e5b51be6 (patch)
treef7b1664d28d5300bde7f863c8d32324a427112d2 /m_option.h
parentf894294bae1ff9b2c1802a5ae7e73cfdbc26e645 (diff)
downloadmpv-9db0c118d3acee07880472e590dc0a25e5b51be6.tar.bz2
mpv-9db0c118d3acee07880472e590dc0a25e5b51be6.tar.xz
Start of new option system
First part of option restructuring. The aim is to move option values from a huge number of separate globals to a single non-global struct. This part adds some support for parsing option values into such struct instances, and moves one example option (fixed-vo) to the struct.
Diffstat (limited to 'm_option.h')
-rw-r--r--m_option.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/m_option.h b/m_option.h
index a54aac540f..cf7a1d495d 100644
--- a/m_option.h
+++ b/m_option.h
@@ -282,6 +282,10 @@ struct m_option {
* Passing a 'default func' is still valid for all func based option types.
*/
void* priv;
+
+ int new;
+
+ int offset;
};
@@ -476,20 +480,6 @@ m_option_print(const m_option_t* opt, const void* val_ptr) {
return (char*)-1;
}
-/// Helper around \ref m_option_type::save.
-inline static void
-m_option_save(const m_option_t* opt,void* dst, void* src) {
- if(opt->type->save)
- opt->type->save(opt,dst,src);
-}
-
-/// Helper around \ref m_option_type::set.
-inline static void
-m_option_set(const m_option_t* opt,void* dst, void* src) {
- if(opt->type->set)
- opt->type->set(opt,dst,src);
-}
-
/// Helper around \ref m_option_type::copy.
inline static void
m_option_copy(const m_option_t* opt,void* dst, void* src) {