Commit graph

279 commits

Author SHA1 Message Date
bruvzg
e2675e9462 macOS, prevent multiple CGDisplayHideCursor calls unpaired with CGDisplayShowCursor.
(cherry picked from commit 7a250b579f)
2020-06-22 12:04:31 +02:00
bruvzg
2256946f79
[3.2] Add keyboard layout enumeration / set / get functions (macOS, Windows, Linux/X11). 2020-06-13 11:01:49 +03:00
bruvzg
c994eb1daf
[3.2] Fix macOS global menu removal and preserve order. 2020-06-02 16:37:19 +03:00
Technohacker
0456311be3
Don't force borderless mode when using per-pixel transparency 2020-05-10 21:05:37 +05:30
Haoyu Qiu
0d8b3efeb7 Adds extra cursors for macOS
Before, plain arrow cursor or unsuitable ones were used.

(cherry picked from commit 8f881847c0)
2020-02-06 13:02:08 +01:00
Haoyu Qiu
bda9145aae Fixes IME input backspace on macOS 2020-01-14 19:41:42 +08:00
bruvzg
d07cdc594f
[macOS] Load PCK from the .app bundle resources, instead of changing working directory. 2020-01-10 18:02:29 +02: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
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
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
509afcea92
Fix non-HiDPI mode on HiDPI displays on macOS Catalina. 2019-10-13 23:15:20 +03: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
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
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
bruvzg
e19b6296e3
Update macOS global mouse position at startup 2019-06-18 22:44:29 +03: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
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
hbina085
f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04: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
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
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
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
bruvzg
37f0a6d99a
Fix macOS accumulated mouse scroll events. 2019-03-06 15:35:19 +02: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