diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 10 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 1 | ||||
| -rw-r--r-- | core/input_map.cpp | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index aff047177c..9d380aa33a 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1325,6 +1325,15 @@ String _File::get_as_text() const { } + + +String _File::get_md5(const String& p_path) const { + + return FileAccess::get_md5(p_path); + +} + + String _File::get_line() const{ ERR_FAIL_COND_V(!f,String()); @@ -1513,6 +1522,7 @@ void _File::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_buffer","len"),&_File::get_buffer); ObjectTypeDB::bind_method(_MD("get_line"),&_File::get_line); ObjectTypeDB::bind_method(_MD("get_as_text"),&_File::get_as_text); + ObjectTypeDB::bind_method(_MD("get_md5","path"),&_File::get_md5); ObjectTypeDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap); ObjectTypeDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap); ObjectTypeDB::bind_method(_MD("get_error:Error"),&_File::get_error); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 2c43390d3c..64a4e94aec 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -368,6 +368,7 @@ public: DVector<uint8_t> get_buffer(int p_length) const; ///< get an array of bytes String get_line() const; String get_as_text() const; + String get_md5(const String& p_path) const; /**< use this for files WRITTEN in _big_ endian machines (ie, amiga/mac) * It's not about the current CPU type but file formats. diff --git a/core/input_map.cpp b/core/input_map.cpp index d4560a1e1b..874ce1c424 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -156,10 +156,7 @@ void InputMap::action_erase_event(const StringName& p_action,const InputEvent& p List<InputEvent>::Element *E=_find_event(input_map[p_action].inputs,p_event); if (E) - return; //already gots - - input_map[p_action].inputs.erase(E); - + input_map[p_action].inputs.erase(E); } |