Added ui-clear to ini parsing
This commit is contained in:
parent
8b4ff2af45
commit
9e2952c18d
3 changed files with 11 additions and 2 deletions
|
@ -365,6 +365,7 @@ CommandLineParser::init_ini(Options* opts)
|
|||
("headset-debug", &opts->headset_debug)
|
||||
("headset-dump", &opts->headset_dump)
|
||||
("headset-play", &opts->headset_play)
|
||||
("ui-clear", boost::bind(&Options::set_ui_clear, boost::ref(opts)), boost::function<void ()>())
|
||||
;
|
||||
|
||||
m_ini.section("xboxdrv-daemon")
|
||||
|
@ -672,8 +673,7 @@ CommandLineParser::parse_args(int argc, char** argv, Options* options)
|
|||
break;
|
||||
|
||||
case OPTION_UI_CLEAR:
|
||||
opts.get_controller_options().uinput.get_axis_map().clear();
|
||||
opts.get_controller_options().uinput.get_btn_map().clear();
|
||||
opts.set_ui_clear();
|
||||
break;
|
||||
|
||||
case OPTION_UI_AXISMAP:
|
||||
|
|
|
@ -125,6 +125,13 @@ Options::get_controller_options() const
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Options::set_ui_clear()
|
||||
{
|
||||
get_controller_options().uinput.get_axis_map().clear();
|
||||
get_controller_options().uinput.get_btn_map().clear();
|
||||
}
|
||||
|
||||
void
|
||||
Options::next_controller()
|
||||
{
|
||||
|
|
|
@ -130,6 +130,8 @@ public:
|
|||
ControllerOptions& get_controller_options();
|
||||
const ControllerOptions& get_controller_options() const;
|
||||
|
||||
void set_ui_clear();
|
||||
|
||||
void next_controller();
|
||||
void next_config();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue