Commit graph

490 commits

Author SHA1 Message Date
Bastiaan Olij a9581d2b3f Added constants for the main buttons and axis used in VR 2019-06-13 22:54:08 +10:00
bruvzg 54863b20e6
Removes redundant "display/window/per_pixel_transparency/splash" setting, improves per pixel transparency documentation. 2019-06-04 11:21:29 +03:00
Gilles Roudiere f247832832 Add configurable strength value to InputEventAction 2019-06-02 14:31:34 +02:00
bruvzg 2b9ed68d6a
Add native window/taskbar icon support for Windows and macOS.
Co-authored-by: Markus Törnqvist <mjt@nysv.org>
2019-05-24 14:23:57 +03:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
Gilles Roudière 3bfa080c9c Fix NaN with get_action_strength 2019-05-15 11:21:10 +02:00
Rémi Verschelde 9dc9434b1b
Merge pull request #24437 from mateusfccp/single_quotes_option
Add settings for single-quotes on completion
2019-04-30 14:58:33 +02:00
Juan Linietsky cd4449e7ab Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
Guilherme Felipe 1bae73d7d0 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
Juan Linietsky a20235aeb0 Add ability to edit editor feature profiles
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-04-08 19:18:51 -03:00
Juan Linietsky a18989602b Clean up notifications and merge Node and MainLoop ones for clarity, closes #27614 2019-04-04 10:34:41 -03:00
Marcelo Fernandez ea0c398a19 Fix MIDI Note Off missing on some devices 2019-03-18 15:54:32 -03:00
Pedro J. Estébanez f757460ec8 Fix fake null-motion mouse event flood
This commit also improves a bit the code quality by making the intent of fake events (and themselves) more explicit.

Fixes #26460.
2019-03-09 22:04:17 +01:00
DESKTOP-3H3MR3A\eloisa b22cf46fdb Request Android record permission when needed 2019-03-08 12:38:36 -03:00
Rémi Verschelde b811207406 More style cleanup... 2019-03-04 10:11:29 +01:00
Juan Linietsky a1e73dcc94 Add support for event accumlation (off by default, on for editor), fixes #26536 2019-03-03 19:53:13 -03:00
Juan Linietsky a9fe834a8e
Merge pull request #26547 from vnen/gdscript-dependency-parse
Add a parse mode for GDScript which doesn't load dependencies
2019-03-03 18:00:12 -03:00
Juan Linietsky ae886a6f32 Ability to keep pumping messages while being debugged, may be a solution for #21431 2019-03-03 17:12:19 -03:00
George Marques 4f0590338f
Add function to get String from FileAccess 2019-03-03 16:51:53 -03:00
marxin aff84ec55d Fix -Wsuggest-attribute=format warnings. 2019-02-27 06:56:50 +01:00
Juan Linietsky 5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
Hugo Locurcio b54910eb05
Make Button shortcuts triggerable by gamepads
This closes #25741.
2019-02-16 00:29:23 +01:00
Rémi Verschelde b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Rémi Verschelde 034cd62a77 Warn when using GPU particles with GLES2
Closes #25733.
2019-02-09 20:49:58 +01:00
Ignacio Etcheverry 4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry 41873ffa88 Added set_environment to OS class 2019-02-03 05:38:47 +01:00
Pedro J. Estébanez 496d8f19fc Let memory stat functions return uint64_t 2019-01-30 19:07:46 +01:00
Rémi Verschelde c3b0ee5941 Fix code style issues 2019-01-26 22:35:31 +01:00
Juan Linietsky 6fa632b821 Add function to obtain filesystem type from DirAccess.
Change EditorFileSystem to not use directory modification times on FAT32, fixes #20946
2019-01-21 18:06:14 -03:00
Hein-Pieter van Braam 4240e3d668 Optimizations for trivial types
Relying on various compiler primitives we can reduce the work done
in our memory allocators and CowData. For types with trivial ctors or
dtors we can skip looping over all elements when creating, resizing,
and destroying lists of objects.

