MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / convert_back

Method convert_back

compat/input_event_parser_v2.cpp:910–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

908}
909
910Ref<MissingResource> InputEventConverterCompat::convert_back(const Ref<Resource> &res, int ver_major, Error *r_error) {
911 if (res->get_class() == "InputEventMIDI") {
912 return get_missing_resource_from_real(res, ver_major, midi_prop_map);
913 }
914 // otherwise instantiate the new properties
915 HashMap<String, String> required_prop_map;
916 for (auto &[old_prop, new_prop] : InputEventConverterCompat::old_prop_to_new_prop) {
917 required_prop_map[new_prop] = old_prop;
918 }
919 auto mr = get_missing_resource_from_real(res, ver_major, required_prop_map);
920 ERR_FAIL_COND_V_MSG(mr.is_null(), Ref<MissingResource>(), "Failed to create missing resource");
921 return mr;
922}
923
924V2InputEvent::V2Type InputEventParserV2::get_v2_type(const InputEventType &p_event) {
925 switch (p_event) {

Callers 4

save_to_fileMethod · 0.45
saveMethod · 0.45
write_compat_v2_v3Method · 0.45
encode_variant_3Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected