Commit graph

649 commits

Author SHA1 Message Date
Aaron Franke 9986439352
Commit other files changed by file_format.sh 2020-07-13 14:14:11 -04:00
bruvzg 996910b627
Add error messages if Vulkan init failed, prevent Vulkan context freeing uninitialized device and instance. 2020-07-13 19:24:21 +03:00
Daniel Ting 9605fc54c7 Fix cancel/OK button order on macOS
The macOS platform convention regarding button order is cancel on left,
OK on right.
2020-07-10 15:10:11 -05:00
Marcel Admiraal 26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
bruvzg bcc3c72d9c
[macOS] Fix transient windows. 2020-07-09 14:22:56 +03:00
Rémi Verschelde c2a0bfa95b
Merge pull request #40111 from DanielZTing/master
Fix opening URLS with special characters in macOS
2020-07-05 00:51:13 +02:00
bruvzg df968d577a
[macOS] Implement seamless display scaling. 2020-07-04 10:36:33 +03:00
Daniel Ting b8e6ff9a7f Fix opening URLS with special characters in macOS
The Online Tutorials section of InputMap in the editor's built-in
documentation viewer contains this link:

docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap

The macOS implementation for opening a link percent-encodes it before
sending it to the browser, resulting in a 404. This is to fix #13422
where filenames with special characters could not be opened in Finder.
However, this breaks URLS so I added a check to see if the resource
scheme is file:// and if so, only then is it escaped. This allows other
schemes like `http`, `ftp`, and `mailto` to be used.
2020-07-03 23:00:48 -05:00
Juan Linietsky 14263d3d0d Improve the situation of DND on X11 2020-07-03 12:09:22 -03:00
bruvzg a9e341cff3
[macOS] Implement confined mouse mode. 2020-07-02 17:34:58 +03:00
Rémi Verschelde 5c9ee93f3e
Merge pull request #39788 from bruvzg/macos_apple_silicon
[macOS] Add support for the Apple Silicon (ARM64) build target.
2020-07-01 16:45:23 +02:00
Rémi Verschelde 372136fe75 Environment: Refactor code for readability + more
- Makes all boolean setters/getters consistent.
- Fixes bug where `glow_hdr_bleed_scale` was not used.
- Split CameraEffects to their own source file.
- Reorder all Environment method and properties declarations,
  definitions and bindings to be consistent with each other
  and with the order of property bindings.
- Bind missing enum values added with SDFGI.
- Remove unused SDFGI enhance_ssr boolean.
- Sync doc changes after SDFGI merge and other misc changes.
2020-07-01 14:44:45 +02:00
bruvzg a07578592b
[macOS] Add application become/resign active notifications. 2020-06-30 17:59:30 +03:00
bruvzg accae11fe3
[macOS export] Set correct external file attributes (Unix mode), and creation time. 2020-06-30 10:16:02 +03:00
bruvzg 00299f15b4
[macOS] Add support for the Apple Silicon (ARM64) build target. 2020-06-29 12:33:51 +03:00
bruvzg 7a250b579f
macOS, prevent multiple CGDisplayHideCursor calls unpaired with CGDisplayShowCursor. 2020-06-22 11:38:43 +03:00
PouleyKetchoupp 4501771fd8 Set proper file type attribute for OSX zip export
The missing file type in file attributes was causing the file to lose
executable permissions when unzipped with some softwares.
2020-06-20 10:04:18 +02:00
Hugo Locurcio fdb89a3f9a Rename "Identifier" to "Bundle Identifier" in macOS/iOS export presets
"Bundle Identifier" is more well-understood among macOS and iOS
developers and is less ambiguous.

This is a slight breaking change as export presets will need to be
updated to account for this change.

See https://github.com/godotengine/godot-docs/pull/3295.
2020-06-19 09:59:38 +02:00
Rémi Verschelde d3c10e8dd6
Merge pull request #39457 from bruvzg/kbd_layouts
Add keyboard layout enumeration / set / get functions.
2020-06-15 11:10:34 +02:00
bruvzg 92352b1c23
Add keyboard layout enumeration / set / get functions (macOS, Windows, Linux/X11), remove latin variant function. 2020-06-13 11:02:00 +03:00
bruvzg f5c856ea40
macOS export, add notarization support and id / signing / notarization config check. 2020-06-10 15:58:30 +03:00
Marcel Admiraal d04cbbd76b Update OSX GUID to SDL uid conversion.
Co-authored-by: John Wakley <johncwakley@users.noreply.github.com>
2020-05-30 17:38:39 +01:00
Rémi Verschelde 74b5d6839a
Merge pull request #33447 from bruvzg/macos_zip_sign
macOS add signing of DMG and ZIPed export
2020-05-19 10:30:26 +02:00
bruvzg 08e80ccd99
Fix popup positions on multiple screens (with same scaling only). 2020-05-16 14:11:43 +03:00
bruvzg 4bec713b8c
macOS signing improvements: allow signed app exporting as ZIP, sign DMG after exporting. 2020-05-15 09:38:59 +03:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde 7e1e0f496b
Merge pull request #37802 from ThakeeNathees/window-position-bug-osx-x11
display server window position bug fix
2020-04-29 09:04:53 +02:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
bruvzg 0c4c530514
[macOS] Re-add define for build with 10.14 SDK, remove unsupported 10.12 checks. 2020-04-26 21:17:10 +03:00
Thakee Nathees 63a00aec68 display server window position bug fix (#37323) 2020-04-11 20:13:12 +05:30
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde cd4e46ee65 SCons: Format buildsystem files with psf/black
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.
2020-03-30 09:05:53 +02:00
dankan1890 06e8740184 Fixed missed occurrences in #37361 renamings. 2020-03-28 12:37:44 +01:00
bruvzg e1c1bb03ea
Prevent recursive _dispatch_input_event calls, improve focus regain on window deletion. 2020-03-26 23:22:04 +02:00
bruvzg 15a9f94346 Add macOS DisplayServer implementation.
Change global menu to use Callable, add support for check items and submenus.
2020-03-26 16:24:05 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde cbbe0743a9
Merge pull request #37219 from RajatGoswami/missing-include-guards
Adding missing include guards to header files identified by LGTM
2020-03-23 11:17:24 +01:00
Rajat Goswami 2ecf928ae3 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143
2020-03-23 04:52:36 -04:00
Aaron Franke 7dbe8b65ae
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 17:41:03 -04:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 1f6c9328dd Revert "Change LINKFLAGS to FRAMEWORKS which is supported since"
This reverts commit c924e83a64.

SCons `FRAMEWORKS` is, according to their latest docs, only supported
"On Mac OS X with gcc". While the "with gcc" part seems bogus, #36795
did introduce a link failure for our osxcross toolchain for compiling
macOS binaries from Linux. SCons probably fails to detect this as a
macOS target and does not use its `FRAMEWORKS` logic properly.

So using `LINKFLAGS` as we used to is the more portable solution.
2020-03-10 09:55:28 +01:00
bruvzg 6b23e36dbc
Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina. 2020-03-06 11:57:58 +02:00
Rémi Verschelde 42595085a5
Merge pull request #36752 from RandomShaper/rework_semaphore
Drop old semaphore implementation
2020-03-05 16:33:45 +01:00
hungrymonkey c924e83a64 Change LINKFLAGS to FRAMEWORKS which is supported since
Scons release 0.96.91

Fixes the link errors below

clang: error: no such file or directory: 'Carbon'
clang: error: no such file or directory: 'AudioUnit'
clang: error: no such file or directory: 'CoreAudio'
clang: error: no such file or directory: 'CoreMIDI'
clang: error: no such file or directory: 'IOKit'
clang: error: no such file or directory: 'ForceFeedback'
clang: error: no such file or directory: 'CoreVideo'
clang: error: no such file or directory: 'AVFoundation'
clang: error: no such file or directory: 'CoreMedia'
clang: error: no such file or directory: 'Metal'
clang: error: no such file or directory: 'QuartzCore'

Tested on
System Version: macOS 10.15.3 (19D76)

SCons by Steven Knight et al.:
script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
engine path: ['/usr/local/Cellar/scons/3.1.2_1/libexec/scons-local/SCons']

Xcode 11.3.1
Build version 11C504

Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0

Closes #36720
2020-03-04 08:36:28 -08:00
Pedro J. Estébanez 9a3a2b03b8 Drop old semaphore implementation
- Removed platform-specific implementations.
- Now all semaphores are in-object, unless they need to be conditionally created.
- Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined.
- Similarly to `Mutex`, methods are made `const` for easy use in such contexts.
- Language bindings updated: `wait()` and `post()` are now `void`.
- Language bindings updated: `try_wait()` added.

Bonus:
- Rewritten the `#ifdef` in `mutex.h` to meet the code style.
2020-03-03 13:20:42 +01:00
bruvzg 1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Rémi Verschelde 6bb075a53f Travis: Use Ubuntu 18.04 (bionic) as base image
It's now available and allows us to have a better default environment,
with GCC 7.4.0 and Clang 7.

We now need GCC 7+ for C++17 support so it's more efficient to upgrade
the image than to install it on Ubuntu 16.04 (xenial).

Also fixes a couple -Wdeprecated-declarations warnings on macOS now
that we build against macOS 10.12.
2020-02-22 20:00:28 +01:00
Rémi Verschelde a4801674c5 SCons: Bump required C++ standard to C++17
As per #36436, we now need C++17's guaranteed copy elision feature to
solve ambiguities in Variant.

Core developers discussed the idea to move from C++14 to C++17 as our
minimum required C++ standard, and all agreed. Note that this doesn't
mean that Godot is going to be written in "modern C++", but we'll use
modern features where they make sense to simplify our "C with classes"
codebase. Apart from new code written recently, most of the codebase
still has to be ported to use newer features where relevant.

Proper support for C++17 means that we need recent compiler versions:

 - GCC 7+
 - Clang 6+
 - VS 2017 15.7+

Additionally, C++17's `std::shared_mutex` (conditionally used by
`vk_mem_alloc.h` when C++17 support is enabled) is only available in
macOS 10.12+, so we increase our minimum supported version.
2020-02-22 20:00:21 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Rémi Verschelde 3dea5fd631 Remove incomplete battery status/power API
It was initially implemented in #5871 for Godot 3.0, but never really
completed or thoroughly tested for most platforms. It then stayed in
limbo and nobody seems really keen to finish it, so it's better to
remove it in 4.0, and re-add eventually (possibly with a different API)
if there's demand and an implementation confirmed working on all
platforms.

Closes #8770.
2020-02-14 13:43:32 +01:00
Rémi Verschelde 386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
Rémi Verschelde db81928e08 Vulkan: Move thirdparty code out of drivers, style fixes
- `vk_enum_string_helper.h` is a generated file taken from the SDK
  (Vulkan-ValidationLayers).
- `vk_mem_alloc.h` is a library from GPUOpen:
  https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11 14:08:44 +01:00
bruvzg 0ce4433686 Restore parts of #33783 and #32809 missing after rebase. 2020-02-11 12:06:30 +01:00
Rémi Verschelde fff4240bb4 Fix code formatting issues and VS compilation
Also temporarily disable multicheck build so that we get a full build
even when there are style issues on Vulkan.

Fixes #33356.
2020-02-11 12:05:19 +01:00
Rémi Verschelde a8e14bee58 Merge pull request #32821 from bruvzg/vlk_fix_macos_exit
[Vulkan, macOS] Fix RID leaks and crashes on exit.
2020-02-11 12:04:20 +01:00
bruvzg a85923b972 Move Vulkan context/rendering_device destruction to windowWillClose notification. 2020-02-11 12:04:16 +01:00
bruvzg d5df1b651c Improve HiDPI handling, fix incorrect window viewport clipping. 2020-02-11 12:04:04 +01:00
Rémi Verschelde 511f65214f SCons: Streamline Vulkan buildsystem + fixups
- Renamed option to `builtin_vulkan`, since that's the name of the
  library and if we were to add new components, we'd likely use that
  same option.
