Bernhard Liebl
2419ffd428
On macOS, prevent key_event_buffer overflows
2018-01-19 08:47:30 +01:00
Bernhard Liebl
3ff18ee61e
Catch NSException in macOS run loop to prevent crashs
2018-01-15 09:31:12 +01:00
bruvzg
f0029fd3c6
[macOS] Adds ability to open files with "Open With" or double-click from Finder
2018-01-12 16:38:19 +02:00
bruvzg
b3d803c901
Fix IME producing multiple events per key press.
2018-01-10 13:43:24 +02:00
Rémi Verschelde
51709cd8c8
Merge pull request #15344 from bruvzg/osx_dylib_export
...
[GDnative] macOS `dylib` export fixes
2018-01-08 15:12:50 +01:00
bruvzg
ff82fbdf64
Remove 10.6+ runtime version checks, add 10.12+ runtime version checks
2018-01-07 01:21:47 +02:00
bruvzg
47770df198
Fix build on macOS pre 10.12, fix deprecation warnings on 10.12+
2018-01-06 16:12:57 +02:00
Rémi Verschelde
e4213e66b2
Add missing copyright headers and fix formatting
...
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
bruvzg
cce6adfc51
Adds dylib export for "dmg" export mode and change dylib path to "/Contents/Frameworks"
2018-01-04 21:41:59 +02:00
Duy-Nguyen TA
322cb08dd9
Fix macOS and other builds after #15299
...
Commit ammended by @akien-mga to fix more platforms.
2018-01-04 19:48:05 +01:00
Emmanuel Leblond
e315c94900
Change OS::initialize signature to return Error (fix segfault on x11)
2018-01-04 15:15:55 +01:00
Rémi Verschelde
b997773b26
Merge pull request #15033 from poke1024/shortcuts-mac
...
Alternative keyboard shortcuts for macOS
2018-01-04 14:56:29 +01:00
Rémi Verschelde
6322b0bbb7
Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursor
...
Custom hardware-accelerated mouse cursor
2018-01-03 08:35:59 +01:00
Rémi Verschelde
b50a9114b1
Update copyright statements to 2018
...
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Bernhard Liebl
3f122672a2
On macOS, change some default editor shortcuts
2017-12-26 11:24:12 +01:00
Guilherme Silva
a392dbdbe3
Add implementation for custom hardware cursor
2017-12-17 13:40:29 -02:00
Juan Linietsky
652c98a7be
Add epic hack so vsync can be toggled in run-time from script. Fixes #14458 .
...
Call needs to be routed via visual server to reach the proper thread.
2017-12-16 17:11:02 -03:00
Rémi Verschelde
fb84b49d87
Fix type mismatch in OS::set_borderless_window
...
Closes #14663 .
2017-12-14 19:16:20 +01:00
Juan Linietsky
f3ad14224e
-Add lightmapper
...
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Stefano Bonicatti
c067cf2c6a
Fixes vsync setting ignored when using a separate thread for rendering
...
Setting the vsync in the main thread, after the rendering thread starts
and takes the OpenGL context fails, so we need to do that before.
Also, for some reason, the main thread cannot make current the context
anymore.
Fixes #13447
2017-12-09 01:43:23 +01:00
Rémi Verschelde
13c2ff9320
Style: Apply new clang-format 5.0 style to all files
2017-12-07 08:02:00 +01:00
bruvzg
4899d91732
Add macOS shell_open URL escaping
2017-12-01 16:48:21 +02:00
Rémi Verschelde
6c9ee1f125
Merge pull request #13133 from endragor/resurrect-file-logging
...
Return and repair file logging
2017-11-21 14:25:33 +01:00
Ruslan Mustakov
d42c5646a5
Return and repair file logging
...
And make it configurable, too.
2017-11-21 16:43:44 +07:00
Bernhard Liebl
80ad8afc85
Native pan and zoom for macOS
2017-11-21 09:11:39 +01:00
Rémi Verschelde
6947bed015
Pass engine name and version parts as proper strings
...
Removes the need for _MKSTR all over the place which has the drawback of
converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing
a compilation error.
2017-11-20 00:51:14 +01:00
Rémi Verschelde
ecf80fbbba
Merge pull request #12988 from akien-mga/xdg-home-paths
...
Add support for XDG Base Directory spec
2017-11-20 00:42:51 +01:00
Rémi Verschelde
32c12a92a5
Add initial support for the XDG Base Directory spec
...
Spec version 0.7 from https://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html
(latest as of this commit).
Three virtual methods are added to OS for the various XDG paths we will use:
- OS::get_data_path gives XDG_DATA_HOME, or if missing:
~/.local/share on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows
- OS::get_config_path gives XDG_CONFIG_HOME, or if missing:
~/.config on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows
- OS::get_cache_path gives XDG_CACHE_HOME, or if missing:
~/.cache on X11, ~/Library/Caches on macOS and %APPDATA% on Windows
So for Windows there are no changes, for Linux we follow the full split spec
and for macOS stuff will move from ~/.godot to ~/Library/Application Support/Godot.
Support for system-wide installation of templates on Unix was removed for now,
as it's a bit hackish and I don't think anyone uses it.
user:// will still be OS::get_data_path() + "/godot/app_userdata/$name" by
default, but when using the application/config/use_shared_user_dir option
it will now use XDG_DATA_HOME/$name, e.g. ~/.local/share/MyGame.
For now everything still goes in EditorSettings::get_settings_dir(), but
this will be changed in a later commit to make use of the new splitting
where relevant.
Part of #3513 .
2017-11-19 20:54:24 +01:00
Rémi Verschelde
9f134aa5d1
Cleanup old references to GLES2 renderer
...
There are still some left in the Android Java code, even stuff to swap between
GLES1 and GLES2 support from early Godot days... would be good to see some cleanup
there too one day.
The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported.
It can be readded when GLES 2.0 support comes back. Fixes #13004 .
2017-11-19 17:52:18 +01:00
Rémi Verschelde
73049d115e
Rename OS::get_data_dir to OS::get_user_data_dir
...
Will be needed to avoid confusion with system data path (XDG_DATA_HOME)
and editor data dir in upcoming refactoring.
2017-11-17 20:55:09 +01:00
Rhody Lugo
2355f545ec
fix window position computation on macOS
2017-11-14 08:59:22 -04:00
Rémi Verschelde
ed57f0a0d4
Remove get_default_video_mode definition on OSX/iOS
...
It had been missed in d09160a8b6
and broke compilation
for those platforms.
Took the opportunity to run clang-format on the code base to fix some corner cases
that went through our static tests/were overlooked recently.
2017-11-09 23:36:08 +01:00
Juan Linietsky
7715a261d5
Merge pull request #12262 from AndreaCatania/pplug
...
Physics server plug
2017-11-03 23:39:44 -03:00
AndreaCatania
7a9ca08f16
Implemented physics plug
...
Moved init_physics
Implemented physics 2D plug
Fix clang
Fix clang
Fix static check
Fix clang
Fix static check
Moved physics server initialization
Moved physics server settings initialization
2017-11-04 03:25:51 +01:00
N0hbdy
f3fc07272c
Add Colemak keybindings to editor for osx
2017-10-30 22:51:02 +01:00
Rémi Verschelde
87694d1884
Disable logging until the logs location is sorted out
...
Temporary workaround for #12277 .
2017-10-29 15:50:27 +01:00
Marcelo Fernandez
ad4000d376
Implemented vsync OS functions for OS X
2017-10-23 13:26:33 -03:00
Bernhard Liebl
a7f18798aa
fixes several scaling problems on multi monitor retina/non-retina setups on OS X
2017-10-05 08:12:17 +02:00
Andreas Haas
132ba0ed97
Merge pull request #11568 from endragor/loggers
...
Extract logging logic
2017-10-02 23:51:26 +02:00
Poommetee Ketson
478fd21e07
Merge pull request #11575 from marcelofg55/move_path_to_trash
...
FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash
2017-10-02 23:52:09 +07:00
Marcelo Fernandez
12d40fa03f
Merged iphone and osx audio drivers into drivers/coreaudio
2017-09-30 02:16:42 -03:00
Marcelo Fernandez
20918587d3
FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash
2017-09-25 21:49:01 -03:00
Ruslan Mustakov
1a2311e350
Extract logging logic
...
Previously logging logic was scattered over OS class implementations
with plenty of duplication. Major changes in this commit:
- Extracted logging logic into a separate Logger hierarchy. It allows
easy configuration of logging mechanism depending on compile-time or
run-time configuration.
- Implemented RotatedFileLogger which is usually used with StdLogger,
providing persistency of logs. It is often important to be able to
obtain logs of the game even in production to be able to understand
what happened prior to some problem. On mobile there previously was
no way to obtain the logs aside from having the device connected to
your machine.
- flush() is not performed in release mode for every logged line. It
is only performed for errors.
2017-09-25 16:19:21 +07:00
BastiaanOlij
9d04f89beb
Removed get_resource_dir from osx platform
2017-09-24 19:37:22 +10:00
BastiaanOlij
86c66597f3
Comment out code that is causing project loading to fail on osx
2017-09-22 13:05:53 +10:00
letheed
5ad9be4c24
Rename pos to position in user facing methods and variables
...
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:
* pos -> position
* rot -> rotation
* loc -> location
C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Rémi Verschelde
53bbc046ee
Merge pull request #11252 from marcelofg55/fix_noaudio_crash
...
Fix crash when no audio driver is available
2017-09-17 22:48:22 +02:00
Thomas Herzog
7dffed485b
Merge pull request #11230 from maxim-sheronov/fix_enum_bindings
...
Fix enums bindings
2017-09-15 08:43:35 +02:00
Marcelo Fernandez
7a4c0ff35e
Fix crash when no audio driver is available
2017-09-13 20:54:55 -03:00
Maxim Sheronov
0fffa45158
Fix enums bindings
...
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Marcelo Fernandez
83fe937362
Added a crash handler to dump the backtrace on Windows, Linux and OS X
2017-09-13 10:07:23 -03:00
BastiaanOlij
099546ac00
Fixed loading package from resource folder, exporting textures to bundle and added a bit of feedback for a debug compile
2017-09-08 11:39:32 +10:00
poke1024
9d841b5336
Implements OS_OSX::get_system_dir()
2017-08-29 20:31:03 +02:00
Rémi Verschelde
bd282ff43f
Use HTTPS URL for Godot's website in the headers
2017-08-27 14:16:55 +02:00
Rémi Verschelde
7f49e2a7a0
Merge pull request #10487 from marcelofg55/curscr_as_default
...
p_screen param from get_screen_* funcs now default to the current screen
2017-08-22 08:12:04 +02:00
Rémi Verschelde
13f879587d
Merge pull request #10254 from marcelofg55/master
...
Added notification const NOTIFICATION_WM_ABOUT
2017-08-22 00:56:31 +02:00
Marcelo Fernandez
63f847b306
p_screen param from get_screen_* funcs now default to the current screen
2017-08-21 18:28:29 -03:00
Marcelo Fernandez
c6edf1821e
Fix y axis for set_window_position on OS X
2017-08-21 12:36:04 -03:00
Marcelo Fernandez
aae29c7a0e
Added notification const NOTIFICATION_WM_ABOUT
2017-08-17 11:28:45 -03:00
bruvzg
8aa86cb9bc
Implement NSTextInputClient protocol for IME
2017-08-09 19:09:33 +03:00
toger5
2286037bc3
removed calls to cursor_set_visible on all platforms fixes #10167
2017-08-08 14:04:22 +02:00
Rémi Verschelde
b0dfec77c2
Merge pull request #10127 from bruvzg/3.0-osx-logging
...
Duplicate error messages to macOS logging system (Console.app)
2017-08-07 14:58:25 +02:00
Rémi Verschelde
ae88eb5b50
Merge pull request #10099 from bruvzg/3.0-fix-osx-warp_mouse_pos
...
Fix warp_mouse_pos on macOS
2017-08-07 14:47:54 +02:00
bruvzg
68bf243461
Duplicate error messages to macOS logging system
2017-08-06 21:55:30 +03:00
Bojidar Marinov
7b7c7c8dc0
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
...
Closes #7695
2017-08-06 16:26:07 +03:00
bruvzg
0ed3da8e2a
Fix warp_mouse_pos on macOS
2017-08-04 23:43:32 +03:00
Rémi Verschelde
263452ee91
Merge pull request #9960 from marcelofg55/master
...
Fix get_screen_* funcs returning old values after resolution changes on OS X
2017-07-30 20:59:04 +02:00
Marcelo Fernandez
abbf821ddf
Fix get_screen_* funcs returning old values after resolution changes on OS X
2017-07-28 18:08:57 -03:00
bruvzg
d18922a56e
Change display scale when moving the window from monitor to monitor
2017-07-28 20:17:19 +03:00
Rémi Verschelde
a7b35edf7b
Merge pull request #9874 from bruvzg/3.0-osx-menu
...
Add macOS main menu (3.0)
2017-07-28 11:05:05 +02:00
Rémi Verschelde
5caf9d0d08
Merge pull request #9876 from bruvzg/3.0-resize-fix
...
Improved macOS window resizing behaviour (3.0)
2017-07-28 11:02:28 +02:00
bruvzg
3220fee6b2
Fix is_window_fullscreen() and set_window_fullscreen() behaviour after window has entered/left full-screen mode via green zoom button.
...
Fix get/set_current_screen & set_window_maximized.
2017-07-27 10:05:33 +03:00
bruvzg
f98a203377
Add macOS main menu
2017-07-27 10:05:29 +03:00
bruvzg
1c1565d0f9
Improved macOS window resizing behaviour.
2017-07-26 16:29:48 +03:00
bruvzg
7de7ca8ae4
Remove duplicate keycode constant for Numpad Enter key.
2017-07-26 14:43:02 +03:00
Marcelo Fernandez
2c27501c3f
Fix Right-Click (Ctrl-Click) on OS X
2017-07-23 12:45:59 -03:00
Juan Linietsky
25678b1876
-Renamed GlobalConfig to ProjectSettings, makes more sense.
...
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Marcelo Fernandez
a9c5895c16
Implemented borderless fullscreen code on OSX.
2017-07-02 23:40:44 -03:00
Marcelo Fernandez
fd7976ddd7
Implemented borderless window code for OSX.
2017-06-27 16:57:28 -03:00
ageazrael
109ad227d3
Used in the macOS HiDPI options window is too small
2017-06-13 09:54:55 +08:00
ageazrael
b3accab62d
Fixed middle mouse button can't bounce in macOS
2017-06-13 09:27:49 +08:00
Juan Linietsky
bcc435094d
Restired multithread support in OSX and Windows, should stop the crashes.
2017-06-10 10:15:33 -03:00
toger5
328d0e2b4e
osx release right button event fixed
...
RIGHT_MOUSE_BUTTON was not removed from the button mask (instead it was added...)
fixes #9079
2017-06-06 19:40:06 -07:00
alexholly
a3c90b0293
renamed all Rect2.pos to Rect2.position
2017-06-04 02:09:17 +02:00
Andreas Haas
9bc5348961
InputEvent: Renamed "pos" property to "position"
...
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
volzhs
0627445863
Make OS.get_locale() returns same value
2017-05-27 03:50:22 +09:00
toger5
72876ef10b
added modifier key to scroll event
2017-05-22 03:46:54 -07:00
toger5
b90df858c1
fixed osx input event
2017-05-22 01:17:57 -07:00
Juan Linietsky
5b3709d309
Removal of InputEvent as built-in Variant type..
...
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
BastiaanOlij
63db9a4bee
Doing a little bit of cleanup
2017-05-20 09:30:31 +10:00
Juan Linietsky
98a3296702
Removal of Image from Variant, converted to a Resource.
2017-05-17 07:37:45 -03:00
toger5
304a1f5b5a
Implemented scrolling factor for smooth trackpad scrolling
...
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
Sergey Pusnei
8589ca3903
Rename [gs]et_pos to [gs]et_position for Controls
...
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Rémi Verschelde
3fd10ff6f0
Style: Apply clang-format (3.9.1) to Obj-C++ files
2017-04-09 14:44:52 +02:00
BastiaanOlij
5c2ddb299b
Formatting of mm files
2017-04-09 21:22:40 +10:00
Rémi Verschelde
df61dc4b2b
Add "Godot Engine contributors" copyright line
2017-04-08 00:11:42 +02:00
Andreas Haas
c0b6756875
Input: Remove usage of platform dependent event IDs.
...
The ID property for InputEvents is set by `SceneTree` when sending the event down the tree.
So there's no need for the platform specific code to set this value when it will later be overriden anyway...
2017-03-26 15:59:32 +02:00
Julian Murgia
94103c0c02
Add API to access battery power state
...
Done:
- X11, server (tested)
- Windows (developed, would be nice to retest)
- OSX (not tested)
Prepared (not developed):
- Android (code is here, but may not compile)
- iphone
- winrt
- bb10
- haiku
- javascript
2017-03-04 18:04:29 +01:00
Rémi Verschelde
e837b25f55
Fix missing semicolon in previous commit
2017-02-13 23:46:25 +01:00
Brett-Mitchell
6921e11805
Fix for issue #7766
...
Add initialization for OS_OSX.mouse_mode in OS_OSX::OS_OSX(). mouse_mode now defaults to OS::MOUSE_MODE_VISIBLE.
2017-02-13 12:55:26 -05:00