Fixes a small memory leak reported by lsan:
```
Direct leak of 73 byte(s) in 1 object(s) allocated from:
#0 0x7f29825f3e70 in malloc (/lib64/liblsan.so.0+0xee70)
#1 0x7f29824a5729 in XGetWindowProperty (/lib64/libX11.so.6+0x29729)
```
The Haiku port now resides at:
https://github.com/godotengine/godot-haiku-platform
While we're happy to support as many Free and Open Source platforms as we can,
we need to put the main focus on the platforms that we can reasonably maintain,
and for Haiku we have been lacking maintainers ever since the port was first
merged in 2015.
The Haiku code has not been compiling and much less working at least since the
release of Godot 3.0, and while some attempts have been made at fixing things,
it's still not functional today in the `3.2` branch (and much less in `master`,
understandably).
Having it in an external repository should hopefully enable Haiku contributors
to fix issues in their own time, and possibly tag versions compatible with
past Godot releases once they are ready.
(cherry picked from commit efcc508ee5)
The missing file type in file attributes was causing the file to lose
executable permissions when unzipped with some softwares.
(cherry picked from commit 4501771fd8)
- Refactored the Engine code, splitted across files.
- Use MODULARIZE option to build emscripten code into it's own closure.
- Optional closure compiler run for JS and generated code.
- Enable lto support (saves ~2MiB in release).
- Can now build with tools=yes (not much to see yet).
- Dropped some deprecated code for older toolchains.
- Add onExit, and onExecute JS function.
- Add files drag and drop support.
- Add support for low precessor usage mode (via offscreen render, swap).
Make the first iteration as soon as the canvas is setup, avoiding a
black screen before the next animation frame is requested.
Also create OS and do setup before syncing FS to avoid crash when IDBFS
access is denied.
The previous code for OS_Windows::get_ticks_usec() multiplied the tick count by 1000000 before dividing by ticks_per_second. The ticks is counted in a 64 bit integer and is susceptible to overflow when a machine has been running for a long period of time (days) with a high frequency timer.
This PR separates the overall calculation into one for seconds and one for the remainder, removing the possibility of overflow due to the multiplier.
(cherry picked from commit db9fa88160)
Configured for a max line length of 120 characters.
psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:
- Manually wrapped strings will be reflowed, so by using a line length
of 120 for the sake of preserving readability for our long command
calls, it also means that some manually wrapped strings are back on
the same line and should be manually merged again.
- Code generators using string concatenation extensively look awful,
since black puts each operand on a single line. We need to refactor
these generators to use more pythonic string formatting, for which
many options are available (`%`, `format` or f-strings).
- CI checks and a pre-commit hook will be added to ensure that future
buildsystem changes are well-formatted.
(cherry picked from commit cd4e46ee65)
The value of this, does not include the layout.
The code has extra logic to map the unicode value to our keylist,
supporting ASCII and Latin-1.
(cherry picked from commit 0a35b97b62
with help of https://github.com/Faless/godot/tree/js/keyCode)