MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / get_input_from_enum_name

Method get_input_from_enum_name

src/game/controls.cpp:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46recomp::GameInput recomp::get_input_from_enum_name(const std::string_view enum_name) {
47 auto find_it = std::find(input_enum_names.begin(), input_enum_names.end(), enum_name);
48 if (find_it == input_enum_names.end()) {
49 return recomp::GameInput::COUNT;
50 }
51
52 return static_cast<recomp::GameInput>(find_it - input_enum_names.begin());
53}
54
55// Due to an RmlUi limitation this can't be const. Ideally it would return a const reference or even just a straight up copy.
56recomp::InputField& recomp::get_input_binding(GameInput input, size_t binding_index, recomp::InputDevice device) {

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected