diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 11 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 3 | ||||
| -rw-r--r-- | core/input_map.cpp | 48 | ||||
| -rw-r--r-- | core/io/LICENSE-InfoZip.txt | 60 | ||||
| -rw-r--r-- | core/io/LICENSE-MiniZip.txt | 32 | ||||
| -rw-r--r-- | core/io/ioapi.c | 2 | ||||
| -rw-r--r-- | core/io/ioapi.h | 2 | ||||
| -rw-r--r-- | core/io/unzip.c | 2 | ||||
| -rw-r--r-- | core/io/unzip.h | 2 | ||||
| -rw-r--r-- | core/io/zip.c | 2 | ||||
| -rw-r--r-- | core/io/zip.h | 2 | ||||
| -rw-r--r-- | core/object.cpp | 7 | ||||
| -rw-r--r-- | core/object.h | 1 | ||||
| -rw-r--r-- | core/os/os.cpp | 8 | ||||
| -rw-r--r-- | core/os/os.h | 3 |
15 files changed, 155 insertions, 30 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index addc26525..31c0c0e20 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -436,6 +436,15 @@ Error _OS::set_thread_name(const String& p_name) { return Thread::set_name(p_name); }; +void _OS::set_use_vsync(bool p_enable) { + OS::get_singleton()->set_use_vsync(p_enable); +} + +bool _OS::is_vsnc_enabled() const { + + return OS::get_singleton()->is_vsnc_enabled(); +} + /* enum Weekday { @@ -1110,6 +1119,8 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_thread_name","name"),&_OS::set_thread_name); + ObjectTypeDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync); + ObjectTypeDB::bind_method(_MD("is_vsnc_enabled"),&_OS::is_vsnc_enabled); BIND_CONSTANT( DAY_SUNDAY ); BIND_CONSTANT( DAY_MONDAY ); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index af89536c4..441927940 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -282,6 +282,9 @@ public: Error set_thread_name(const String& p_name); + void set_use_vsync(bool p_enable); + bool is_vsnc_enabled() const; + static _OS *get_singleton() { return singleton; } _OS(); diff --git a/core/input_map.cpp b/core/input_map.cpp index c26622054..08ee8138a 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -327,56 +327,56 @@ void InputMap::load_default() { InputEvent key; key.type=InputEvent::KEY; - add_action("input/ui_accept"); + add_action("ui_accept"); key.key.scancode=KEY_RETURN; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); key.key.scancode=KEY_ENTER; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); key.key.scancode=KEY_SPACE; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); - add_action("input/ui_select"); + add_action("ui_select"); key.key.scancode=KEY_SPACE; - action_add_event("input/ui_select",key); + action_add_event("ui_select",key); - add_action("input/ui_cancel"); + add_action("ui_cancel"); key.key.scancode=KEY_ESCAPE; - action_add_event("input/ui_cancel",key); + action_add_event("ui_cancel",key); - add_action("input/ui_focus_next"); + add_action("ui_focus_next"); key.key.scancode=KEY_TAB; - action_add_event("input/ui_focus_next",key); + action_add_event("ui_focus_next",key); - add_action("input/ui_focus_prev"); + add_action("ui_focus_prev"); key.key.scancode=KEY_TAB; key.key.mod.shift=true; - action_add_event("input/ui_focus_prev",key); + action_add_event("ui_focus_prev",key); key.key.mod.shift=false; - add_action("input/ui_left"); + add_action("ui_left"); key.key.scancode=KEY_LEFT; - action_add_event("input/ui_left",key); + action_add_event("ui_left",key); - add_action("input/ui_right"); + add_action("ui_right"); key.key.scancode=KEY_RIGHT; - action_add_event("input/ui_right",key); + action_add_event("ui_right",key); - add_action("input/ui_up"); + add_action("ui_up"); key.key.scancode=KEY_UP; - action_add_event("input/ui_up",key); + action_add_event("ui_up",key); - add_action("input/ui_down"); + add_action("ui_down"); key.key.scancode=KEY_DOWN; - action_add_event("input/ui_down",key); + action_add_event("ui_down",key); - add_action("input/ui_page_up"); + add_action("ui_page_up"); key.key.scancode=KEY_PAGEUP; - action_add_event("input/ui_page_up",key); + action_add_event("ui_page_up",key); - add_action("input/ui_page_down"); + add_action("ui_page_down"); key.key.scancode=KEY_PAGEDOWN; - action_add_event("input/ui_page_down",key); + action_add_event("ui_page_down",key); // set("display/orientation", "landscape"); diff --git a/core/io/LICENSE-InfoZip.txt b/core/io/LICENSE-InfoZip.txt new file mode 100644 index 000000000..bcfe47e97 --- /dev/null +++ b/core/io/LICENSE-InfoZip.txt @@ -0,0 +1,60 @@ +This is version 2007-Mar-4 of the Info-ZIP license. +The definitive version of this document should be available at +ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and +a copy at http://www.info-zip.org/pub/infozip/license.html. + + +Copyright (c) 1990-2007 Info-ZIP. All rights reserved. + +For the purposes of this copyright and license, "Info-ZIP" is defined as +the following set of individuals: + + Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, + Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, + Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, + David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, + Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, + Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, + Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, + Rich Wales, Mike White. + +This software is provided "as is," without warranty of any kind, express +or implied. In no event shall Info-ZIP or its contributors be held liable +for any direct, indirect, incidental, special or consequential damages +arising out of the use of or inability to use this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the above disclaimer and the following restrictions: + + 1. Redistributions of source code (in whole or in part) must retain + the above copyright notice, definition, disclaimer, and this list + of conditions. + + 2. Redistributions in binary form (compiled executables and libraries) + must reproduce the above copyright notice, definition, disclaimer, + and this list of conditions in documentation and/or other materials + provided with the distribution. The sole exception to this condition + is redistribution of a standard UnZipSFX binary (including SFXWiz) as + part of a self-extracting archive; that is permitted without inclusion + of this license, as long as the normal SFX banner has not been removed + from the binary or disabled. + + 3. Altered versions--including, but not limited to, ports to new operating + systems, existing ports with new graphical interfaces, versions with + modified or added functionality, and dynamic, shared, or static library + versions not from Info-ZIP--must be plainly marked as such and must not + be misrepresented as being the original source or, if binaries, + compiled from the original source. Such altered versions also must not + be misrepresented as being Info-ZIP releases--including, but not + limited to, labeling of the altered versions with the names "Info-ZIP" + (or any variation thereof, including, but not limited to, different + capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the + explicit permission of Info-ZIP. Such altered versions are further + prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP + e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP + will provide support for the altered versions. + + 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," + "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its + own source and binary releases. diff --git a/core/io/LICENSE-MiniZip.txt b/core/io/LICENSE-MiniZip.txt new file mode 100644 index 000000000..0e8950f86 --- /dev/null +++ b/core/io/LICENSE-MiniZip.txt @@ -0,0 +1,32 @@ +Credits + + Gilles Vollant - Original MiniZip author + Even Rouault - ZIP64 unzip Support + Daniel Borca - BZip Compression method support in unzip + Mathias Svensson - ZIP64 zip support + Mathias Svensson - BZip Compression method support in zip + + This version has been modified for Godot Engine + + +License +---------------------------------------------------------------------------- + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +---------------------------------------------------------------------------- diff --git a/core/io/ioapi.c b/core/io/ioapi.c index 8818199f0..d6063a5fe 100644 --- a/core/io/ioapi.c +++ b/core/io/ioapi.c @@ -6,7 +6,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt */ diff --git a/core/io/ioapi.h b/core/io/ioapi.h index 24bf61261..cb6cb7e76 100644 --- a/core/io/ioapi.h +++ b/core/io/ioapi.h @@ -5,7 +5,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt Changes diff --git a/core/io/unzip.c b/core/io/unzip.c index b438021ad..78672677f 100644 --- a/core/io/unzip.c +++ b/core/io/unzip.c @@ -10,7 +10,7 @@ Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt ------------------------------------------------------------------------------------ diff --git a/core/io/unzip.h b/core/io/unzip.h index cb3d239ea..f67c3b2fa 100644 --- a/core/io/unzip.h +++ b/core/io/unzip.h @@ -10,7 +10,7 @@ Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt --------------------------------------------------------------------------------- diff --git a/core/io/zip.c b/core/io/zip.c index c4ab93ab8..44c79195d 100644 --- a/core/io/zip.c +++ b/core/io/zip.c @@ -7,7 +7,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt Changes Oct-2009 - Mathias Svensson - Remove old C style function prototypes diff --git a/core/io/zip.h b/core/io/zip.h index 85f93568c..37478b34c 100644 --- a/core/io/zip.h +++ b/core/io/zip.h @@ -6,7 +6,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt --------------------------------------------------------------------------- diff --git a/core/object.cpp b/core/object.cpp index bedab6328..cbe24a49f 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1401,6 +1401,13 @@ bool Object::has_persistent_signal_connections() const { return false; } +void Object::get_signals_connected_to_this(List<Connection> *p_connections) const { + + for (const List<Connection>::Element *E=connections.front();E;E=E->next()) { + p_connections->push_back(E->get()); + } +} + Error Object::connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds,uint32_t p_flags) { diff --git a/core/object.h b/core/object.h index e886aa345..ce545a58e 100644 --- a/core/object.h +++ b/core/object.h @@ -605,6 +605,7 @@ public: void get_signal_connection_list(const StringName& p_signal,List<Connection> *p_connections) const; void get_all_signal_connections(List<Connection> *p_connections) const; bool has_persistent_signal_connections() const; + void get_signals_connected_to_this(List<Connection> *p_connections) const; Error connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds=Vector<Variant>(),uint32_t p_flags=0); void disconnect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method); diff --git a/core/os/os.cpp b/core/os/os.cpp index 4daf41e68..e501bc2eb 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -539,6 +539,14 @@ String OS::get_joy_guid(int p_device) const { void OS::set_context(int p_context) { } +void OS::set_use_vsync(bool p_enable) { + +} + +bool OS::is_vsnc_enabled() const{ + + return true; +} OS::OS() { last_error=NULL; diff --git a/core/os/os.h b/core/os/os.h index a1047bd48..c291d0925 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -420,6 +420,9 @@ public: virtual void set_context(int p_context); + virtual void set_use_vsync(bool p_enable); + virtual bool is_vsnc_enabled() const; + bool is_hidpi_allowed() const { return _allow_hidpi; } OS(); virtual ~OS(); |
