MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ParseBindingAndGetSource

Method ParseBindingAndGetSource

pcsx2/Input/InputManager.cpp:267–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267bool InputManager::ParseBindingAndGetSource(const std::string_view binding, InputBindingKey* key, InputSource** source)
268{
269 std::string_view source_string, sub_binding;
270 if (!SplitBinding(binding, &source_string, &sub_binding))
271 return false;
272
273 for (u32 i = FIRST_EXTERNAL_INPUT_SOURCE; i < LAST_EXTERNAL_INPUT_SOURCE; i++)
274 {
275 if (s_input_sources[i]->IsInitialized())
276 {
277 std::optional<InputBindingKey> parsed_key = s_input_sources[i]->ParseKeyString(source_string, sub_binding);
278 if (parsed_key.has_value())
279 {
280 *key = parsed_key.value();
281 *source = s_input_sources[i].get();
282 return true;
283 }
284 }
285 }
286
287 return false;
288}
289
290TinyString InputManager::ConvertKeyboardKeyToString(InputBindingKey key, bool display)
291{

Callers

nothing calls this directly

Calls 4

IsInitializedMethod · 0.45
ParseKeyStringMethod · 0.45
valueMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected