| 908 | } |
| 909 | |
| 910 | Ref<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 | |
| 924 | V2InputEvent::V2Type InputEventParserV2::get_v2_type(const InputEventType &p_event) { |
| 925 | switch (p_event) { |
no outgoing calls
no test coverage detected