Commit graph

416 commits

Author SHA1 Message Date
bruvzg 279ada89ab Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
(cherry picked from commit 6b23e36dbc)
2020-03-06 11:39:37 +01:00
bruvzg 56f5502402 [macOS] Fix locale detection.
(cherry picked from commit c8bf0ee062)
2019-11-29 16:05:07 +01:00
Guilherme Felipe 8ef5052967 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
2019-11-12 11:10:53 +01:00
bruvzg 8033270852 Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
(cherry picked from commit 509afcea92)
2019-10-25 16:28:38 +02:00
Ibrahn Sahir 465056b6eb 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.

(cherry picked from commit 63068e2ccd)
2019-07-03 16:31:01 +02:00
KLee1248 e3b1f3c1ad Re-maps KEY_BRACELEFT/RIGHT for OSX users
Should fix #28098.

(cherry picked from commit 8cbfc0365b)
2019-07-03 16:21:30 +02:00
bruvzg c6e49cc0d9 [macOS] Allow using user provided .icns files for exported app icons.
(cherry picked from commit 22ee26849e)
2019-07-03 13:19:40 +02:00
bruvzg d9aa43e793 [macOS] Allow non-resizeable windows to enter fullscreen mode.
(cherry picked from commit 7c7182483f)
2019-04-20 22:23:25 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
bruvzg 754e1b073a [macOS] Fix hiDPI scaling support in OS.get_real_window_size and OS.set_window.size functions.
(cherry picked from commit 1b6330b125)
2019-04-01 11:11:50 +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
Rémi Verschelde b0f782a0e3 Disable driver fallback to GLES2 by default
GLES2 is not designed to be a drop-in replacement for the GLES3 backend,
so the fallback mode has to be used knowingly. It *can* make sense for
simple projects which make sure to handle the differences between both
rendering backends, but most users should stick to one supported backend.

By making it opt-in, we can now use this parameter to define whether to
export ETC textures to Android and iOS when using GLES3 + Fallback.

When using GLES3 without Fallback on Android, set the proper min GLES
version in the AndroidManifest.

Also made the option boolean and renamed it for clarity and to avoid
conflict with the previous String option (which would always evaluate as
"true" otherwise).

Fixes #26569.
2019-03-05 16:36:46 +01:00
Rémi Verschelde b811207406 More style cleanup... 2019-03-04 10:11:29 +01:00
Juan Linietsky a1e73dcc94 Add support for event accumlation (off by default, on for editor), fixes #26536 2019-03-03 19:53:13 -03:00
Juan Linietsky 5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
bruvzg ac3158332b
[macOS] Make move_window_to_foreground to take focus in addition to moving window to front. 2019-02-23 20:06:33 +02:00
Rémi Verschelde bc26d0d6cd Platform: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h`
  (same for `osx`)
- `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h`
- in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`,
  `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to
  use `windows`. Some classes renamed accordingly too.
- `EditorExportAndroid` and `EditorExportUWP` renamed to
  `EditorExportPlatformAndroid` and `EditorExportPlatformUWP`
- `power_android` and `power_osx` renamed to `PowerAndroid` and
  `PowerOSX`
- `OSUWP` renamed to `OS_UWP`

Dropped:
- `platform/windows/ctxgl_procaddr.h`
2019-02-12 16:56:25 +01:00
Rémi Verschelde 75dae1b9a9 Drivers, main, servers: Ensure classes match their header filename
Renamed:
- `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h`
  (same for `coremidi` and `winmidi`)
- `main/timer_sync.h` -> `main_timer_sync.h`
- `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12 14:39:47 +01:00
bruvzg 50e2c1e184
[macOS] Fix rendering on retina displays with HiDPI support disabled. 2019-01-31 19:24:57 +02:00
Bastiaan Olij b53f2d1d59 Using DisplayLink to emulate vsync on OSX 2019-01-29 17:00:35 +11:00
Juan Linietsky 0c9fd3c4b4 Avoid cyclic iteration check, fixes #24969 2019-01-22 13:17:39 -03:00
Rémi Verschelde 2323464f5e ExportDialog: Make error messages translatable
Also fix missing newlines that caused #24202.
2019-01-21 18:34:53 +01:00
bruvzg b7e9e184aa
[macOS] Fix missing mouse move event speed. 2019-01-11 16:53:11 +02:00
Hein-Pieter van Braam e5b335d367 Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841
2019-01-09 02:06:13 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde d52100f4ff SCons: Allow building Mono module with OSXCross
Improve the test logic to only assume that we're building for macOS
if OSXCROSS_ROOT is defined *and* we requested p=osx.

Supersedes #24480.
2018-12-22 12:36:19 +01:00
Rémi Verschelde 57c3f6a94b
Merge pull request #20063 from moiman100/fix-button-mask
Unified button mask behavior across platforms
2018-12-14 23:31:52 +01:00
Rémi Verschelde 4c41e29c8e
Merge pull request #23923 from bruvzg/ime_gdscript
Changes IME to make it possible to use it from gdscript/gdnative
2018-12-11 18:00:48 +01:00
bruvzg 56b26c4369
Fix macOS icon export (add 1024px PNG icon and 32px/16px RLE icons). 2018-11-26 16:12:36 +02: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
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
bruvzg bbac90c859
[macOS] Change runtime OS version checks to allow build with MacOS 10.9 SDK, 2018-11-19 23:24:28 +02:00
bruvzg 4aa441591c
[macOS] Disable setWantsLayer on macOS < 10.14 2018-11-18 16:20:29 +02:00
bruvzg 30852d0237
[macOS] Fix blank splash screen 2018-11-09 21:47:23 +02: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
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
Marcelo Fernandez a069685fbb Fix OS X crash when running as .app 2018-10-29 21:50:41 -03: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