Commit Graph

1926 Commits

Author SHA1 Message Date
72996df656 Revert "Try closing gracefully before terminating process" 2018-08-27 17:32:43 +02:00
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
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
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
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
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
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
7238462601 SCons: Disable min/max WinDef.h macros on MSVC
Fixes #21370.
2018-08-24 18:04:18 +02:00
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
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
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
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
8ebe5f45a7 Merge pull request #21332 from dragmz/apk-hint-fix
Fix file hints
2018-08-23 23:35:58 +02:00
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
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
86d9e67d7a Add responsive HTML5 export page with full-size canvas as new default 2018-08-23 21:28:09 +02:00
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
6e8b6be136 Facilitate external modification of HTML5 canvas size 2018-08-23 04:54:36 +02:00
2db494267b Modifications to raw input so the handling of absolute coordinates is more correct. 2018-08-22 21:27:15 -03:00
106e5a8d5e Merge pull request #20523 from moiman100/windows-raw-input
Raw input relative motion for Windows
2018-08-22 19:32:20 -03:00
b0419db46f add support libc++_shared stl on android 2018-08-23 05:02:47 +07:00
35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
4bf15d8090 Merge pull request #21236 from dragmz/windows-graceful-close
Try closing gracefully before terminating process
2018-08-21 22:47:21 +02:00
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
e9cb03f33e Merge pull request #20922 from kripken/err
HTML5: use console.warn instead of Module.printErr
2018-08-21 03:34:21 +02:00
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
9c1fd91732 fix Android/HTML5 custom templates option does not work 2018-08-20 17:38:23 +02:00
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
54fcdabfd3 Merge pull request #21179 from elasota/vs-pdb
Support debug_symbols in VS optimized builds
2018-08-19 09:34:06 +02:00
ffe0235f62 Support debug_symbols in VS optimized builds 2018-08-19 01:37:53 -04:00
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
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
aa594614db Update detect.py
Fixed a typo in detect.py
2018-08-17 12:08:17 +01:00
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
4e55835e48 Merge pull request #18096 from aaronfranke/master
[Core] Split up math_2d.h
2018-08-14 18:58:32 -03:00
6188388c5a Fix impossibility of removing folder which contains non-latin symbols(on Windows) 2018-08-14 11:49:16 +03:00
139e621338 Merge pull request #20913 from pulkomandy/master
Rebase patches for fixing haiku build.
2018-08-13 21:26:15 +02:00
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
a294a842cb Rebase patches for fixing haiku build. 2018-08-11 17:20:51 +02:00
cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
ea3d997f9d Revert "added get_creation_time function for gdscript" 2018-08-10 13:29:49 -03:00
275e0d5ee4 Merge pull request #18914 from notwarp/master
added get_creation_time function for gdscript
2018-08-10 13:28:47 -03:00
05fc12ddb6 Add OS::open_midi_inputs and OS::close_midi_inputs 2018-08-04 10:07:46 -03:00
dcbbc445db Relative motion based on raw input for Windows 2018-07-30 23:51:51 +03:00
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
e896261b87 Added missing support for traditional chinese on Windows, fixes #7674 2018-07-29 21:10:30 -03:00
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
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
746a15142f change framework name CoreMidi to CoreMIDI 2018-07-26 00:06:17 +08:00
a501678ba1 Merge pull request #20154 from marcelofg55/midi_driver
Added a new MIDIDriver class
2018-07-25 01:17:57 +02:00