summaryrefslogtreecommitdiffstats
path: root/core/os/os.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added a new MIDIDriver classMarcelo Fernandez2018-07-211-0/+10
|
* Fix build issues and typos after c69de2ba4Rémi Verschelde2018-07-201-1/+2
|
* Fix unwanted restartingvolzhs2018-07-201-0/+1
|
* -Project/Editor settings now use new inspectorJuan Linietsky2018-07-191-0/+12
| | | | | | | -Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
* Fixed OS.has_feature not using custom feature tags.matthew10062018-07-181-0/+3
|
* Merge pull request #14622 from bruvzg/non-rectangular-windowsHein-Pieter van Braam2018-05-081-0/+1
|\ | | | | Experimental support for windows with per-pixel transparency.
| * Experimental support for windows with per-pixel transparency (macOS, X11 and ↵bruvzg2018-04-071-0/+1
| | | | | | | | Windows).
* | Implement universal translation of touch to mousePedro J. Estébanez2018-04-301-1/+1
|/ | | | | | | | | | | | | | | | | | | Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*) The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers. Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse. *: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest. On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction. Plus: Improve/fix tracking of current mouse position. ** Summary of changes to settings: ** - `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse` - New setting: `input/pointing_devices/emulate_mouse_from_touch`
* Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez2018-03-041-0/+29
|
* Added OS::center_window to center the window precisely on desktop platformsMarcelo Fernandez2018-02-121-0/+11
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add epic hack so vsync can be toggled in run-time from script. Fixes #14458.Juan Linietsky2017-12-161-1/+10
| | | | Call needs to be routed via visual server to reach the proper thread.
* Remove get_stack_bottomRuslan Mustakov2017-12-161-4/+0
| | | | | It's not used in godot-nim any longer and there were no other uses for it.
* Allow customizing user:// path (folder in OS::get_data_path())Rémi Verschelde2017-11-261-7/+15
| | | | | | | | This allows to specify any valid folder name (including with subfolders) to use as user:// on all platforms. The folder is constrained to the platform-specific OS::get_data_path() (typically what `XDG_DATA_HOME` resolves to). Fixes #13236.
* Modified low processor sleep to 8000 and made it customizable (should be ↵Juan Linietsky2017-11-221-0/+11
| | | | customizable for editor too)
* Merge pull request #13130 from endragor/gdnative-android-exportRémi Verschelde2017-11-211-1/+1
|\ | | | | Proper GDNative export on Android
| * Proper GDNative export on AndroidRuslan Mustakov2017-11-211-1/+1
| |
* | Return and repair file loggingRuslan Mustakov2017-11-211-4/+13
|/ | | | And make it configurable, too.
* Allow configuring iOS exportRuslan Mustakov2017-11-211-0/+27
| | | | | | | | | | | | | | | | | - EditorExportPlugin's _export_begin accepts all the arguments related to the current export (is_debug, path, flags). - EditorExportPlugin API is extended with methods allowing to configure iOS export: add_ios_framework, add_ios_plist_content, add_ios_linker_flags, add_ios_bundle_file. - iOS export template now contains Godot as a static library so that it can be linked with third-party Frameworks and GDNative static libraries. - Adds method to DirAccess for recursive copying of a directory. - Fixes iOS export to work with Xcode 9 (released recently).
* Pass engine name and version parts as proper stringsRémi Verschelde2017-11-201-1/+1
| | | | | | Removes the need for _MKSTR all over the place which has the drawback of converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing a compilation error.
* Add initial support for the XDG Base Directory specRémi Verschelde2017-11-191-10/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spec version 0.7 from https://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html (latest as of this commit). Three virtual methods are added to OS for the various XDG paths we will use: - OS::get_data_path gives XDG_DATA_HOME, or if missing: ~/.local/share on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_config_path gives XDG_CONFIG_HOME, or if missing: ~/.config on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_cache_path gives XDG_CACHE_HOME, or if missing: ~/.cache on X11, ~/Library/Caches on macOS and %APPDATA% on Windows So for Windows there are no changes, for Linux we follow the full split spec and for macOS stuff will move from ~/.godot to ~/Library/Application Support/Godot. Support for system-wide installation of templates on Unix was removed for now, as it's a bit hackish and I don't think anyone uses it. user:// will still be OS::get_data_path() + "/godot/app_userdata/$name" by default, but when using the application/config/use_shared_user_dir option it will now use XDG_DATA_HOME/$name, e.g. ~/.local/share/MyGame. For now everything still goes in EditorSettings::get_settings_dir(), but this will be changed in a later commit to make use of the new splitting where relevant. Part of #3513.
* Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde2017-11-171-3/+3
| | | | | Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
* Make sure to obey hidpi to off by default, as present in project settings. ↵Juan Linietsky2017-10-051-1/+1
| | | | | | Set it to on by default for editor. Many integrated GPUs can't really get enough performance to play games at hidpi, so this should be enabled manually.
* Merge pull request #11823 from endragor/virtual-keyboard-heightGilles Roudiere2017-10-041-0/+4
|\ | | | | Allow to obtain virtual keyboard height
| * Allow to obtain virtual keyboard heightRuslan Mustakov2017-10-041-0/+4
| | | | | | | | | | | | | | | | On mobile platforms virtual keyboards take up significant amount of screen space and UI containing a text box may need to be adjusted after the keyboard appears to keep the text box visible to user. This commit adds a way to obtain virtual keyabord height so that controls are aware of how much they need to move.
* | fixed the OS.has_feature() API, and added support for 32 and 64.Juan Linietsky2017-10-031-1/+8
|/
* Extract logging logicRuslan Mustakov2017-09-251-16/+18
| | | | | | | | | | | | | | | | | | | Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors.
* Fix enums bindingsMaxim Sheronov2017-09-131-1/+1
| | | | | Add missed bindings for enums Move some enums to class to have correct output of api.json
* Fix use of unitialized variablesHein-Pieter van Braam2017-09-021-1/+2
| | | | The second in my quest to make Godot 3.x compile with -Werror on GCC7
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-1/+1
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-3/+3
|
* Add a way to retrieve stack bottom of the main threadRuslan Mustakov2017-07-251-0/+7
| | | | | | | | | I'm working on Nim bindings and Nim GC needs to know the stack boundaries to check whether certain pointers are located on the stack or in the heap. This commit adds godot_get_stack_bottom procedure to gdnative module which returns pointer to the stack bottom of the main thread. Later on this may be improved to return stack bottom of the current thread.
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-3/+21
| | | | -Added system for feature overrides, it's pretty cool :)
* -Reorganized all properties of project settings (Sorry, Again).Juan Linietsky2017-07-171-1/+1
| | | | | (Lot's of bloat accumulated, so it was time for clean up.) -Made EditorSettings and ProjectSettings search more useful (search in sections too)
* Removal of Image from Variant, converted to a Resource.Juan Linietsky2017-05-171-1/+1
|
* Fix PRNG randomization.Ferenc Arn2017-04-171-1/+0
| | | | | | | | PCG32 doesn't like small seeds, which leads to zero random values (prior to #7532, zero values were handled as special cases). Use a large default seed, and also add a shift in Math::randomize. Fixes #8423.
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-118/+84
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Add API to access battery power stateJulian Murgia2017-03-041-0/+10
| | | | | | | | | | | | | | Done: - X11, server (tested) - Windows (developed, would be nice to retest) - OSX (not tested) Prepared (not developed): - Android (code is here, but may not compile) - iphone - winrt - bb10 - haiku - javascript
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..
* Style: Fix whole-line commented codeRémi Verschelde2017-01-141-1/+1
| | | | | They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
* Replace Engine version API by preexisting OS oneRémi Verschelde2017-01-131-25/+4
| | | | | | It outputs a single Dictionary with all relevant information as keys, that will less bloat the documentation and provide all details in one function call.
* Created new Engine singleton, and moved engine related OS functions to it.Juan Linietsky2017-01-131-46/+3
|
* renamed joystick to joypad everywhere around source code!Juan Linietsky2017-01-081-1/+1
|
* Memory pool vectors (DVector) have been enormously simplified in code, and ↵Juan Linietsky2017-01-071-1/+1
| | | | renamed to PoolVector
* -Changed memory functions, Memory::alloc_static*, simplified them, made them ↵Juan Linietsky2017-01-061-4/+4
| | | | | | aligned to 16 -Changed Vector<> template to fit this.
* -Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky2017-01-051-2/+2
| | | | | | | | categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-1/+1
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()