summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/file_access.cpp2
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/os/main_loop.cpp2
-rw-r--r--core/os/main_loop.h3
-rw-r--r--core/os/os.cpp4
-rw-r--r--core/os/os.h2
6 files changed, 9 insertions, 6 deletions
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 31e7d19bae..ffa0cad8e4 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -100,7 +100,7 @@ FileAccess *FileAccess::open(const String& p_path, int p_mode_flags, Error *r_er
FileAccess *ret=NULL;
if (!(p_mode_flags&WRITE) && PackedData::get_singleton() && !PackedData::get_singleton()->is_disabled()) {
ret = PackedData::get_singleton()->try_open_path(p_path);
- if (ret) {
+ if (ret) {
if (r_error)
*r_error=OK;
return ret;
diff --git a/core/os/input.cpp b/core/os/input.cpp
index d7c0d86d64..70733aadec 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -211,6 +211,8 @@ void InputDefault::parse_input_event(const InputEvent& p_event) {
if (p_event.key.scancode==0)
break;
+ // print_line(p_event);
+
if (p_event.key.pressed)
keys_pressed.insert(p_event.key.scancode);
else
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index a8e02526b9..d01331a256 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -37,7 +37,7 @@ void MainLoop::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_WM_FOCUS_OUT);
BIND_CONSTANT(NOTIFICATION_WM_QUIT_REQUEST);
BIND_CONSTANT(NOTIFICATION_WM_UNFOCUS_REQUEST);
-
+ BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
};
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index b84d2841e1..6eb5881175 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -50,7 +50,8 @@ public:
NOTIFICATION_WM_FOCUS_IN = 5,
NOTIFICATION_WM_FOCUS_OUT = 6,
NOTIFICATION_WM_QUIT_REQUEST = 7,
- NOTIFICATION_WM_UNFOCUS_REQUEST = 8
+ NOTIFICATION_WM_UNFOCUS_REQUEST = 8,
+ NOTIFICATION_OS_MEMORY_WARNING = 9,
};
virtual void input_event( const InputEvent& p_event );
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 65d6ed50b2..11290409d5 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -225,7 +225,7 @@ void OS::print_all_resources(String p_to_file) {
void OS::print_resources_in_use(bool p_short) {
- //ResourceCache::dump(NULL,p_short);
+ ResourceCache::dump(NULL,p_short);
}
void OS::dump_resources_to_file(const char* p_file) {
@@ -438,7 +438,7 @@ int OS::get_processor_count() const {
return 1;
}
-Error OS::native_video_play(String p_path) {
+Error OS::native_video_play(String p_path, float p_volume) {
return FAILED;
};
diff --git a/core/os/os.h b/core/os/os.h
index e7fe0cb09e..24e2b4f2d4 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -321,7 +321,7 @@ public:
virtual String get_unique_ID() const;
- virtual Error native_video_play(String p_path);
+ virtual Error native_video_play(String p_path, float p_volume);
virtual bool native_video_is_playing() const;
virtual void native_video_pause();
virtual void native_video_stop();