- Merge `vulkan_loader/SCsub` in `vulkan/SCsub`.
- Accordingly, don't use built-in Vulkan headers when not building
  against the built-in loader library.
- Drop Vulkan registry which we don't appear to need currently.
- Style and permission fixes.
2020-02-11 11:59:04 +01:00
Rémi Verschelde 6289e7d147 Merge pull request #29993 from bruvzg/vulkan
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
bruvzg b456bfad5c Add runtime GLES2 / Vulkan context selection. 2020-02-11 11:57:34 +01:00
bruvzg eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky c613ead5fa Added a spinlock template as well as a thread work pool class.
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky 0586e18449 Custom material support seems complete. 2020-02-11 11:53:29 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde 0ead0eeabb Merge pull request #35301 from Calinou/improve-console-error-logging
Improve the console error logging appearance
2020-02-10 11:16:01 +01:00
Marcel Admiraal 5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Rémi Verschelde fa7e2dd2ad
Merge pull request #35684 from timothyqiu/macos-sanitizers
Adds sanitizer options for macOS
2020-01-31 09:03:20 +01:00
Haoyu Qiu 8f881847c0 Adds extra cursors for macOS
Before, plain arrow cursor or unsuitable ones were used.
2020-01-31 14:16:06 +08:00
Haoyu Qiu df4ea84e03 Adds sanitizer options for macOS 2020-01-29 13:12:38 +08:00
Hugo Locurcio 580b8cc012
Improve the console error logging appearance
This makes secondary information less visually prominent
to improve overall readability.

Various loggers were also tweaked for consistency.
2020-01-19 00:24:17 +01:00
Fabio Alessandrelli 417c54b871 Remove unused ip_unix member from OSX/server. 2020-01-14 17:33:49 +01:00
Haoyu Qiu bda9145aae Fixes IME input backspace on macOS 2020-01-14 19:41:42 +08:00
bruvzg 2d22b6e5c3
[macOS/Mono] Filter release/debug and rename Mono data folder on export. 2020-01-10 20:08:01 +02:00
bruvzg d07cdc594f
[macOS] Load PCK from the .app bundle resources, instead of changing working directory. 2020-01-10 18:02:29 +02:00
bruvzg 9abde1626f
macOS DMG export: create folder structure for the files extracted from export template ZIP. 2020-01-10 12:28:32 +02:00
Rémi Verschelde 5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Rémi Verschelde 8454804972
Merge pull request #33967 from Calinou/add-os-is-window-focused
Add an `OS.is_window_focused()` getter
2020-01-06 11:39:18 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rémi Verschelde 8938577459 i18n: Sync translations with Weblate + update template
Also fix a few stray clang-format formatting errors that passed
through CI unnoticed.
2019-12-22 13:27:02 +01:00
Catchawink 5152afa70c Added microphone and camera usage descriptions to macOS builds. 2019-12-13 19:15:50 -05:00
bruvzg 29ba673fca
[macOS] Send resize event without actually resizing window on backing change.
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2019-12-08 18:29:31 +02:00
bruvzg 2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Hugo Locurcio 21a3923410
Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.