These primitives are supported by clang, msvc, and GCC. However, once
we've moved to C++11 we can rely on several std:: primitives that do
the same thing and are standardized.

In my testing the extra conditionals introduced here get removed from
the generated program entirely as the results for these primitives is
known at compile time.
2019-01-03 08:47:34 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
volzhs 84d060c768 Added OS.get_system_time_msecs() 2018-12-20 18:50:50 +09:00
Mateus Felipe C. C. Pinto ca1935d6f7 Add settings for single-quotes on completion 2018-12-18 12:48:36 -02:00
Chaosus 70c3270dfa Removed error message arriving whenever csv file changed 2018-12-16 07:09:33 +03:00
Rémi Verschelde c8a5400654
Merge pull request #24241 from Rubonnek/move-to-initializer-list
Moved member variables to initializer list
2018-12-12 09:25:34 +01:00
Wilson E. Alvarez 08f22f1cf0
Moved member variables to initializer list 2018-12-11 18:33:01 -05:00
Rémi Verschelde 4c41e29c8e
Merge pull request #23923 from bruvzg/ime_gdscript
Changes IME to make it possible to use it from gdscript/gdnative
2018-12-11 18:00:48 +01:00
Rémi Verschelde fa91944c06
Merge pull request #22630 from dualtagh/22478
22478: Can't duplicate folder with another folder inside
2018-12-07 23:12:06 +01:00
Rémi Verschelde dc2fadc14d
Merge pull request #22733 from guilhermefelipecgs/fix_wm_class
[x11] Use "application/config/name" for WM_CLASS
2018-12-07 22:35:17 +01:00
bruvzg 4554c682e6
Changes IME input to use notification instead of callback, exposes IME methods to gdscript/gdnative. 2018-11-23 14:07:48 +02:00
allkhor eacb8600f4 FileAccess::store_csv_line() don't added unnecessary double quotes. 2018-11-22 19:31:34 +06:00
Davide Baldo b98263013a Fixed the default value for Input.action_press() from commit 8c45282 2018-11-17 20:45:24 +00:00
Kanabenki 48166a9f3c Add store_csv_line method for File 2018-11-16 11:09:05 +01:00
Davide Baldo 1b0c7515ff Allow to specify a custom strength when calling Input.action_press(), this allows virtual axis, mainly for mobile. 2018-11-10 10:25:59 +00:00
Fabio Alessandrelli 67177586d3 Fix potentially unininitialized pointer write. 2018-10-07 14:50:14 +02:00
Guilherme Felipe f402253939 [x11] Use "application/config/name" for WM_CLASS 2018-10-05 17:18:10 -03:00
Rémi Verschelde f5532bb650 Fix unused variable and wrong warning workaround
I had been looking at the wrong line all along when attempting to fix:
```
core/os/memory.cpp:184:13: warning: unused variable 's' [-Wunused-variable]
                uint64_t *s = (uint64_t *)mem;
                          ^
```
2018-10-04 15:38:03 +02:00
Rémi Verschelde f48ee838e7 Fix GCC 8 warnings about potentially unitialized variables
Fixes the following GCC 8 warnings:
```
core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized]

core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
```
2018-10-04 13:08:41 +02:00
Rémi Verschelde 97b9697ea2 Fix some OSX and iOS Clang warnings
Fixes the following XCode 9.4.1 warnings:
```
core/os/memory.cpp:175:13: warning: unused variable 's' [-Wunused-variable]
drivers/coremidi/core_midi.cpp:68:14: warning: comparison between NULL and non-pointer ('MIDIEndpointRef' (aka 'unsigned int') and NULL) [-Wnull-arithmetic]
drivers/gles2/rasterizer_gles2.cpp:77:24: warning: unused function '_gl_debug_print' [-Wunused-function,34]
drivers/unix/thread_posix.cpp:106:12: warning: unused variable 'running_thread' [-Wunused-variable,34]
modules/gdnative/nativescript/nativescript.h:371:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
platform/iphone/gl_view.mm:56:14: warning: unused variable 'video_previous_volume' [-Wunused-variable,34]
platform/iphone/gl_view.mm:251:12: warning: unused function 'get_first_id' [-Wunused-function,34]
platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,34]
platform/osx/os_osx.mm:79:15: warning: unused function 'convertRectToBacking' [-Wunused-function]
```
2018-10-04 11:50:16 +02:00
karroffel a0f206aae8 fix enum cast warnings on clang 2018-10-04 09:17:59 +02:00
Dualtagh Murray f325896c80 22478: Can't duplicate folder with another folder inside 2018-10-02 16:21:35 +01:00
Rémi Verschelde a9e17af09a SCons: Build core's thirdparty code in own environment
Also move Zlib and Zstd's build instructions to core/SCsub.
2018-09-28 11:40:41 +02:00
Rémi Verschelde 7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde cdc411fd54 Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings:
```
core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress]
servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress]

drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith]

modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr]

editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive
modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file

editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed
modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed
scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed
scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed
```
2018-09-27 16:33:52 +02:00
Rémi Verschelde c9df3fbfdb
Merge pull request #21954 from isaacremnant/fix_inputs
Fix is_action_pressed for InputEventActions
2018-09-14 18:06:11 +02:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
isaacremnant bf16f89a30 Fix is_action_pressed for InputEventAction. 2018-09-10 15:15:06 -04:00
Jared 4ccf25a577 Added multi-monitor support for center_window() 2018-09-03 07:41:04 +03:00
Michael Alexsander Silva Dias cf183efbcf Change some instances of args named "ev" to "event" 2018-09-01 17:03:41 -03:00
Rémi Verschelde 72996df656
Revert "Try closing gracefully before terminating process" 2018-08-27 17:32:43 +02:00
Juan Linietsky c6b340ea98
Merge pull request #20712 from marcelofg55/midi_open_close
Add OS::open_midi_inputs and OS::close_midi_inputs
2018-08-24 12:17:14 -03:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Juan Linietsky a1b594c2fc Switched AnimatedTexture to a readers-writers lock, solves a race condition and fixes #20221 2018-08-23 13:28:36 -03:00
Marcin Zawiejski ca1c851dbd Try closing gracefully before terminating process
Use a Microsoft recommended way of process termination for the project
process run from the editor. This allows loaded DLLs to receive and handle
DLL_PROCESS_DETACH notification and cleanup any global state before the
process actually exits.
2018-08-20 22:41:06 +02:00
Aaron Franke cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
Juan Linietsky ea3d997f9d
Revert "added get_creation_time function for gdscript" 2018-08-10 13:29:49 -03:00
Juan Linietsky 275e0d5ee4
Merge pull request #18914 from notwarp/master
added get_creation_time function for gdscript
2018-08-10 13:28:47 -03:00
Marcelo Fernandez 05fc12ddb6 Add OS::open_midi_inputs and OS::close_midi_inputs 2018-08-04 10:07:46 -03:00
Unknown 7fbb826422 Fix #20564 HDR import fail
Token has extra "0" at the end so it fail condition checking.
2018-07-31 21:34:44 +07:00
Rémi Verschelde 4e4702e386
Merge pull request #20464 from Calinou/add-editor-standalone-feature-tags
Add "editor" and "standalone" feature tags
2018-07-28 10:49:27 +02:00
Rémi Verschelde e6aec27428
Merge pull request #20511 from maksloboda/InputEventActionFix
Fixed shortcuts not working with InputEventActions
2018-07-28 09:48:44 +02:00
Max c2be1a75a0 Fixed shortcuts not working with InputEventActions 2018-07-27 15:09:41 +03:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Hugo Locurcio 0254a40817
Add "editor" and "standalone" feature tags
These feature tags can be used to check whether the project was
started from an editor binary or from an export template binary.
2018-07-25 23:27:50 +02:00
Marcelo Fernandez 7a5f9fc08e Added a new MIDIDriver class 2018-07-21 09:09:42 -03:00
Rémi Verschelde 8c9e10553c Fix build issues and typos after c69de2ba4 2018-07-20 08:37:10 +02:00
volzhs 515c848ba8 Fix unwanted restarting 2018-07-20 10:41:32 +09:00
Juan Linietsky c69de2ba46 -Project/Editor settings now use new inspector
-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
2018-07-19 19:02:04 -03:00
matthew1006 25e64ffa20 Fixed OS.has_feature not using custom feature tags. 2018-07-18 09:22:59 +01:00
unknown 9cc41a59ac Added support for extra mouse buttons. 2018-07-09 14:34:19 +03:00
Marcelo Fernandez deebeb2742 Add a new notification to detect crashes on native scripts 2018-07-02 16:18:58 -03:00
Saracen c5bdb5b1d8 IME context detection. 2018-06-11 17:22:11 +01:00
Daniele Giuliani d315b0fb8a added get_creation_time function for gdscript 2018-05-16 00:50:57 +02:00
Hein-Pieter van Braam e668757aa9
Merge pull request #14622 from bruvzg/non-rectangular-windows
Experimental support for windows with per-pixel transparency.
2018-05-08 16:44:35 +02:00
Blazej Floch c45f44d856 Local debugger fixes and extensions
- Adds q/quit option to console debugging
- Adds options (variable_prefix)
- Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows)
- Added option to list all breakpoints
- Fixes add/remove breakpoint bug (invalid path parsing)
- Minor cleanup
2018-05-07 23:17:06 -04:00
Rémi Verschelde 18c28c159d
Merge pull request #17196 from RandomShaper/improve-gui-touch
Implement universal translation of touch to mouse (3.1)
2018-05-02 10:47:49 +02:00
Pedro J. Estébanez de9d40a953 Implement universal translation of touch to mouse
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`
2018-04-30 19:03:38 +02:00
groud 0aa8b35ee6 Fixing input strength and the impossibility to erase action events 2018-04-25 22:32:09 +02:00
Gilles Roudiere 7e89dc432c Fixes left/up axis not mappable as actions 2018-04-18 21:38:52 +02:00
Juan Linietsky 1a3688d0cc
Merge pull request #16902 from groud/analog_action_system
Allow actions to provide an analog value
2018-04-18 07:21:29 -03:00
Gilles Roudiere ebfa731012 Allow actions to provide an analog value 2018-04-16 23:20:43 +02:00
Ruslan Mustakov 1d9a3a9b1c iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.
2018-04-11 14:53:24 +07:00
Guilherme Felipe 4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
bruvzg ddae098dee
Experimental support for windows with per-pixel transparency (macOS, X11 and Windows). 2018-04-07 17:11:45 +03:00
Andrea Catania 2f9354016f
Fixed signal input variable name 2018-04-06 09:09:40 +02:00
bruvzg 5ba984fc8c
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts. 2018-03-28 20:22:59 +03:00
Leon Krause 25800ffb0e Add RWLockDummy for NO_THREADS builds 2018-03-20 05:37:42 +01:00
Hein-Pieter van Braam 9bc0503c91
Merge pull request #17376 from marcelofg55/file_get_path
Added File.get_path and File.get_path_absolute functions
2018-03-15 22:21:21 +01:00
Marcelo Fernandez a4e64c5454 Added File.get_path and File.get_path_absolute functions 2018-03-13 12:07:37 -03:00
Rémi Verschelde 18d543d7ab
Merge pull request #17311 from marcelofg55/export_err_checks
Improved error checking at EditorExportPlatformPC::export_project
2018-03-13 12:17:53 +01:00
Leon Krause 802b6d3669 Reinstate WebGL 1.0 driver in HTML5 platform 2018-03-07 20:38:14 +01:00
Marcelo Fernandez 0876502f72 Improved error checking at EditorExportPlatformPC::export_project 2018-03-06 14:23:17 -03:00
Marcelo Fernandez d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
Poommetee Ketson 67e20dc2b6 (Magnify|Pan)Gesture: implement as_text 2018-02-24 10:35:25 +07:00
Rémi Verschelde e0f43e0678
Merge pull request #15564 from RandomShaper/adpod-topmost
Add new window setting: always on top
2018-02-14 16:43:40 +01:00
Marcelo Fernandez ea1d726a46 Added OS::center_window to center the window precisely on desktop platforms 2018-02-12 15:45:41 -03:00
bruvzg b3ddf12fb1
Mono: Allow loading mscorlib from resources. 2018-01-31 09:20:46 +02:00
Ariel Manzur 81426ff0a8 - Improves portability in joystick buttons enum
- Fixes linking bug in modules split library
2018-01-24 19:12:54 -03:00
Pedro J. Estébanez ee2c31d306 Add new window setting: always on top
Implemented for Windows and Linux.
2018-01-05 21:31:04 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Emmanuel Leblond e315c94900 Change OS::initialize signature to return Error (fix segfault on x11) 2018-01-04 15:15:55 +01:00
firefly2442 f066991aa7 found via cppcheck:
remove code that will never run
make definition and declaration names for parameters match
change floats that were being set to bool values
remove pointer that is never used
2018-01-03 21:23:48 -07:00
Rémi Verschelde 6322b0bbb7
Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursor
Custom hardware-accelerated mouse cursor
2018-01-03 08:35:59 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Juan Linietsky 988d29bdd8 Reimport now checks source path changes and imported files and their md5, fixes #14728 2017-12-27 15:22:04 -03:00
Juan Linietsky 4a2eef4ad8 Removed the InputEvent ID field, which was unused and can cause bugs. 2017-12-26 09:49:31 -03:00
Juan Linietsky 021f3c924b -Removed OpenMP support, replaced by a custom class.
-Disabled Opus, implementation is wrong.
2017-12-24 09:32:12 -03:00
Guilherme Silva a392dbdbe3 Add implementation for custom hardware cursor 2017-12-17 13:40:29 -02:00
Rémi Verschelde 6afb90c846
Merge pull request #14635 from poke1024/getline
Faster FileAccess::get_line()
2017-12-17 14:24:07 +01:00
Juan Linietsky 652c98a7be Add epic hack so vsync can be toggled in run-time from script. Fixes #14458.
Call needs to be routed via visual server to reach the proper thread.
2017-12-16 17:11:02 -03:00
poke1024 a3f1ed9af9 Faster FileAccess::get_line() 2017-12-16 16:27:21 +01:00
Ruslan Mustakov 9d6d20e67c Remove get_stack_bottom
It's not used in godot-nim any longer and there were no other uses for
it.
2017-12-16 13:10:26 +07:00
Rémi Verschelde fb84b49d87 Fix type mismatch in OS::set_borderless_window
Closes #14663.
2017-12-14 19:16:20 +01:00
Juan Linietsky f3ad14224e -Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Stefano Bonicatti c067cf2c6a Fixes vsync setting ignored when using a separate thread for rendering
Setting the vsync in the main thread, after the rendering thread starts
and takes the OpenGL context fails, so we need to do that before.
Also, for some reason, the main thread cannot make current the context
anymore.

Fixes #13447
2017-12-09 01:43:23 +01:00
Rémi Verschelde d5ca9e2f6f Style: Apply clang-format again on all files
Fixes issues introduced by newer clang-format versions or commits
pushed directly without using the clang-format pre-commit hook.
2017-12-07 08:02:00 +01:00
Pedro J. Estébanez 7fb9508cfa Fix Windows-to-Linux export error
Now chmod() returns ERR_UNAVAILABLE by default, to signal the caller the problem is lack of support instead of a failed operation.
2017-12-06 20:46:38 +01:00
Juan Linietsky 9678231b10 Changed the dynamic library open function to allow setting the path of the library to open extra libraries. 2017-11-30 10:00:55 -03:00
Rémi Verschelde af9c67db0c Allow customizing user:// path (folder in OS::get_data_path())
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.
2017-11-26 19:02:32 +01:00
Juan Linietsky bc2e8d99e5 Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Andreas Haas c76a9b99b0
Core: Bind InputEventGesture events. 2017-11-24 19:23:04 +01:00
Juan Linietsky 62d86b1588 Modified low processor sleep to 8000 and made it customizable (should be customizable for editor too) 2017-11-22 14:41:45 -03:00
Rémi Verschelde bedcbdd420
Merge pull request #13130 from endragor/gdnative-android-export
Proper GDNative export on Android
2017-11-21 23:59:01 +01:00
Juan Linietsky 30dadb1228
Merge pull request #11933 from cxong/master
Use "Command" instead of "Meta" for macOS (#1619)
2017-11-21 14:25:09 -03:00
Ruslan Mustakov ebf9b80a47 Proper GDNative export on Android 2017-11-21 20:40:31 +07:00
Rémi Verschelde 6c9ee1f125
Merge pull request #13133 from endragor/resurrect-file-logging
Return and repair file logging
2017-11-21 14:25:33 +01:00
Ruslan Mustakov d42c5646a5 Return and repair file logging
And make it configurable, too.
2017-11-21 16:43:44 +07:00
Bernhard Liebl 80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Ruslan Mustakov 8f0f327f02 Allow configuring iOS export
- 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).
2017-11-21 01:16:49 +07:00
Rémi Verschelde 450bdda97a
Merge pull request #12387 from santouits/x1111
Fix x11 boot logo position in fullscreen and in maximized
2017-11-20 15:48:08 +01:00
Rémi Verschelde 4d5b82811f
Merge pull request #13006 from hoelzl/pr-placement-delete
Add placement deletes to avoid warnings on VC++
2017-11-20 13:16:23 +01:00
Rémi Verschelde 6947bed015 Pass engine name and version parts as proper strings
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.
2017-11-20 00:51:14 +01:00
Matthias Hoelzl 4c76c6892c Add placement deletes to avoid warnings on VC++
When compiling with VC++ 2017, Godot generates huge numbers of
C4291 warnings about missing placement delete.

I have not found a way to disable these warnings using compiler
options: AFAICT there is no equivalent to `-f-no-exceptions` for
VC++ (there is only /EH to change the exception-handling model,
/GX is deprecated) and adding /wd4291  to the
`disable_nonessential_warnings` list in the `SConstruct` file
or even compiling with `warnings=no` does not disable the
messages.

Placement delete is only called when placement new throws an
exception, since Godot doesn't use exceptions this change should
have no runtime effect.

Fixes #12654 (probably, difficult to say without log)
2017-11-19 21:25:18 +01:00
Rémi Verschelde 32c12a92a5 Add initial support for the XDG Base Directory spec
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.
2017-11-19 20:54:24 +01:00
Rémi Verschelde 73049d115e Rename OS::get_data_dir to OS::get_user_data_dir
Will be needed to avoid confusion with system data path (XDG_DATA_HOME)
and editor data dir in upcoming refactoring.
2017-11-17 20:55:09 +01:00
Rémi Verschelde ed57f0a0d4 Remove get_default_video_mode definition on OSX/iOS
It had been missed in d09160a8b6 and broke compilation
for those platforms.

Took the opportunity to run clang-format on the code base to fix some corner cases
that went through our static tests/were overlooked recently.
2017-11-09 23:36:08 +01:00
Juan Linietsky d09160a8b6 Make video mode initialization more intuitive, fixes #12022 2017-11-09 13:02:26 -03:00
Bastiaan Olij 2a230d571d Increase joystick axis from 8 to 10 2017-11-08 19:56:30 +11:00