Commit graph

2314 commits

Author SHA1 Message Date
Leon Krause
c4784426bd
Merge pull request #22857 from marcelofg55/jsmic
Implemented audio input support for JavaScript audio driver
2018-11-28 12:34:08 +01:00
Andrea Beconcini
11a1624202 uwp export: fix existing template check 2018-11-27 20:20:54 +01:00
Marcelo Fernandez
3a702b3ed8 Implemented audio input support for JavaScript audio driver 2018-11-26 19:14:52 -03:00
bruvzg
56b26c4369
Fix macOS icon export (add 1024px PNG icon and 32px/16px RLE icons). 2018-11-26 16:12:36 +02:00
Hugo Locurcio
8c7087ff7f
Remove an unused script
[ci skip]
2018-11-24 16:33:31 +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
volzhs
96b1a190a3 Show error if required fields are not filled when exporting iOS 2018-11-23 07:01:29 +09:00
Simon Sikström
00b57d3bd2 Adding support for java.lang.Long values in Android GodotLib.calldeferred calls 2018-11-20 14:46:08 +01:00
Rémi Verschelde
a2a5793e13
Merge pull request #21339 from Placinta/master
Fix regular macOS build by passing -isysroot to compiler so correct system headers are found
2018-11-20 14:11:13 +01:00
Rémi Verschelde
7651b85782
Merge pull request #23822 from bruvzg/mac_109_compat_ver_check
[macOS] Change runtime OS version checks to allow build with MacOS 10.9 SDK
2018-11-20 14:01:02 +01:00
Rémi Verschelde
173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
bruvzg
bbac90c859
[macOS] Change runtime OS version checks to allow build with MacOS 10.9 SDK, 2018-11-19 23:24:28 +02:00
Marcelo Fernandez
385832ed30 Fix X11 running a project with fullscreen setting on and resizable off with multiple screens 2018-11-18 23:03:54 -03:00
bruvzg
4aa441591c
[macOS] Disable setWantsLayer on macOS < 10.14 2018-11-18 16:20:29 +02:00
Ibrahn Sahir
4c90a66e74 Fix gcc version check when running scons in python 3. 2018-11-14 12:25:50 +00:00
Marcelo Fernandez
8705c01f5a Fix compile recent compile issues with gcc 5.5 2018-11-12 10:24:44 -03:00
Rémi Verschelde
9f4d89dffd
Merge pull request #23622 from RandomShaper/fix-windows-mouse-capture
Fix mouse mode restoration on Windows
2018-11-10 21:55:30 +01:00
Rémi Verschelde
54d33fabd1
Merge pull request #23618 from bruvzg/macos_spash_fix
[macOS] Fix blank splash screen
2018-11-10 21:46:47 +01:00
Pedro J. Estébanez
b5c56f6cca Fix mouse mode restoration on Windows
Fixes #23494.
2018-11-09 23:55:19 +01:00
bruvzg
30852d0237
[macOS] Fix blank splash screen 2018-11-09 21:47:23 +02:00
Rémi Verschelde
06c42d151c
Merge pull request #23542 from marcelofg55/no_pie
Fix binaries incorrectly detected as shared libraries on some linux distros
2018-11-09 16:12:16 +01:00
Rémi Verschelde
e7cb47e686
Merge pull request #23463 from hpvb/use-dri-prime-default
Set DRI_PRIME=1 by default on X11 if not already set
2018-11-08 14:21:12 +01:00
Marcelo Fernandez
34e2d2f4f7 Fix binaries incorrectly detected as shared libraries on some linux distros 2018-11-07 12:39:15 -03:00
Hein-Pieter van Braam
0aad11a6a7 Set DRI_PRIME=1 by default on X11 if not already set
This mirrors behavior on Windows and MacOSX where Godot tries to default
to a dGPU if it exists. This doesn't work for Nvidia optimus yet but
this can maybe be added later.
2018-11-06 22:31:35 +01:00
Rémi Verschelde
bf28c614b0
Merge pull request #23461 from hpvb/fix-23400
Properly export the various 'use dGPU' symbols when building with MingW
2018-11-05 11:30:06 +01:00
Rémi Verschelde
5d5227104e
Merge pull request #23499 from bruvzg/fix_osx_app_crash_and_black_spash
[macOS] Fix .app bundle crash and blank initial window
2018-11-05 09:39:57 +01:00
bruvzg
07aee14dd7
Fix initial blank screen on macOS Mojave (except splash). 2018-11-04 11:19:28 +02:00
bruvzg
cfce8de0b5
Fix .app bundle crash on macOS 2018-11-04 11:19:28 +02:00
Fabio Alessandrelli
f17d83e758 Fix UWP build.
Add missing os_uwp.cpp include for VisualServerWrapMT.
Add global env forced include to fix freetype in UWP.
2018-11-03 17:19:44 +01:00
Hein-Pieter van Braam
19d91f788d Properly export the various 'use dGPU' symbols when building with MingW
This fixes exporting the NvOptimusEnablement export when building with
MingW. This also adds the equivalent for AMD.

This fixes #23400
2018-11-03 10:55:03 +01:00
Rémi Verschelde
5beaea9891
Merge pull request #23389 from marcelofg55/multiple_ext
Export for OS X on OS X now lets you select .dmg or .zip
2018-11-02 11:07:18 +01:00
Rémi Verschelde
63d7c9be45
Merge pull request #23431 from buresu/fix-keycode
Fix keycode problem on OSX
2018-11-02 11:02:39 +01:00
Rémi Verschelde
8ac1bcfd3d Fix init of VisualServerRaster
Contrarily to what #23434 assumed, this is not a memory leak,
the VisualServerRaster instance is passed as a parameter to
VisualServerWrapMT's constructor.

Fixes #23437.
2018-11-01 19:23:12 +01:00
George Marques
4c9d734a75 Fix initialization of visual server in all platforms
Avoid leaking an extra instance when using threads. Also fix threaded
loading issues on Android and iOS.
2018-11-01 10:27:04 -03:00
Marcelo Fernandez
d51999f11d Export for OS X on OS X now lets you select .dmg or .zip 2018-11-01 10:08:26 -03:00
Naoto Kondo
ca2476cdb4 Fix keycode problem on OSX 2018-11-01 20:00:02 +09:00
Rémi Verschelde
fbc0e5d98d
Merge pull request #23320 from lethiandev/android-invalid-package-name-error
Add android export error on invalid package name
2018-11-01 10:18:04 +01:00
Rémi Verschelde
16f066c8f1
Merge pull request #23393 from marcelofg55/osx_crash
Fix OS X crash when running as .app
2018-10-31 09:54:11 +01:00
Ibrahn Sahir
9f172b634d Allow the server platform to build on linux again.
Fixed a logic error in platform/server/detect.py that prevented building
the server platform on linux.
2018-10-30 12:38:55 +00:00
Marcelo Fernandez
a069685fbb Fix OS X crash when running as .app 2018-10-29 21:50:41 -03:00
Rémi Verschelde
bfd1f09ac5 Style: Apply clang-format to wrongly formatted files 2018-10-29 23:47:40 +01:00
Rémi Verschelde
7e8cffc03f
Merge pull request #23382 from vnen/android-pad-fix
Prevent a device to be added/deleted more than once on Android
2018-10-29 23:43:43 +01:00
Rémi Verschelde
39a5678c38
Merge pull request #23387 from eska014/memgrowth-preload
Enable --no-heap-copy flag for HTML5 builds
2018-10-29 23:43:11 +01:00
Rémi Verschelde
7771fe5d4a
Merge pull request #23388 from eska014/html5-stubexec
Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
2018-10-29 23:40:17 +01:00
Leon Krause
5c2c47a174 Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
Avoids linker warnings and errors about undefined references.
2018-10-29 21:41:59 +01:00
Rémi Verschelde
4d9b8a98ba
Merge pull request #23279 from marcelofg55/osx_server
Server platform works on OS X too
2018-10-29 21:25:46 +01:00
Leon Krause
44e5d446c4 Enable --no-heap-copy flag for HTML5 builds 2018-10-29 21:08:51 +01:00
Xavier Sellier
7dcf779a8b
Prevent a device to be added/deleted more than once on Android
cherry-picked from fb5a601217
2018-10-29 13:04:36 -03:00
Marcelo Fernandez
fe93bb03fe Server platform works on OS X too 2018-10-29 12:54:51 -03:00
Konrad Nowakowski
2255d4fdfd Add android export error on invalid package name 2018-10-29 14:26:53 +00:00
Rémi Verschelde
8650793eac
Merge pull request #23317 from lupoDharkael/py-none
Dont use equality operators with None singleton in python files
2018-10-29 12:11:24 +01:00
Karen Schwane
a01ce6299c Move jcenter behind mavenCentral and google gradle repos to fix build problems 2018-10-28 19:20:30 +01:00
lupoDharkael
edcca5f7ad Dont use equality operators with None singleton in python files 2018-10-27 01:18:15 +02:00
Rémi Verschelde
9de724f327
Merge pull request #23091 from aaronfranke/mingw-warnings
Fix some compile warnings for Windows from Linux
2018-10-25 15:09:11 +02:00
M. Huri
b46ba24e3b Repaired mistyped of 'its' on several files. 2018-10-25 07:19:21 +07:00
Colin Kinloch
464842c62c Update mouse location on background scroll and window focus in macOS 2018-10-24 14:47:37 +01:00
Patrick Beard
d2ed3b224a Call -update when window becomes the key window 2018-10-23 07:22:40 -07:00
Max Hilbrunner
5bb34539e2
Merge pull request #23025 from voithos/enginejs
Add comments to javascript wrapper parts.
2018-10-20 15:30:05 +02:00
Aaron Franke
dc2e73499a Fix compile warnings for Windows from Linux
At least the ones I got when I compiled it using Mingw64 POSIX on Xubuntu 18.04. Plus use the Size2 of get_window_size() directly, rather than reconstructing it.
2018-10-19 09:11:14 -04:00
Dualtagh Murray
b902a2f2a7 Fixing warnings generated by MSVC
Fixes #22684.
2018-10-19 11:45:24 +02:00
Zaven Muradyan
61d5513525 Add comments to javascript wrapper parts.
The code in pre.js and engine.js is a bit confusing to see in isolation,
since the files aren't valid JS files by themselves. This just adds some
explanatory text to both files.

