summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp4
-rw-r--r--core/io/resource_loader.cpp7
-rw-r--r--core/io/tcp_server.cpp2
-rw-r--r--core/os/file_access.cpp2
-rw-r--r--core/project_settings.cpp3
-rw-r--r--core/resource.cpp3
-rw-r--r--core/safe_refcount.cpp2
-rw-r--r--core/variant_parser.cpp4
8 files changed, 16 insertions, 11 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 69d0ba7851..ce08b3f754 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -149,7 +149,7 @@ _ResourceSaver *_ResourceSaver::singleton = NULL;
void _ResourceSaver::_bind_methods() {
ClassDB::bind_method(D_METHOD("save", "path", "resource:Resource", "flags"), &_ResourceSaver::save, DEFVAL(0));
- ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type"), &_ResourceSaver::get_recognized_extensions);
+ ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type:Resource"), &_ResourceSaver::get_recognized_extensions);
BIND_CONSTANT(FLAG_RELATIVE_PATHS);
BIND_CONSTANT(FLAG_BUNDLE_RESOURCES);
@@ -998,7 +998,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window);
- ClassDB::bind_method(D_METHOD("set_ime_position"), &_OS::set_ime_position);
+ ClassDB::bind_method(D_METHOD("set_ime_position", "position"), &_OS::set_ime_position);
ClassDB::bind_method(D_METHOD("set_screen_orientation", "orientation"), &_OS::set_screen_orientation);
ClassDB::bind_method(D_METHOD("get_screen_orientation"), &_OS::get_screen_orientation);
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 57acb6c754..9b89fa3399 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -28,12 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "resource_loader.h"
-#include "project_settings.h"
#include "io/resource_import.h"
#include "os/file_access.h"
#include "os/os.h"
#include "path_remap.h"
#include "print_string.h"
+#include "project_settings.h"
#include "translation.h"
ResourceFormatLoader *ResourceLoader::loader[MAX_LOADERS];
@@ -84,7 +84,7 @@ void ResourceLoader::get_recognized_extensions_for_type(const String &p_type, Li
void ResourceInteractiveLoader::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_resource"), &ResourceInteractiveLoader::get_resource);
+ ClassDB::bind_method(D_METHOD("get_resource:Resource"), &ResourceInteractiveLoader::get_resource);
ClassDB::bind_method(D_METHOD("poll"), &ResourceInteractiveLoader::poll);
ClassDB::bind_method(D_METHOD("wait"), &ResourceInteractiveLoader::wait);
ClassDB::bind_method(D_METHOD("get_stage"), &ResourceInteractiveLoader::get_stage);
@@ -430,6 +430,9 @@ void ResourceLoader::reload_translation_remaps() {
void ResourceLoader::load_translation_remaps() {
+ if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ return;
+
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
List<Variant> keys;
remaps.get_key_list(&keys);
diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp
index 29a80ecc19..4c891188ee 100644
--- a/core/io/tcp_server.cpp
+++ b/core/io/tcp_server.cpp
@@ -49,7 +49,7 @@ void TCP_Server::_bind_methods() {
ClassDB::bind_method(D_METHOD("listen", "port", "bind_address"), &TCP_Server::listen, DEFVAL("*"));
ClassDB::bind_method(D_METHOD("is_connection_available"), &TCP_Server::is_connection_available);
- ClassDB::bind_method(D_METHOD("take_connection"), &TCP_Server::take_connection);
+ ClassDB::bind_method(D_METHOD("take_connection:StreamPeerTCP"), &TCP_Server::take_connection);
ClassDB::bind_method(D_METHOD("stop"), &TCP_Server::stop);
}
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 2bb676381f..7f5a84843c 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -300,6 +300,8 @@ Vector<String> FileAccess::get_csv_line(String delim) const {
String l;
int qc = 0;
do {
+ ERR_FAIL_COND_V(eof_reached(), Vector<String>());
+
l += get_line() + "\n";
qc = 0;
for (int i = 0; i < l.length(); i++) {
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 1a0a50a10f..0426af3fa0 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -602,7 +602,8 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
file->store_string("config_version=" + itos(FORMAT_VERSION) + "\n");
if (p_custom_features != String())
- file->store_string("_custom_featores=\"" + p_custom_features + "\"\n");
+ file->store_string("custom_features=\"" + p_custom_features + "\"\n");
+ file->store_string("\n");
for (Map<String, List<String> >::Element *E = props.front(); E; E = E->next()) {
diff --git a/core/resource.cpp b/core/resource.cpp
index a7a5498ef6..5625784396 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -31,7 +31,6 @@
#include "core_string_names.h"
#include "io/resource_loader.h"
-#include "io/resource_loader.h"
#include "os/file_access.h"
#include "script_language.h"
#include <stdio.h>
@@ -340,7 +339,7 @@ void Resource::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_local_scene:Node"), &Resource::get_local_scene);
ClassDB::bind_method(D_METHOD("setup_local_to_scene"), &Resource::setup_local_to_scene);
- ClassDB::bind_method(D_METHOD("duplicate", "subresources"), &Resource::duplicate, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("duplicate:Resource", "subresources"), &Resource::duplicate, DEFVAL(false));
ADD_SIGNAL(MethodInfo("changed"));
ADD_GROUP("Resource", "resource_");
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene");
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp
index d18c90adfa..d7e5297321 100644
--- a/core/safe_refcount.cpp
+++ b/core/safe_refcount.cpp
@@ -185,7 +185,7 @@ static _ALWAYS_INLINE_ uint64_t _atomic_increment_impl(register uint64_t *pw) {
static _ALWAYS_INLINE_ uint64_t _atomic_sub_impl(register uint64_t *pw, register uint64_t val) {
-#if _WIN32_WINNT >= 0x0601 // Windows 7+
+#if _WIN32_WINNT >= 0x0601 && !defined(UWP_ENABLED) // Windows 7+ except UWP
return InterlockedExchangeSubtract64(pw, val) - val;
#else
return InterlockedExchangeAdd64((LONGLONG volatile *)pw, -(int64_t)val) - val;
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 26a6a05a30..398f20caf3 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -1099,7 +1099,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PoolFloatArray" || id == "FloatArray") {
+ } else if (id == "PoolRealArray" || id == "FloatArray") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
@@ -1855,7 +1855,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
case Variant::POOL_REAL_ARRAY: {
- p_store_string_func(p_store_string_ud, "PoolFloatArray( ");
+ p_store_string_func(p_store_string_ud, "PoolRealArray( ");
PoolVector<real_t> data = p_variant;
int len = data.size();
PoolVector<real_t>::Read r = data.read();