lawnjelly
b330766c30
Fix overflow condition with QueryPerformanceCounter
...
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
)
2020-06-11 09:40:04 +02:00
Rémi Verschelde
7bf9787921
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.
(cherry picked from commit cd4e46ee65
)
2020-06-10 15:30:52 +02:00
Fabio Alessandrelli
8b321354d8
Swtich HTML5 key detection from keyCode to code.
...
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 )
2020-06-05 12:49:50 +02:00
Marcus Brummer
a6e9001579
Check if the specified Android release keystore exists
...
(cherry picked from commit 21263a65a9
)
2020-06-05 12:45:46 +02:00
Fredia Huya-Kouadio
d1e4cede90
Add support for focus awareness
2020-06-04 15:51:51 -07:00
PouleyKetchoupp
aa935c262a
Fix inconsistent error messages with Android custom export templates
...
(cherry picked from commit be22a1f9bc
)
2020-06-04 12:16:39 +02:00
Marcel Admiraal
eef442f32d
Update Windows GUID to SDL uid conversion.
...
(cherry picked from commit a833db80d9
)
2020-06-04 12:09:40 +02:00
Marcel Admiraal
5dfd4fc84d
Update OSX GUID to SDL uid conversion.
...
Co-authored-by: John Wakley <johncwakley@users.noreply.github.com>
(cherry picked from commit d04cbbd76b
)
2020-06-04 12:09:40 +02:00
Marcel Admiraal
91590b0cf0
Add dinput nullptr checks.
...
(cherry picked from commit bc49d34123
)
2020-06-04 12:09:39 +02:00
Marcel Admiraal
6c9c6885a2
Do not probe joypads if DirectInput cannot be initialized.
...
(cherry picked from commit 97a529b1d8
)
2020-06-04 12:09:39 +02:00
Hugo Locurcio
d814352d92
Tweak the DirectInput initialization failure message
...
This closes #36662 .
(cherry picked from commit fe09b4d2b3
)
2020-06-04 12:09:39 +02:00
bruvzg
1642c4163d
Ignore invalid tablet driver name, when non are available.
...
(cherry picked from commit ef1a305e50
)
2020-06-04 12:09:39 +02:00
Fredia Huya-Kouadio
bea913a874
Stop ignoring hidden files and directories in the `assets` directory
...
(cherry picked from commit bf76d2afcf
)
2020-06-04 12:09:39 +02:00
Marcus Brummer
b6c536317b
Perform a clean Gradle build if android plugins changed
...
Fixes #38986
(cherry picked from commit abd66c1bb0
)
2020-06-04 11:17:11 +02:00
bruvzg
c994eb1daf
[3.2] Fix macOS global menu removal and preserve order.
2020-06-02 16:37:19 +03:00
volzhs
c86ddd6b61
Add missing consumePurchase plugin method for GodotPayment
2020-05-28 11:51:14 +09:00
Rémi Verschelde
f03bc21e09
Merge pull request #39103 from m4gr3d/enable_legacy_external_storage
...
Enable legacy external storage for Android 10
2020-05-27 22:57:24 +02:00
Fredia Huya-Kouadio
2e7e3dcfe4
Enable legacy external storage for Android 10
2020-05-27 13:34:40 -07:00
Fredia Huya-Kouadio
0181e89e43
Validate that `Use Custom Build` is enabled when `Plugins` are selected
...
Remove `GodotPayment` from the default build template
2020-05-27 12:04:31 -07:00
Rémi Verschelde
9aeb9ea826
Merge pull request #39081 from m4gr3d/fix_emit_signal_3_2
...
[3.2] Fix parameters passing when emitting signal
2020-05-27 12:53:35 +02:00
Fredia Huya-Kouadio
3c0b26e29c
Fix parameters passing when emitting signal
...
The issue was caused because we were using variables local to the `for` loop block.
Address [feedback](https://github.com/godotengine/godot/pull/39047#issuecomment-634545849 ) by @pouleyKetchoupp regarding the use of arrays on stack with dynamic size.
2020-05-27 03:38:38 -07:00
Fredia Huya-Kouadio
06b7f611f8
Provide the ability for clients of the Godot library to add their own command line arguments
2020-05-27 02:12:54 -07:00
Timo Schwarzer
8373c0792a
Re-implement GodotPayment Android plugin using the Google Play Billing library
2020-05-25 21:09:45 +02:00
PouleyKetchoupp
f4f4b77d23
Use long instead of int for object id in Android java wrapper
...
Using int for 64-bit values might cause issues with objects not found
in ObjectDB when the id is truncated.
(cherry picked from commit 39f59786fa
)
2020-05-25 16:36:34 +02:00
Fabio Alessandrelli
d0613a2243
Fix JS audioContext parameters.
...
Were not passed along correctly.
`latencyHint` is supposed to be in seconds, not milliseconds.
(cherry picked from commit 57bdb4cc35
)
2020-05-25 15:53:18 +02:00
bruvzg
28aabf4f73
[3.2] Block WM_MOUSEMOVE during Windows Ink pen handling.
2020-05-22 14:05:53 +03:00
Rémi Verschelde
b6c551e864
Merge pull request #38875 from bruvzg/tab_drv_sel_32
...
[Windows, 3.2] Add tablet driver selection.
2020-05-20 13:58:26 +02:00
SkyJJ
2197ef0566
Fix Android LineEdit editing bugs
...
(cherry picked from commit cc473b948f
)
2020-05-20 12:07:08 +02:00
bruvzg
e3be0520a1
[Windows] Add quotes only to the command line arguments with special characters.
...
(cherry picked from commit cac399a829
)
2020-05-20 11:39:55 +02:00
Fredia Huya-Kouadio
2c81a82d53
Update the permission string for the Oculus hand tracking to match the latest api update
...
(cherry picked from commit 6e2988f26a
)
2020-05-20 11:37:24 +02:00
bruvzg
9669c437ef
macOS signing improvements: allow signed app exporting as ZIP, sign DMG after exporting.
...
(cherry picked from commit 4bec713b8c
)
2020-05-20 11:33:57 +02:00
bruvzg
71b2abbfa3
[Windows, 3.2] Add tablet driver selection.
2020-05-20 09:36:56 +03:00
Eric Rybicki
c2eea4bde0
Fix certain characters being recognized as special keys in Windows when using the us international layout
...
(cherry picked from commit e460456e60
)
2020-05-19 10:19:52 +02:00
Fabio Alessandrelli
92031098bf
Move mixrate and latency definition to AudioServer
...
Each driver used to define the (same) project settings value, but the
setting names are not driver specific. Ovverriding is still possible via
platform tags.
(cherry picked from commit 90c7102b51
)
2020-05-18 16:40:33 +02:00
Fabio Alessandrelli
6d1ddf7eb1
AudioDriverJavaScript now compute buffer size.
...
Based on mix rate and expected latency.
(cherry picked from commit 245c179bd3
)
2020-05-18 16:40:33 +02:00
Fredia Huya-Kouadio
a71a338c59
Implementation of the Godot Android Plugin configuration file
2020-05-16 23:09:45 -07:00
Rémi Verschelde
d784cb23ec
Merge pull request #37929 from thebestnom/migrate-to-androidX-3.2
...
Android: Migrate deprecated support library to AndroidX [3.2]
2020-05-16 09:03:44 +02:00
Rémi Verschelde
d45b96d2b1
Android: Check for deprecated GodotPaymentV3 module, direct to new plugin
...
Fixes #38581 .
2020-05-15 13:32:30 +02:00
Rémi Verschelde
a9bcd8ba26
Merge pull request #38659 from akien-mga/3.2-cherrypicks
...
Cherry-picks for the 3.2 branch (future 3.2.2) - 5th batch
2020-05-11 12:55:46 +02:00
bruvzg
bd5413e05f
WinTab: Make movement smoother and handle pressure/tilt changes when cursor is not moving [3.2].
2020-05-11 12:32:15 +03:00
Eric M
77ef3bb416
Added mapping for KEY_MENU to VK_APPS (0x5d) so context menu's triggered by the keyboard menu button work
...
(cherry picked from commit 97e77bcd19
)
2020-05-11 11:04:04 +02:00
bruvzg
c4e00f3d57
Remove WinTab error message.
...
(cherry picked from commit ba85db5a79
)
2020-05-11 11:01:13 +02:00
thebestnom
30680a4afe
Android: Migrate deprecated support library to AndroidX
2020-05-10 19:08:27 +03:00
Technohacker
0456311be3
Don't force borderless mode when using per-pixel transparency
2020-05-10 21:05:37 +05:30
Technohacker
9584f24be5
Use DWMEnableBlurBehindWindow instead of WS_EX_LAYERED
...
Affects per-pixel transparency
The current method renders to the screen by copying the GLES output to a
DIB for transparency using the CPU instead of rendering directly to the
window via the GPU. This is slower and also forces the window to be borderless
as WS_EX_LAYERED affects the non-client region as well.
This change uses DWMEnableBlurBehindWindow which allows using the standard
glClearColor() background alpha and is also performed through the GPU,
eliminating CPU bottlenecks
2020-05-10 21:05:37 +05:30
Rémi Verschelde
e637fe9dd3
clang-format: Add JavaImportGroups for Java code
...
(cherry picked from commit 6038325470
)
2020-05-07 13:36:27 +02:00
Fredia Huya-Kouadio
918f5dee23
Address `OS.request_permissions()` bug when non-platform permission(s) is included
...
(cherry picked from commit ef62506e5c
)
2020-05-06 23:29:29 +02:00
bruvzg
78266c09c4
Add support for the WinTab API for pen input. (3.2)
2020-05-05 14:56:02 +03:00
bruvzg
da2ca9e22a
[Linux/Windows] Set pressure to 1.0f when primary button is pressed and device is not pressure sensitive.
...
(cherry picked from commit 0128947894
)
2020-05-05 13:41:29 +02:00
Marcel Admiraal
a286edb821
Fix X11 pressure and tilt values.
...
(cherry picked from commit a2ad0878ed
)
2020-05-05 13:41:29 +02:00