Fixes #22937.
2018-10-15 08:56:44 -07:00
dumitru-stama
4c9eb86cbf Fixed initialization of android modules 2018-10-14 17:32:01 -07:00
Wojciech Milkowski
3598165c4d Fix build with Android NDK r18
As a bonus there is no need to use undocumented Gradle API any more.
2018-10-08 22:35:18 +02:00
Fabio Alessandrelli
f8020bc976 Check getcwd return in X11 platform main. 2018-10-07 14:50:14 +02:00
Aaron Franke
4f7b33cdcf Remove redundant "== false" code
Some of this code has been re-organized.
f
2018-10-06 16:20:41 -04:00
Aaron Franke
37386f112b Remove redundant "== true" code
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-06 16:12:36 -04:00
Guilherme Felipe
f402253939 [x11] Use "application/config/name" for WM_CLASS 2018-10-05 17:18:10 -03:00
Rémi Verschelde
da6646dd5e
Merge pull request #22685 from remmah/patch-1
Modernized copy/paste APIs on macOS #7185
2018-10-05 12:20:57 +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
remmah
77fddfc7ea
Modernized copy/paste APIs on macOS #7185 2018-10-03 12:56:16 -04:00
Rémi Verschelde
d952126caf Fix warnings in Android platform
Fixes the following Clang 7 warnings:
```
platform/android/os_android.h:240:16: warning: 'OS_Android::native_video_play' hides overloaded virtual function [-Woverloaded-virtual]
platform/android/os_android.h:241:15: warning: 'OS_Android::native_video_is_playing' hides overloaded virtual function [-Woverloaded-virtual]

platform/android/audio_driver_opensl.cpp:104:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]

platform/android/audio_driver_opensl.cpp:129:10: warning: unused variable 'numOutputs' [-Wunused-variable]
platform/android/audio_driver_opensl.cpp:130:11: warning: unused variable 'deviceID' [-Wunused-variable]
platform/android/java_glue.cpp:795:10: warning: unused variable 'clsio' [-Wunused-variable]
platform/android/java_glue.cpp:890:12: warning: unused variable 'gob' [-Wunused-variable]
platform/android/java_glue.cpp:592:13: warning: unused variable 'resized' [-Wunused-variable]
platform/android/java_glue.cpp:593:13: warning: unused variable 'resized_reload' [-Wunused-variable]

modules/mobile_vr/mobile_vr_interface.cpp:401:8: warning: unused variable 'aspect_ratio' [-Wunused-variable]

drivers/unix/dir_access_unix.cpp:394:2: warning: THIS IS BROKEN [-W#warnings]
```
2018-10-03 15:17:00 +02:00
Juan Linietsky
bad991ea83 Many more fixes for GLES2 mobile export. Also added ability to turn on OpenGL debugging on Android export. 2018-10-02 10:00:15 -03:00
Rémi Verschelde
c026e3957a Fix warnings on virtual methods [-Woverloaded-virtual] [-Wdelete-non-virtual-dtor]
Fixes the following Clang 7 warnings:
```
editor/editor_help.h:123:7: warning: 'EditorHelpIndex::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/editor_help.h:95:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/editor_help.h:96:7: warning: 'EditorHelpSearch::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/plugins/curve_editor_plugin.h:141:15: warning: 'CurvePreviewGenerator::generate' hides overloaded virtual function [-Woverloaded-virtual]
editor/plugins/script_editor_plugin.h:70:7: warning: 'ScriptEditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual]
editor/quick_open.h:69:7: warning: 'EditorQuickOpen::popup' hides overloaded virtual function [-Woverloaded-virtual]
main/tests/test_io.cpp:53:15: warning: 'TestIO::TestMainLoop::input_event' hides overloaded virtual function [-Woverloaded-virtual]
servers/audio/effects/audio_effect_record.h:69:15: warning: 'AudioEffectRecordInstance::process_silence' hides overloaded virtual function [-Woverloaded-virtual]

core/os/memory.h:119:2: warning: destructor called on non-final 'ContextGL_X11' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'EditorScriptCodeCompletionCache' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'Engine' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'PhysicalBone::JointData' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerScene' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
core/os/memory.h:119:2: warning: destructor called on non-final 'VisualServerViewport' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
```
2018-10-02 13:40:17 +02:00
Rémi Verschelde
93570be2de
Merge pull request #22368 from moiman100/raw-input-fixes
Windows raw input fixes
2018-10-02 09:26:18 +02:00
Rémi Verschelde
a16dc807e5
Merge pull request #22602 from LikeLakers2/can-you-dont
Changed the comment where reduz yells at the X11 API to a less explicitive one
2018-10-02 08:46:36 +02:00
Leon Krause
d93050d8a2 Fix compiler warnings in HTML5 platform 2018-10-02 02:49:32 +02:00
LikeLakers2
5515c303f8 Changed the comment where reduz yells at the X11 API to a less explicitive one 2018-10-01 19:09:03 -04:00
Rémi Verschelde
53fbd93409
Merge pull request #22593 from akien-mga/fix-warnings
Fix various warnings raised by Clang 7
2018-10-02 00:01:31 +02:00
muiroc
d6711701f6 Fix build for Javascript platform 2018-10-01 21:46:37 +02:00
Rémi Verschelde
b1b625f4f5 Fix various Clang 7 warnings about unused stuff
Namely:
[-Wunneeded-internal-declaration]
[-Wunused-comparison]
[-Wunused-const-variable]
[-Wunused-function]
[-Wunused-private-fields]