This partially addresses #33928.
2019-11-28 16:42:51 +01:00
bruvzg c8bf0ee062
[macOS] Fix locale detection. 2019-11-25 15:55:17 +02:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
bruvzg e423e1c663
[macOS] Remove CVDisplayLink v-sync hack. 2019-11-21 11:01:47 +02:00
bruvzg f675621725
[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event. 2019-10-30 14:42:21 +02:00
bruvzg 7b64340eb0
Fix compilation warnings in macOS build, enable warnings=extra werror=yes for macOS CI. 2019-10-24 20:37:56 +03:00
bruvzg d8c2e6a31a
[macOS] Fix non-ASCII volume name listing, replace deprecated volume listing API. Remove hidden mount points from the volume list. 2019-10-18 15:36:29 +03:00
Rémi Verschelde 1fed266bf5
Merge pull request #32809 from bruvzg/macos_1015_non_hidpi_fix
Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
2019-10-13 22:48:05 +02:00
bruvzg 509afcea92
Fix non-HiDPI mode on HiDPI displays on macOS Catalina. 2019-10-13 23:15:20 +03:00
Hugo Locurcio c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
bruvzg 1c592e5f1f
Add code signing support for Windows exports (using "signtool" on Windows and "osslsigncode" on the other platforms) 2019-10-04 22:33:03 +03:00
Rémi Verschelde 9a115ccaf3
Merge pull request #32518 from nekomatata/fix-revert-cursor
Properly revert cursor when using set_custom_mouse_cursor with null
2019-10-03 13:39:25 +02:00
PouleyKetchoupp 5bfe32eaa4 Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
2019-10-03 13:02:11 +02:00
bruvzg 5dca2e4f38
macOS code signing improvements (timestamp and hardened runtime options, entitlements property hint, remove excessive codesign calls, suppress "file not found" error on first export) 2019-10-02 21:00:16 +03:00
qarmin 50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
bruvzg db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu. 2019-08-26 16:45:49 +03:00
Rémi Verschelde 6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde 37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Hugo Locurcio 7de2c70e11
Turn OS.set_min/max_window_size() warnings into errors
Since invalid values will cause the setting to be discarded,
it makes more sense to display an error message instead of a
warning message.
2019-07-30 14:50:52 +02:00
Guilherme Felipe c3f69c6c76 Fix crash caused by a9a0d0fb15 2019-07-24 15:01:28 -03:00
Guilherme Felipe a9a0d0fb15 Fix cursor blinking in integrated GPUs
Optimization for Input::set_custom_mouse_cursor when used inside
_process function. (Avoids cursor blinking in low end devices)
2019-07-09 19:38:25 -03:00
Rémi Verschelde b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Rémi Verschelde d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Nils ANDRÉ-CHANG d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
bruvzg e19b6296e3
Update macOS global mouse position at startup 2019-06-18 22:44:29 +03:00
Rémi Verschelde 24ee8c3566 Add script to fix style issues and copyright headers
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
Rémi Verschelde 0d61fc2c0f
Merge pull request #29752 from bruvzg/window_size_limits
Add ability to limit maximum/minimum window size.
2019-06-17 11:58:00 +02:00
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
bruvzg b924fb97d6
Add ability to limit maximum/minimum window size. 2019-06-15 09:49:11 +03:00
Rémi Verschelde ec98db048f
Merge pull request #29481 from bruvzg/macos_fix_dvorak_qwerty_cmd_hotkeys
Fixes hotkeys on "Dvorak - QWERTY ⌘" keyboard layout.
2019-06-12 12:50:55 +02:00
Rémi Verschelde 0e6cac8ab8
Merge pull request #29465 from bruvzg/per_pixel_transp_impr
Removes redundant "splash" setting, improves per pixel transparency documentation.
2019-06-12 12:50:17 +02:00
bruvzg 360fb3af50
[macOS] Fixes hotkeys on "Dvorak - QWERTY ⌘" keyboard layout. 2019-06-04 19:50:50 +03:00
bruvzg 8ff72987c0
[macOS] Fixes unicode input with IME mode inactive, Improves IME mode documentation. 2019-06-04 11:29:00 +03:00
bruvzg 54863b20e6
Removes redundant "display/window/per_pixel_transparency/splash" setting, improves per pixel transparency documentation. 2019-06-04 11:21:29 +03:00
Rémi Verschelde e8fbb28e20
Merge pull request #29119 from bruvzg/native_icon_support
Add native window/taskbar icon support for Windows and macOS.
2019-05-27 12:09:42 +02:00
bruvzg 2b9ed68d6a
Add native window/taskbar icon support for Windows and macOS.
Co-authored-by: Markus Törnqvist <mjt@nysv.org>
2019-05-24 14:23:57 +03:00
Ibrahn Sahir 63068e2ccd Check project settings live before lookup in crash handler
In x11, windows and osx crash handlers, check project settings exists
before looking up the crash handler message setting.
Avoids crashing the crash handler when handling a crash outside project
settings lifetime. Instead omitting the configurable message and
continuing with trace dump.
2019-05-23 20:06:56 +01:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
George Marques c121d8871d
Allow project export to be canceled 2019-05-18 15:33:57 -03:00
bruvzg 22ee26849e
[macOS] Allow using user provided .icns files for exported app icons. 2019-05-17 08:49:21 +03:00
Rémi Verschelde ae41e35191
Merge pull request #27676 from qarmin/small_fixes_2
Small fixes to static analyzer bugs
2019-05-01 08:19:04 +02:00
Rémi Verschelde d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Rémi Verschelde b2f6beb888
Merge pull request #28061 from guilhermefelipecgs/fix_19137
[Input] Release keys/actions pressed if window loses focus
2019-04-29 18:39:45 +02:00
Rémi Verschelde f5cc29f9f3
Merge pull request #28185 from KLee1248/key_remapping
Re-maps KEY_BRACELEFT/RIGHT for OSX users
2019-04-29 17:44:33 +02:00
Guilherme Felipe c709dfdf06 [Input] Release keys/actions pressed if window loses focus
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
2019-04-27 12:05:12 -03:00
Rémi Verschelde c2a669a9f0 SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.

As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html

- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
  not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
  default, this includes the value of $CCFLAGS, so that setting
  $CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
  included in any command that uses the C preprocessor, including not
  just compilation of C and C++ source files [...], but also [...]
  Fortran [...] and [...] assembly language source file[s].

TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
KLee1248 8cbfc0365b Re-maps KEY_BRACELEFT/RIGHT for OSX users
Should fix #28098.
2019-04-19 02:31:15 +00:00
Guilherme Felipe 1bae73d7d0 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
Rémi Verschelde 846e7bbc53
Merge pull request #27490 from bruvzg/macos_non_resizable_fullscreen
Allow non-resizeable windows to enter full-screen mode.
2019-04-09 12:30:17 +02:00
Juan Linietsky cd4449e7ab Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
Hendrikto 49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
qarmin 8460d0678c Small fixes to static analyzer bugs 2019-04-04 22:00:16 +02:00
bruvzg 7c7182483f
[macOS] Allow non-resizeable windows to enter fullscreen mode. 2019-03-28 15:37:10 +02:00
bruvzg 1b6330b125
[macOS] Fix hiDPI scaling support in OS.get_real_window_size and OS.set_window.size functions. 2019-03-12 11:41:41 +02:00
Philip Whitfield b717eb714c osx: update mouse position on mouse press 2019-03-07 10:10:33 +01:00
bruvzg 24d59b56d3
[macOS] Fixes NumPad keys detection, adds some missing key mappings. 2019-03-06 22:03:15 +02:00
Rémi Verschelde e60465dd75
Merge pull request #26707 from bruvzg/fix_macos_mscroll
Fix macOS accumulated mouse scroll events.
2019-03-06 15:32:03 +01:00
bruvzg 37f0a6d99a
Fix macOS accumulated mouse scroll events. 2019-03-06 15:35:19 +02:00
volzhs 8920bb8c1b Fix directory check when exporting project
Fix #26702
2019-03-06 21:20:18 +09:00
Rémi Verschelde b4d5c1ab5b
Merge pull request #26633 from akien-mga/driver-fallback-etc
Disable driver fallback to GLES2 by default
2019-03-06 00:57:49 +01:00
Ricardo Lüders 3fdbdd8380 Fixes misleading error message when trying to export
This patch fixes the misleading error message when users
try to "export all" into an invalid destination path.

Closes #26539
2019-03-05 21:32:52 +01:00