Fixes the following Clang 7 warnings:
```
editor/plugins/script_editor_plugin.cpp:1417:20: warning: function '_find_node_with_script' is not needed and will not be emitted [-Wunneeded-internal-declaration]
editor/scene_tree_dock.cpp:1859:14: warning: function '_find_last_visible' is not needed and will not be emitted [-Wunneeded-internal-declaration]

modules/gdscript/gdscript_parser.cpp:7838:19: warning: equality comparison result unused [-Wunused-comparison]

scene/resources/mesh.cpp:549:35: warning: unused variable '_array_types' [-Wunused-const-variable]
scene/resources/mesh.cpp:563:18: warning: unused variable '_format_translate' [-Wunused-const-variable]

drivers/gles3/rasterizer_scene_gles3.cpp:54:28: warning: unused function 'store_transform2d' [-Wunused-function]

core/io/file_access_network.h:50:6: warning: private field 'ml' is not used [-Wunused-private-field]
core/io/file_access_zip.h:93:14: warning: private field 'archive' is not used [-Wunused-private-field]
core/io/resource_format_binary.h:122:6: warning: private field 'bin_meta_idx' is not used [-Wunused-private-field]
core/message_queue.h:47:9: warning: private field 'mutex' is not used [-Wunused-private-field]
main/tests/test_gui.cpp:63:11: warning: private field 'control' is not used [-Wunused-private-field]
modules/gdscript/gdscript_parser.h:558:7: warning: private field 'completion_static' is not used [-Wunused-private-field]
platform/x11/os_x11.h:148:11: warning: private field 'ip_unix' is not used [-Wunused-private-field]
platform/x11/os_x11.h:180:7: warning: private field 'net_wm_icon' is not used [-Wunused-private-field]
platform/x11/os_x11.h:189:6: warning: private field 'audio_driver_index' is not used [-Wunused-private-field]
platform/x11/os_x11.h:190:15: warning: private field 'capture_idle' is not used [-Wunused-private-field]
servers/physics/body_pair_sw.h:79:6: warning: private field 'cc' is not used [-Wunused-private-field]
servers/visual/visual_server_raster.h:62:7: warning: private field 'draw_extra_frame' is not used [-Wunused-private-field]
```
2018-10-01 17:32:12 +02:00
Rémi Verschelde
6bfb7944d9 SCons: Remove avoidable defines from main env's CPPPATH
Also finally move freetype to its own env and disable warnings for it.
Still needs some work to fix the awkward situation of the freetype and
svg modules used in scene/ and editor/ respectively.
2018-10-01 11:59:22 +02:00
Juan Linietsky
c24277a520 -Many GLES2 optimizations
-Android export fixes (use ETC if GLES2 backend in use)
-revert to thekla atlas because xatlas is not working well
2018-09-30 23:11:24 -03:00
Rémi Verschelde
3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Rémi Verschelde
1c60465c59
Merge pull request #22422 from Faless/server_dummy_vr
Server platform builds (dummy) mobile_vr module.
2018-09-28 09:38:25 +02:00
Rémi Verschelde
e8282f9cce
Merge pull request #22465 from FeralBytes/patch-1
Add support for onRequestPermissionsResult()
2018-09-28 09:07:55 +02:00
FeralBytes
39738d1866 Add support for onRequestPermissionsResult()
Credit goes to @vanyasem  https://github.com/vanyasem/Godot-AndroidPermissions
But this is a much needed feature to support Android beyond API 21.
Fixed style errors again.
2018-09-27 19:20:26 -08: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
d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Rémi Verschelde
cda5b0bfe1 Fix warnings about unused variables [-Wunused-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable]
drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable]
drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable]
editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable]
editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable]
editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable]
editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable]
editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable]
editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable]
main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable]
modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable]
modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable]
modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable]
modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable]
platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable]
scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable]
scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable]
scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable]
scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable]
servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable]
```
2018-09-27 16:25:24 +02:00
Rémi Verschelde
e5bbcb8bcf Fix warnings for comparison between signed and unsigned integers [-Wsign-compare]
Also turn off -Wsign-compare warnings in the future, we do not consider them important.

Fixes the following GCC 5 warnings:
```
core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/sprite_editor_plugin.cpp💯20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```

The following warnings were not fixed, as they implied casting for no gain:
```
core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```
2018-09-27 16:25:23 +02:00
Fabio Alessandrelli
b0f166987a Server platform builds (dummy) mobile_vr module.
Protect GL functions in mobile_vr with ifdefs.
2018-09-25 12:29:31 +02:00
Rémi Verschelde
5adf7aa6b7 SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
2018-09-25 11:15:25 +02:00
Ibrahn Sahir
653b832422 Fixed hang when segfaulting after OS object destroyed (OSX and X11)
The two POSIX style crash handlers (OSX and X11) now remove their signal
handlers when they are destroyed.
Additonally if they are called while no OS singleton is set, they will
simply abort(). This should not happen now that they remove themselves,
but if a future change seperates OS object and crash handler lifetimes,
this may be easier to report/debug than hanging on SIGSEGV.
2018-09-24 22:21:05 +01:00
Mikko Mustonen
db346bff8b Fix mouse position when clicking in MOUSE_MODE_CAPTURED 2018-09-23 12:29:15 +03:00
Mikko Mustonen
33dd2c8de6 Fix zero relative motion event when clicking in MOUSE_MODE_CAPTURED 2018-09-23 12:06:55 +03:00
volzhs
3a2d707697 Ignore invalid device for Android 2018-09-23 01:41:24 +09:00
Rémi Verschelde
0274ded34c
Merge pull request #22070 from capnm/fix_Input.set_default_cursor_shape_take2
Fix set_default_cursor_shape interaction with Control nodes
2018-09-19 09:26:21 +02:00
Guilherme Felipe
360204e532 Fix Input::set_custom_mouse_cursor showing cursor when it's invisible 2018-09-17 11:37:54 -03:00
Rémi Verschelde
6938b6e2f8
Merge pull request #22161 from eska014/html5-seticon
Implement OS::set_icon in HTML5 platform
2018-09-17 10:48:14 +02:00
Rémi Verschelde
1e201163b9
Merge pull request #22134 from elasota/natvis
Add Visual Studio debug visualizer
2018-09-17 10:16:18 +02:00
elasota
af1e945435 Initial version of VS natvis file 2018-09-17 03:57:25 -04:00
Leon Krause
42c6a67dca Implement OS::set_icon in HTML5 platform 2018-09-16 20:46:21 +02:00
Martin Capitanio
64cecf9d61 Fix set_default_cursor_shape interaction with Control nodes
Do not call `set_cursor_shape` when the cursor is inside the `Control` node.

Make it work for x11 in MOUSE_MODE_CONFINED.
2018-09-15 20:54:22 +02:00
Guilherme Felipe
04aef23585 Fix set_custom_mouse_cursor changing to incorrect cursor shape
[Docs] Add class ref for Input::set_default_cursor_shape
2018-09-13 15:13:57 -03:00
Fabio Alessandrelli
01c3c1a07b Properly initialize Winsock on startup
Also fix typo in _get_last_error which caused Winsock connect to fail.
2018-09-13 16:05:47 +02:00
Rémi Verschelde
c8f761ae2d
Merge pull request #22000 from Faless/lws_uwp32
Fix libwebsockets 32-bits UWP builds.
2018-09-13 10:59:26 +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
Fabio Alessandrelli
75b2db8c5f Fix libwebsockets 32-bits UWP builds.
Also fix bogus windows detect.py
2018-09-13 02:26:54 +02:00
Rémi Verschelde
fe78aa0c30
Merge pull request #21753 from guilhermefelipecgs/fix_confined_mode
Fixes to mouse mode confined and captured
2018-09-12 21:37:30 +02:00
Fabio Alessandrelli
cdc5264a3e
Merge pull request #21692 from Faless/sockets_rebase
New NetSocket interface with common BSD/Win implementation
2018-09-12 18:25:28 +02:00
Fabio Alessandrelli
30327872e0 Unify StreamPeerTCP/TCP_Server with NetSocket API 2018-09-12 15:56:20 +02:00
Fabio Alessandrelli
1b99806b47 Unify PacketPeerUDP using NetSocket 2018-09-12 15:56:16 +02:00
Rémi Verschelde
143f522adb
Merge pull request #21914 from hpvb/fix-21720
When resizing an X11 window wait for the WM to process our request
2018-09-12 14:36:57 +02:00
Rémi Verschelde
a4958bb867
Merge pull request #21910 from hpvb/fix-8145-x11
Update X11 global mouse position at startup
2018-09-12 11:03:36 +02: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
Rémi Verschelde
76b211540e
Merge pull request #21865 from Calinou/tweak-android-export-errors
Tweak Android-related error messages in the Export dialog
2018-09-10 18:47:53 +02:00
Rémi Verschelde
0dd7e02350
Merge pull request #21859 from avencherus/fix-scancode-colon
Changed Windows key translate pair from KEY_COLON to KEY_COMMA.
2018-09-10 18:38:39 +02:00
Rémi Verschelde
a2d2fbe8a6
Merge pull request #21784 from guilhermefelipecgs/fix_resized_mouse_confined
Fix mouse confined leaving window with OS_Windows::set_window_position
2018-09-10 15:34:49 +02:00
Hein-Pieter van Braam
9a1deedb84 When resizing an X11 window wait for the WM to process our request
On X11 when we send an XResizeWindow request to the X server it is happy
to say it is done when the request has been handed over to the window
manager. The window manager itself may however take some time to
actually do the resize. Godot expects that a resize request is
immediate. To work around this issue we could implement the whole
_NET_WM_SYNC_REQUEST protocol. However this protocol does not fit very
well with the way we currently process X events and would when
implemented in the current framework still cause a 1 frame delay between
a resize request and the actual resize happening.

This fixes #21720
2018-09-10 00:12:23 +02:00
Hein-Pieter van Braam
4b92ca1cce Update X11 global mouse position at startup
When we start the engine we haven't yet gotten any X11 motion events so
we don't yet know where our mouse cursor is located. Instead we now
query the X server for this information when we start and update the
appropriate values.

In addition when we move the window we also update the mouse position
based off of X server knowledge as we will also not have received any
mouse motion events.

this fixes #8145 (for X11 only)
2018-09-09 22:17:27 +02:00
Hugo Locurcio
8c8164129c
Tweak Android-related error messages in the Export dialog
OpenJDK 8 has been working well for exporting to Android
for a while now, so it can be recommended instead of OpenJDK 6.
2018-09-08 13:59:28 +02:00
Jared
dde0229fac Changed Windows key translate pair from KEY_COLON to KEY_COMMA. 2018-09-08 09:27:39 +03:00
Guilherme Felipe
bd3d73a9fd Fix mouse confined leaving window with OS_Windows::set_window_position 2018-09-05 18:52:05 -03:00
Xavier Sellier
f68e127079 Add clipboard operation for android OS 2018-09-05 17:27:45 -04:00
Guilherme Felipe
7d6364d431 Fixes to mouse mode confined and captured
These modes will work on Linux in the same way as Windows.
2018-09-05 11:24:06 -03:00
Martin Capitanio
bcee65284e Really fix the custom cursor hotspot
Add check for negative values.

Fixes #21721
2018-09-04 04:42:23 +02:00
Guilherme Felipe
e5470cfa70 Fix custom cursor hotspot
Cursor hotspot must be inside image on Linux. Adding validation for all
platforms for consistency.
2018-09-03 09:57:07 -03:00
elasota
d4045d835f Fix bad res file include in VS project and simplify a bit 2018-09-01 00:13:49 -04:00
Pedro J. Estébanez
28019c71a6 Fix multitouch input not working on certain devices on Windows
Fixes #20474.
2018-08-30 22:42:18 +02:00
Leon Krause
cd7c0f67b9 Fix HTML5 gamepad input 2018-08-30 03:42:02 +02:00
Hein-Pieter van Braam
6fcc20ec51 Fix typo in os_uwp causing a build failure 2018-08-28 22:45:39 +02:00
Rémi Verschelde
57ba7caa6d
Merge pull request #21511 from eska014/webm-nomt
Fix WebM and Theora video in HTML5 export
2018-08-28 07:56:52 +02:00
Wojciech Milkowski
3a3ea6d514 No need to link with libandroid_support in NDK 17
According to https://github.com/bytedeco/javacpp/pull/244 in NDK 17
libandroid_support library is not needed any more, and on armv8 is
already gone which breaks compilation.
2018-08-28 02:34:59 +02:00
Leon Krause
b4b816c122 Enable Theora module for HTML5 platform 2018-08-28 01:56:47 +02:00
Alexandru Croitor
3624644630 Pass -isysroot to compiler / linker when doing a macOS build
Previously the compiler would use system headers located at
/System/Library/Frameworks, which could result in compilation failures
due to the headers not always being up-to-date in regards to the
latest installed macOS SDK headers that come with Xcode.

Fix the issue by passing the SDK path via the -isysroot option to the
compiler and linker invocations.

If no custom SDK path is given, the build system queries the SDK path
via xcrun --show-sdk-path, which returns something similar to

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
 /Developer/SDKs/MacOSX.sdk/

Querying via xcrun is now also done for iphone (and simulator)
platforms as well.

Here is an example of a compilation failure message due to outdated
headers:

platform/osx/os_osx.mm:1421:41: error: use of undeclared identifier 'NSAppKitVersionNumber10_12'; did you mean 'NSAppKitVersionNumber'?
                                if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) {
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                    NSAppKitVersionNumber
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:26:28: note: 'NSAppKitVersionNumber' declared here
2018-08-27 18:01:05 +02:00
Rémi Verschelde
72996df656
Revert "Try closing gracefully before terminating process" 2018-08-27 17:32:43 +02:00
Rémi Verschelde
c1f687c681
Merge pull request #21387 from hpvb/fix-15324
Fall back to GLES2 if GLES3 is not working
2018-08-27 16:54:22 +02:00
Hein-Pieter van Braam
3d4b7c6c5f When setting an X11 icon fails, try halving the size
When setting an icon that is too large previously Godot would die with a
X Error of failed request:  BadLength error. To avoid this we install an
error handler right before we set an icon. If the error handler triggers
we halve the icon size until it works or until we've reached a 0 size on
either width or height.

We print a warning when this happens to alert developers.

This fixes #19716
2018-08-27 01:28:11 +02:00
Hein-Pieter van Braam
08f452d1a9 Fall back to GLES2 if GLES3 is not working
This adds a static is_viable() method to all rasterizers which has to be
called before initializing the rasterizer. This allows us to check what
rasterizer to use in OS::initialize together with the GL context
initialization.

This commit also adds a new project setting
"rendering/quality/driver/driver_fallback" which allows the creator of a
project to specify whether or not fallback to GLES2 is allowed. This
setting is ignored for the editor so the editor will always open even if
the project itself cannot run. This will hopefully reduce confusion for
users downloading projects from the internet.

We also no longer crash when GLES3 is not functioning on a platform.

This fixes #15324
2018-08-26 16:40:46 +02:00
Crazy-P
e4af39cbc0 Fixes several resource leaks in ...
- gdscript
- gdscript_compiler
- regex
- android/export
- gles3/rasterizer (scene and storage)
2018-08-26 09:19:02 +08:00
Hein-Pieter van Braam
c8464eb69f Support more X11 dialogs for X11::alert()
Modern distributions such as Fedora do not ship 'xdialog' with their
default deployment. This commit adds support for Gnome's Zenity as well
as KDE's kdialog.
2018-08-25 00:53:45 +02:00
Rémi Verschelde
ff81b2daea
Merge pull request #21375 from akien-mga/msvc-nominmax
SCons: Disable min/max WinDef.h macros on MSVC
2018-08-24 20:02:53 +02:00
Rémi Verschelde
7238462601 SCons: Disable min/max WinDef.h macros on MSVC
Fixes #21370.
2018-08-24 18:04:18 +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
Rémi Verschelde
de59fe04e7 Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
2018-08-24 09:23:20 +02:00
Rémi Verschelde
cef310e0ea
Merge pull request #21336 from eska014/html5-new-presentation
Add responsive HTML5 export page with full-size canvas as new default
2018-08-24 00:10:46 +02:00
Rémi Verschelde
8ebe5f45a7
Merge pull request #21332 from dragmz/apk-hint-fix
Fix file hints
2018-08-23 23:35:58 +02:00
Marcin Zawiejski
3c4c8c40db Fix file hints
Fixes file hints so the file dialog actually displays the files with given extension (e.g. *.apk).
2018-08-23 22:18:59 +02:00
Rémi Verschelde
b90dff787c
Merge pull request #21330 from eska014/html5-canvas-resize
Facilitate external modification of HTML5 canvas size
2018-08-23 21:48:27 +02:00
Leon Krause
86d9e67d7a Add responsive HTML5 export page with full-size canvas as new default 2018-08-23 21:28:09 +02:00
Rémi Verschelde
d3714d1787
Merge pull request #20507 from rdhafidh/android_libcpp_shared_master
add support libc++_shared on android (master)
2018-08-23 08:44:41 +02:00
Leon Krause
6e8b6be136 Facilitate external modification of HTML5 canvas size 2018-08-23 04:54:36 +02:00
Juan Linietsky
2db494267b Modifications to raw input so the handling of absolute coordinates is more correct. 2018-08-22 21:27:15 -03:00
Juan Linietsky
106e5a8d5e
Merge pull request #20523 from moiman100/windows-raw-input
Raw input relative motion for Windows
2018-08-22 19:32:20 -03:00
Ridwan Abdul Hafidh
b0419db46f add support libc++_shared stl on android 2018-08-23 05:02:47 +07:00
elasota
35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Rémi Verschelde
4bf15d8090
Merge pull request #21236 from dragmz/windows-graceful-close
Try closing gracefully before terminating process
2018-08-21 22:47:21 +02:00
Rémi Verschelde
e71c20099c CI: Disable debug_symbols on Travis/AppVeyor
Also increase AppVeyor cache size to 1024,
should match what is available for us in the free plan:
https://www.appveyor.com/docs/build-cache/#cache-size-beta

And drop obsolete debug_release option for Windows, superseded
by target=release and debug_symbols=yes.
2018-08-21 12:36:57 +02:00
Leon Krause
e9cb03f33e
Merge pull request #20922 from kripken/err
HTML5: use console.warn instead of Module.printErr
2018-08-21 03:34:21 +02: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
Alessandro
9c1fd91732 fix Android/HTML5 custom templates option does not work 2018-08-20 17:38:23 +02:00
Rémi Verschelde
661c9ece7c Add PROPERTY_HINT_PLACEHOLDER_TEXT for String properties
Use it to provide a better example for application identifiers
on Android, iOS and macOS, where users thought they *had* to use
this as a magic token.
2018-08-20 13:48:05 +02:00
Rémi Verschelde
54fcdabfd3
Merge pull request #21179 from elasota/vs-pdb
Support debug_symbols in VS optimized builds
2018-08-19 09:34:06 +02:00
elasota
ffe0235f62 Support debug_symbols in VS optimized builds 2018-08-19 01:37:53 -04:00
Rémi Verschelde
92401772c8
Merge pull request #21132 from neonsoup/win_move_to_trash_fix
Fix errors during removing files or folders and fix for latin symbols
2018-08-18 22:44:39 +02:00
neonsoup
42dc2ec080 Fix errors during removing files or folders and fix for latin symbols
This commit adds support for unicode strings in OS_Windows::move_to_trash.
Also reverts commit 6188388c5a as it did not add extra null character to the path string (SHFILEOPSTRUCTA and SHFILEOPSTRUCTW require path to be double null-terminated).
2018-08-18 01:30:22 +03:00
Tiago Quendera
aa594614db
Update detect.py
Fixed a typo in detect.py
2018-08-17 12:08:17 +01:00
Hein-Pieter van Braam
827cadafc8 Replace XRaiseWindow with a _NET_ACTIVE_WINDOW ClientRequest
This fixes the editor on X11 not getting put on the foreground when a
debugged project hits an error or breakpoint.
2018-08-16 21:36:37 +02:00
Juan Linietsky
4e55835e48
Merge pull request #18096 from aaronfranke/master
[Core] Split up math_2d.h
2018-08-14 18:58:32 -03:00
Chaosus
6188388c5a Fix impossibility of removing folder which contains non-latin symbols(on Windows) 2018-08-14 11:49:16 +03:00
Rémi Verschelde
139e621338
Merge pull request #20913 from pulkomandy/master
Rebase patches for fixing haiku build.
2018-08-13 21:26:15 +02:00
Mikko Mustonen
51fa23a52a Added double clicking to all buttons 2018-08-12 12:41:31 +03:00
Alon Zakai (kripken)
71c03883b5 use console.warn instead of Module.printErr: emscripten no longer exports printErr by default, and instead err() should be used in code seen by the optimizer; however, as Godot only runs on the Web (and not in node.js or elsewhere), using console.warn directly is good enough, and will work in all versions if emscripten 2018-08-11 09:49:19 -07:00
Adrien Destugues
a294a842cb Rebase patches for fixing haiku build. 2018-08-11 17:20:51 +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
Mikko Mustonen
dcbbc445db Relative motion based on raw input for Windows 2018-07-30 23:51:51 +03:00
Marcin Zawiejski
b1e0da455b Fix Windows handles leak
Fixes thread and process handles leak when running and killing project
from editor (caused by a missing CloseHandle call) plus a potential leak
when calling OS_Windows::execute with p_blocking and !r_pipe.

The leak could be easily observed with a Handles counter in Task Manager
(or Performance Monitor) for the Godot editor process.
2018-07-30 13:41:46 +02:00
Juan Linietsky
e896261b87 Added missing support for traditional chinese on Windows, fixes #7674 2018-07-29 21:10:30 -03:00
Viktor Ferenczi
c5bd0c37ce Running builder (content generator) functions in subprocesses on Windows
- Refactored all builder (make_*) functions into separate Python modules along to the build tree
- Introduced utility function to wrap all invocations on Windows, but does not change it elsewhere
- Introduced stub to use the builders module as a stand alone script and invoke a selected function

There is a problem with file handles related to writing generated content (*.gen.h and *.gen.cpp)
on Windows, which randomly causes a SHARING VIOLATION error to the compiler resulting in flaky
builds. Running all such content generators in a new subprocess instead of directly inside the
build script works around the issue.

Yes, I tried the multiprocessing module. It did not work due to conflict with SCons on cPickle.
Suggested workaround did not fully work either.

Using the run_in_subprocess wrapper on osx and x11 platforms as well for consistency. In case of
running a cross-compilation on Windows they would still be used, but likely it will not happen
in practice. What counts is that the build itself is running on which platform, not the target
platform.

Some generated files are written directly in an SConstruct or SCsub file, before the parallel build starts. They don't need to be written in a subprocess, apparently, so I left them as is.
2018-07-27 21:37:55 +02: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
PanPan
746a15142f change framework name CoreMidi to CoreMIDI 2018-07-26 00:06:17 +08:00
Rémi Verschelde
a501678ba1
Merge pull request #20154 from marcelofg55/midi_driver
Added a new MIDIDriver class
2018-07-25 01:17:57 +02:00
Rémi Verschelde
d1624cca99
Merge pull request #20245 from bruvzg/fix_win_pp_transp
Fix OpenGL buffer depth for per pixel transparency support (Windows)
2018-07-24 22:36:24 +02:00
Wilson E. Alvarez
a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
Rémi Verschelde
8e4de57e56 SCons: Add "execinfo" option to force linking libexecinfo
Fixes #20035.
2018-07-22 19:03:52 +02:00
Juan Linietsky
2b9902db06 -Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21 17:26:49 -03:00
Marcelo Fernandez
7a5f9fc08e Added a new MIDIDriver class 2018-07-21 09:09:42 -03:00
Rémi Verschelde
814fdd3985 Fix some more build issues after c69de2ba4
Fixes #20301.
2018-07-20 11:56:18 +02:00
Rémi Verschelde
8c9e10553c Fix build issues and typos after c69de2ba4 2018-07-20 08:37:10 +02: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
bruvzg
31a0b9eaed
Fix OpenGL buffer depth for per pixel transparency support (Windows, NVIDIA) 2018-07-18 17:40:20 +03:00
Rémi Verschelde
7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
Rémi Verschelde
26d3e31e05
Merge pull request #20132 from ibrahn/fix-android-device-poll-thread
fixed branch on uninit and data race in editor android device polling
2018-07-17 14:48:49 +02:00
volzhs
d18235bc38 Fix keep screen on property path for Android/iOS/UWP 2018-07-17 18:45:57 +09:00
Ibrahn Sahir
fe4265ad46 fixed branch on uninit and data race in editor android device polling
Initialised relevant variables before stating thread,
to prevent a branch on uninitialised data.
Fixed race condition in polling that could miss a device change.
2018-07-13 13:30:50 +01:00
George Marques
a684e853ab
UWP: Add support for GLES2 driver 2018-07-12 16:21:35 -03:00
Max Hilbrunner
29e70fa5ce
Merge pull request #19840 from jjay/ios_screen_orientation
Respect window/handheld/orientation setting in iOS
2018-07-12 05:23:57 +02:00
mm
bd9c592c52 Fixed button mask behavior 2018-07-11 01:15:03 +03:00
Leon Krause
b6ae2d8037 Refactor OS_JavaScript 2018-07-10 16:57:56 +02:00
unknown
9cc41a59ac Added support for extra mouse buttons. 2018-07-09 14:34:19 +03:00
Hein-Pieter van Braam
e2b7a68db4
Merge pull request #20041 from hpvb/fix-android-export
Write new permissions to the AndroidManifest.xml
2018-07-08 15:47:12 +02:00
Hein-Pieter van Braam
2a126242dd Write new permissions to the AndroidManifest.xml
Instead of editing the placeholder permissions actually write new ones.
This should solve the privacy statement problems for the Play store.
This means we also no longer need to placeholder permissions in the
template.
2018-07-08 14:58:15 +02:00
Patrick Kaster
8bb90fd5f3 added 'android_add_asset_dir('...') method to Android module gradle build config
(cherry picked from commit 9190ae2be7)
2018-07-05 01:58:33 +02:00
Juan Linietsky
085483e885 -Fix fullscreen on Windows with a HiDPI monitor but a non-HiDPI project
-Replaced some viewport size calls to screen size, since viewport size should be deprecated at this point..
2018-07-03 18:53:27 -03:00
Max Hilbrunner
28ebddd49e
Merge pull request #19799 from kosz78/android-payment-fix
Fix possible NullPointerException crash on cancel payment
2018-07-03 18:52:10 +02:00
Max Hilbrunner
2017119a3d
Merge pull request #19919 from marcelofg55/notif_crash
Add a new notification to detect crashes on native scripts
2018-07-03 18:42:49 +02:00
Rémi Verschelde
1d57d03ea0
Merge pull request #19934 from volzhs/gles2-android
Change required gles version to 2 for android
2018-07-03 17:34:11 +02:00
volzhs
1262f940c1 Change required gles version to 2 for android 2018-07-04 00:29:23 +09:00
Max Hilbrunner
bb8844d8d7
Merge pull request #19708 from RandomShaper/fix-windows-touch
Fix touch issues on Windows
2018-07-03 15:41:14 +02:00
Marcelo Fernandez
deebeb2742 Add a new notification to detect crashes on native scripts 2018-07-02 16:18:58 -03:00
Yasha Borevich
f78e5e5725 Respect window/handheld/orientation setting in iOS 2018-07-01 22:08:37 +03:00
Hugo Locurcio
53e94a1ce1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
Konstantin Zaitsev
d05db4de8e Fix possible NullPointerException crash on cancel payment 2018-06-27 14:12:53 +07:00
Pedro J. Estébanez
2f161ffd4f Fix touch issues on Windows 2018-06-26 20:00:23 +02:00
Rémi Verschelde
07af826051
Merge pull request #19766 from GodotExplorer/android-gles2
Implement OpenGL ES rasterizer selection logic for Android.
2018-06-26 10:00:25 +02:00
geequlim
e2aa777d4d Implement OpenGL ES rasterizer selection logic for Android. 2018-06-26 12:21:06 +08:00
Rémi Verschelde
74bd1bf1c2
Merge pull request #19718 from thduynguyen/bug_fixes
bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED
2018-06-25 16:10:40 +02:00
Duy-Nguyen Ta
25ad5f8a35 bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED 2018-06-22 10:42:28 -04:00
Saracen
c5bdb5b1d8 IME context detection. 2018-06-11 17:22:11 +01:00
Rémi Verschelde
69058d33fc
Merge pull request #19443 from eska014/html5-audio-refactor
Detect channel count and mix rate in HTML5 audio driver
2018-06-08 18:04:59 +02:00
Leon Krause
8d3ca2c137 Detect channel count, mix rate, and buffer length in HTML5 audio driver
Refactor WebAudio driver.
2018-06-08 02:50:58 +02:00
Hugo Locurcio
d54b5da940
Tweak some help texts in the build system
This also removes `unix_global_settings_path` from SConstruct
since it is no longer used.
2018-06-07 21:40:54 +02:00
Juan Linietsky
efdd0c4b89 Oops, for some reason gedit used this file as my notebook, though I made a new one. 2018-06-07 12:52:00 -03:00
Juan Linietsky
b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
Rémi Verschelde
7d392cd6f4 SCons: Allow unbundling libwebsockets and miniupnpc 2018-06-07 10:42:30 +02:00
Rémi Verschelde
f392650be2 Improve return value of OS.execute in blocking/non-blocking variants
Initialized the PID to -2, which will be the value returns in blocking-
mode where the PID is not available. (-1 was already taken to signify an
execution failure).

OS::execute will now properly return a non-OK error code when it fails
to execute the target file.

The documentation was rewritten to be very clear about the differences
between blocking and non-blocking mode.

Fixes #19056.
2018-05-30 12:55:17 +02:00
Dmitry Pupinin
46bab3abc7 Allow setting higher numbers in Android version/code 2018-05-29 11:59:23 +02:00
Guilherme Felipe
c8e0ec0580 Change position of validation in set_custom_mouse_cursor 2018-05-28 09:36:30 -03:00
Max Hilbrunner
856d945248
Merge pull request #19210 from guilhermefelipecgs/fix_invalid_image
Add validation in set_custom_mouse_cursor
2018-05-28 12:52:10 +02:00
Guilherme Felipe
aad6bdad94 Add validation in set_custom_mouse_cursor
Check if the image is valid.
2018-05-27 20:55:05 -03:00
Guilherme Felipe
aa174d963d Fix memory leak in set_custom_mouse_cursor 2018-05-26 15:56:35 -03:00
Max Hilbrunner
fd1ee14056
Merge pull request #19148 from mhilbrunner/mhilbrunner-js-log
Javascript: Remove weird log
2018-05-24 21:11:17 +02:00
Max Hilbrunner
0c56e011ad
Javascript: Remove weird log 2018-05-24 20:18:21 +02:00
Guilherme Felipe
8c17d8e6fe More fixes to set_borderless_window
[x11] Preserve window size when calling this method.
[osx] Make sure it don't make the window resizable if it's not needed.
[windows] clean up the code.
2018-05-23 17:42:31 -03:00
Max Hilbrunner
0980991e64
Merge pull request #19070 from guilhermefelipecgs/fix_19033
Fix mouse confined and set_borderless_window
2018-05-21 18:30:11 +02:00
Max Hilbrunner
3ac7f08b55
Merge pull request #19082 from guilhermefelipecgs/fix_cursor
Fix cursor not displaying arrow when transiting from mode captured to visible.
2018-05-21 18:26:42 +02:00
Guilherme Felipe
9af14ac1db Fix #15678
Fix cursor not displaying arrow when transiting from mode captured to
visible.
2018-05-21 14:37:30 -03:00
Fabio Alessandrelli
875d822d77 Fix OSXCROSS build with clang-6.0 2018-05-21 16:16:16 +02:00
Guilherme Felipe
28d24c4f66 Fix #19033
- Fix a bug when mouse is confined don't update the cursor shape.
- Don't let the mouse leave the window when resizing to a smaller
resolution when MOUSE_MODE_CONFINED.
- Fix set_borderless_window to preserve the actual video_mode.widht/height.
2018-05-20 20:53:04 -03:00
Rémi Verschelde
82042bdd03
Merge pull request #18893 from eska014/html5-reldeb-Os
Build HTML5 release_debug with -Os
2018-05-16 22:50:45 +02:00
Daniele Giuliani
d315b0fb8a added get_creation_time function for gdscript 2018-05-16 00:50:57 +02:00
Rémi Verschelde
57d257c361
Merge pull request #18680 from Gamblify/DummyTextureLoader
Dummy texture importer
2018-05-15 10:27:07 +02:00
Leon Krause
975c0516a4 Build HTML5 release_debug with -Os, like release.
The increased build time is negligible in comparison to the decreased
file size.
2018-05-14 15:31:16 +02:00
Leon Krause
504ffda8d7 Small refactoring in HTML5 build scripts
Drop logic for non-existent 'profile' target
2018-05-14 15:30:27 +02:00
Max Hilbrunner
0db3d1d2a7
Merge pull request #15739 from poke1024/macos-catch-exception
Catch NSException in macOS run loop to prevent crashs
2018-05-13 23:51:20 +02:00
bruvzg
096eb38fb0
[macOS] Fix numeric keys scan-codes remapping. 2018-05-13 22:19:08 +03:00
Rémi Verschelde
0902915c33
Merge pull request #18751 from guilhermefelipecgs/fix_cursor_osx
Fix custom cursor disappearing on osx
2018-05-11 14:23:13 +02:00
Ruslan Mustakov
08a924bcee Proper focus in/out handling on iOS
PR #18675 (commit 96301e9) revealed a problem with how iOS lifecycle
callbacks were handled by Godot. Before that PR it was possible to get
NOTIFICATION_WM_FOCUS_IN callback without getting the corresponding
NOTIFICATION_WM_FOCUS_OUT. That commit added a flag to ensure they are
always coupled, but now there is an issue when, for example, you open a
notification panel on iOS without moving the app to background.
It resulted in view.stopAnimation being called without the
corresponding startAnimation when the app moves to foreground again, so
it looked like the game hanged.

I changed focus out notification to be sent in applicationWillResignActive,
because it makes more sense than to do it in applicationDidEnterBackground,
because it is always called in pair with applicationDidBecomeActive, where
focus in is sent. applicationDidEnterBackground may not come under
circumstances that are now described as a comment in code.
2018-05-11 17:19:39 +07:00
Guilherme Felipe
50a0220d2d Reset the cursor with Input.set_custom_mouse_cursor(null) 2018-05-10 20:02:12 -03:00
Rémi Verschelde
a415efa4b7
Merge pull request #18765 from eska014/enginejs-extalt
Facilitate using non-default filename extensions in HTML5 platform
2018-05-10 21:57:07 +02:00
Max Hilbrunner
486ec499f3
Merge pull request #18766 from eska014/html5-localcustomshell
Use local path for custom HTML5 shell export
2018-05-10 16:51:13 +02:00
Leon Krause
d1970888d3 Use local path for custom HTML5 shell export 2018-05-10 15:31:44 +02:00
Leon Krause
96f907c023 Accept non-default main packs in engine.js startGame()
Allows using startGame() with main packs exported as .zip, but also any
other custom extension, for example if a web game host does not allow
the .pck filename extension.
2018-05-10 15:08:19 +02:00
Max Hilbrunner
f20af4b632
Merge pull request #18753 from eska014/html5-iframefocus
Fix keyboard focus lock-out with HTML5 canvas in iframe
2018-05-10 15:01:24 +02:00
Leon Krause
32eb3e1b7d Add Engine.setWebAssemblyFilenameExtension()
Some web game hosts only allow certain filename extensions. If .wasm is
not allowed, this function allows overriding the WebAssembly filename
extension to work around that restriction.
2018-05-10 14:50:34 +02:00
Leon Krause
9080e96bc8 Fix keyboard focus lock-out with HTML5 canvas in iframe 2018-05-10 02:42:47 +02:00
Rémi Verschelde
fe82b5a122
Merge pull request #18749 from eska014/html5-mousecapture-rel
Fix relative motion with captured mouse in HTML5 platform
2018-05-10 01:26:49 +02:00
Guilherme Felipe
48f9e6a05b Fix custom cursor disappearing on osx 2018-05-09 20:06:59 -03:00
Leon Krause
d78b10313b Fix relative mouse motion when captured in HTML5 platform 2018-05-10 01:02:48 +02:00
Rémi Verschelde
1380040337
Merge pull request #18716 from guilhermefelipecgs/support_for_atlas_tex_on_cursor_2
Add support for atlas texture on set_custom_mouse_cursor
2018-05-09 19:53:56 +02:00
Guilherme Felipe
8ead09342d Add support for atlas texture on set_custom_mouse_cursor 2018-05-09 12:44:43 +00:00
Gustav Lund
3dcf338ebb Dummy texture importer
Added a dummy importer for textures to use with the server platform.
Allows for running a project in headless mode without crashing when loading scenes containing textured objects
Also as a result decreases load time as no image files have to be loaded.
2018-05-09 08:13:02 +02:00
Hein-Pieter van Braam
07f590046a For uwp the ARM architecture needs to be in lower case 2018-05-09 01:16:05 +02:00
Rémi Verschelde
720e2f7b09
Merge pull request #18726 from volzhs/remove-legacy
Remove android compatibility under API 16
2018-05-08 23:49:37 +02:00
volzhs
2f8f34ceaf Remove android compatibility under API 16 2018-05-09 06:01:33 +09: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
Rémi Verschelde
a6552819b1 Android: Increase targetSdkVersion to 27
Matches the change for 2.1 in #18626, and the new requirements from Google
for new apps starting with August 2018 (targetSdkVersion 26 or higher):
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
2018-05-08 15:29:42 +02:00
Rémi Verschelde
7e39647623
Merge pull request #18665 from mhilbrunner/build-sdk
Windows detect.py: Detect missing WindowsSdkDir
2018-05-08 10:21:54 +02:00
Max Hilbrunner
af128f6d39
Merge pull request #16573 from StateOff/more_console_debugging
Local debugging fix & extensions
2018-05-08 07:00:45 +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
Max Hilbrunner
c32b24da70
Merge pull request #18627 from RameshRavone/patch-2
Fix: JAR files signed with the MD5 algorithm as unsigned (godot 3)
2018-05-08 04:31:20 +02:00
RameshRavone
d3182248c4
Fix: JAR files signed with the MD5 algorithm as unsigned 2018-05-07 21:02:53 +05:30
Ruslan Mustakov
96301e934d Resume audio on iOS after phone call or alarm
When a phone call or an alarm triggers on iOS, the application receives
an "audio interruption" and it's up to the application to resume
playback when the interruption ends. I added handling for audio
interruptions same as if the game is focused out and then back in.
2018-05-07 15:48:46 +07:00
Max Hilbrunner
a6b191e3e0
Windows detect.py: Detect missing WindowsSdkDir 2018-05-07 00:42:12 +02:00
Max Hilbrunner
a53b08861a
Merge pull request #18541 from profan/fix/win-sleep
Windows: ensure minimum possible timer resolution for sleep
2018-05-05 06:47:13 +02: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
Rémi Verschelde
de97339a2d
Merge pull request #18291 from akien-mga/coverity-uninitialized-scalar-var
Fix Coverity reports of uninitialized scalar variable
2018-05-01 19:14:07 +02:00
Robin Hübner
8cb1ff9452 windows: ensure minimum possible timer resolution for sleep 2018-05-01 09:58:16 +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
Ignacio Etcheverry
c8884ce3bd Fix _export_begin not being called when exporting to android 2018-04-26 23:07:21 +02:00
Hugo Locurcio
1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Ruslan Mustakov
265caa687b Provide error details when in-app purchase fails 2018-04-19 21:04:20 +07:00
Rémi Verschelde
bf7ca623a6 Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar
variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html

These happen most of the time (in our code) when instanciating structs
without a constructor (or with an incomplete one), and later returning
the instance. This is sometimes intended though, as some parameters are
only used in some situations and should not be double-initialized for
performance reasons (e.g. `constant` in ShaderLanguage::Token).
2018-04-19 15:20:45 +02:00
Ruslan Mustakov
5dffa506dc Fix Android input source checks
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.
2018-04-16 11:19:07 +07: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
62b835a2cd Fix custom cursor when it's hidden
[Linux] Ensures that the custom cursor will be used when changing to
MOUSE_MODE_VISIBLE. Fix #3086

[Windows] Fix cursor flickering when MOUSE_MODE_HIDDEN.

[Mac] Fix possible cursor flicker when MOUSE_MODE_HIDDEN.
2018-04-09 10:28:20 -03:00
Juan Linietsky
1570a72eee
Merge pull request #17742 from marcelofg55/audio_device_list
Added new audio device functions to set/get the audio device
2018-04-07 16:40:47 -03:00
bruvzg
ddae098dee
Experimental support for windows with per-pixel transparency (macOS, X11 and Windows). 2018-04-07 17:11:45 +03:00
Guilherme Felipe
dc57632d66 Remove size restriction for mouse cursor 2018-04-05 15:41:09 -03:00
Rémi Verschelde
866254343b
Merge pull request #17827 from bruvzg/macos_shortcut_key_remapping_fix
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts.
2018-04-05 13:22:52 +02:00
Rémi Verschelde
7e9aa89fb8
Merge pull request #17777 from bruvzg/macos_exit_code
[macOS] Return exit code specified by `OS.exit_code` parameter.
2018-04-04 22:35:40 +02:00
Rémi Verschelde
919209907d
Merge pull request #17792 from eska014/enginejs-preloadpaths
Handle directories in engine.js preloadFile()
2018-04-04 22:26:14 +02:00
Rémi Verschelde
bba80721dc
Merge pull request #17801 from endragor/android-input-checks
Add safety checks when handling Android input
2018-04-04 22:09:03 +02:00
Rémi Verschelde
5dc514aced
Merge pull request #17880 from litdeviant/master
Fix UpdatePowerInfo method implementation in PowerIphone class
2018-04-03 11:05:49 +02:00
Rémi Verschelde
3ef85ddb8d
Merge pull request #17836 from eska014/detect-emconfig
Detect and configure JavaScript build per Emscripten configuration file
2018-04-03 10:33:33 +02:00
Rémi Verschelde
59710880cd
Merge pull request #17844 from Faless/uwp_fix
Fix UWP build after #17194
2018-04-02 11:51:26 +02:00
Igors Vaitkus
06fab24348
Fix UpdatePowerInfo method implementation in PowerIphone class 2018-03-31 02:52:37 +03:00
Fabio Alessandrelli
b8c73b195f Fix bug in HTML5 HTTPClient.
The URL parameter already has a slash, adding an extra one results in
an invalid resource path
2018-03-30 14:31:18 +02:00
Fabio Alessandrelli
e6364c3fd5 Fix UWP build after #17194
`uwp/detect.py` was not setting the `env.msvc` variable to true causing
scons to pass wrong arguments to `msvc` (using `clang/gcc` options)
which in turn break the build due to `-Werror=return-type` not being
recognized by ms compiler.
2018-03-29 18:21:08 +02:00
Leon Krause
5be7c3dcee Detect and configure JavaScript build per Emscripten configuration file 2018-03-29 04:07:23 +02:00
bruvzg
5ba984fc8c
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts. 2018-03-28 20:22:59 +03:00
Fabio Alessandrelli
e7b9e2f970 Fix IPhone and OSX cross compilation 2018-03-28 19:08:20 +02:00
Ruslan Mustakov
995724b762 Add safety checks when handling Android input
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.
2018-03-27 22:03:44 +07:00
Leon Krause
3014e48ec5 Fix engine.js startGame() when loading from directory 2018-03-27 11:26:34 +02:00
Leon Krause
d373029382 Allow custom path when using engine.js preloadFile() with URL 2018-03-27 11:26:29 +02:00
Leon Krause
6f1bddf4b5 Fix engine.js preloadFile() with directories 2018-03-27 11:26:25 +02:00
Leon Krause
63c7fc6358 Expose Emscripten libs to engine.js discreetly 2018-03-27 09:12:08 +02:00
Marcelo Fernandez
ecc1b34cbc Added new audio device functions to set/get the audio device 2018-03-26 17:41:05 -03:00
Rémi Verschelde
4a5723f59e
Merge pull request #17760 from eska014/html5-refactor
Refactor HTML5 platform build script
2018-03-26 21:15:17 +02:00
Leon Krause
d8d9eea722 Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00
bruvzg
1a38449ab9
[macOS] Return exit code specified by OS.exit_code parameter. 2018-03-26 16:55:57 +03:00
bruvzg
d6c6a65438
Revert "Implement OS_OSX::execute"
This reverts commit e42576548f.
2018-03-23 11:56:05 +02:00
bruvzg
14597dc2b2
Fix dragging window from non-retina to retina display. 2018-03-22 18:24:09 +02:00
Marcelo Fernandez
35d21c0881 Fix several in-class initialization clang warning 2018-03-22 00:17:18 -03:00
Rémi Verschelde
baa092e99d
Merge pull request #17653 from eska014/rwlock-dummy
Add RWLockDummy for NO_THREADS builds
2018-03-21 17:40:01 +01:00
Xavier Sellier
61e8f8a866 Prevent android to split-screen 2018-03-21 08:53:51 -04:00
Rémi Verschelde
6066b236aa
Merge pull request #17645 from volzhs/android-device-info
Fix getting Android device information
2018-03-20 11:28:15 +01:00
volzhs
4e378aeeb8 Fix getting Android device information
Fix #17644
2018-03-20 13:53:33 +09:00
Leon Krause
25800ffb0e Add RWLockDummy for NO_THREADS builds 2018-03-20 05:37:42 +01:00
bruvzg
e42576548f
Implement OS_OSX::execute 2018-03-19 12:56:03 +02:00
Leon Krause
d6c9d8d778 Disable Emscripten assertions in release_debug builds
The messages generated by some assertions can be confusing to users.
2018-03-18 21:33:54 +01:00
Leon Krause
e06a56eac8 Fix typo in engine.js 2018-03-16 15:40:00 +01:00
bruvzg
e337eecd17
Fix MinGW cross-build 2018-03-15 17:29:55 +02:00
Bastiaan Olij
cc9e8aa732 Added missing import BoolVariable
Didn't like the missing BoolVariable :)
2018-03-15 22:35:44 +11:00
Leon Krause
61026e62bf Check only for WebGL 1.0, move test to HTML file
Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after
reading project settings, so check for the lower version.

The test is now in the HTML file, so if desired WebGL 2.0 can be
checked early by changing the behaviour there.
2018-03-15 04:04:24 +01:00
Gary Oberbrunner
d1318ee12c Enable SCons to autodetect Windows MSVC compiler
SCons has good compiler detection logic for MSVC compilers. Up to now,
Godot hasn't used it; it depends on passed-in OS environment vars from
a specific Visual Studio cmd.exe windows. This makes it harder to
build from a msys or cygwin shell.

This change allows SCons to autodetect Visual Studio unless it sees
VCINSTALLDIR in the os.environ. It also adds a 'msvc_version' arg for
manual specification of compiler version, and uses the existing 'bits'
arg to specify the target architecture. More detail could be added as
desired. It also adds 'use_mingw' to always use mingw, even if Visual
Studio is installed. That uses the existing mingw setup logic.

If people are used to building Godot in a Visual Studio cmd window,
this should not change the behavior in that case, since VCINSTALLDIR
will be set in those windows. (However, note that you could now unset
that var and build with any other MSVC version or target arch, even in
that window.)

I refactored much of platform/windows/detect.py during this, to
simplify and clarify the logic. I also cleaned up a bunch of env var
settings in windows/detect.py and SConstruct to use modern SCons
idioms and simplify things.

I suspect this will also enable using the Intel compiler on Windows,
though that hasn't been tested.
2018-03-13 09:51:05 -04: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
Rémi Verschelde
4287c7822b
Merge pull request #17440 from viktor-ferenczi/issue-5042
Properly closing all files in Python build code
2018-03-13 11:49:58 +01:00
Yannick Le Duc
b5c7e6bac9 fix iOS build - error due to GLES2 missing include (with the advice from bruvzg[m] on irc) 2018-03-13 10:42:23 +01:00
Viktor Ferenczi
272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +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
bruvzg
ad67911f1a
Explicitly set OpenGL profile to core (X11, Windows).
Enable GLES2 on Windows.
2018-03-06 15:53:30 +02:00
Marcelo Fernandez
d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
Rémi Verschelde
e619727e99 SCons: Fix linking system pcre2 on server platform
Fixes #17245.
2018-03-04 13:46:54 +01:00
Marcelo Fernandez
a42dfd7882 Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export 2018-03-03 10:23:00 -03:00
bruvzg
506e17ee70
Hack to force macOS window activation for non-bundled app. 2018-03-03 13:28:59 +02:00
Rémi Verschelde
8d01b706ff
Merge pull request #17158 from bruvzg/gles2_driver_select
[GLES2] Renderer selection improvement
2018-03-02 18:43:18 +01:00
bruvzg
a5a4f3714b
GLES2 renderer support on macOS. 2018-03-02 13:15:12 +02:00
bruvzg
f0d24de960
Fix --help output, allow renderer override from command line (--video-driver). 2018-03-02 10:05:14 +02:00
Rémi Verschelde
4bb98348a8
Merge pull request #17133 from bruvzg/macos_fix_webm_optim
[Build] Fix WebM (libvpx) SIMD optimizations on macOS.
2018-03-01 16:36:24 +01:00
karroffel
eac4c984df add GLES 2 renderer for 2D
This commit adds a new rendering backend, GLES2, and adds a
project setting to enable it.

Currently this backend can only be used on the X11 platform,
but integrating into other platforms is planned.
2018-03-01 15:12:30 +01:00
Rémi Verschelde
7f3024d343
Merge pull request #17058 from marcelofg55/minmax_windows
Fixed Windows ignoring minimized/maximized status set by user
2018-03-01 13:31:02 +01:00
Rémi Verschelde
3e03ed90a8
Merge pull request #17137 from endragor/fix-audio-init-crash
Fix intermittent audio driver crash during startup on Android
2018-03-01 12:50:31 +01:00
Ruslan Mustakov
c10749d51f Fix intermittent audio driver crash during startup on Android
set_pause can be called before the driver is initialized, and there
already is a check for that. The problem is that the 'active' field
was not initialied in the constructor, which lead to it having an
undefined value.
2018-03-01 17:40:44 +07:00