Commit Graph

5145 Commits

Author SHA1 Message Date
Mihai Alexandru
8648b05991 Update AndroidPlatform.hx 2024-01-16 15:15:06 +02:00
Josh Tynjala
a48898849e actions: use github.workspace instead of platform specific environment variables syntax 2024-01-10 10:11:11 -08:00
Josh Tynjala
e6205bf3aa PlatformSetup: openfl alias setup on Linux was missing try/catch, but lime alias setup and other platforms had it 2023-12-08 09:46:21 -08:00
andrew-git
c40ec312fc Joystick: add try/catch around navigator.getGamepads() because it might throw a JS SecurityError if we don't have permission to call it (#1728)
Fixes the following exception when we don't have permissions:

> Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy.

By catching the exception, it should now behave the same as older browsers, where navigator.getGamepads() doesn't exist at all.

In the future, it might make sense to set a flag if navigator.getGamepads() throws, and skip calling it more than once. However, we may want to listen for some kind of browser event that indicates that permission was granted later, and clear the flag when appropriate. Perhaps the gamepadconnected event?

---------

Co-authored-by: Josh Tynjala <joshtynjala@bowlerhat.dev>
2023-12-01 11:09:34 -08:00
Josh Tynjala
d68bce1a87 actions: svg.n needs openfl 2023-11-27 10:14:36 -08:00
Josh Tynjala
b330249a88 actions: build svg.n 2023-11-27 09:20:40 -08:00
Josh Tynjala
d05f10b15f prepare for Lime 8.1.1 8.1.1 2023-11-08 09:26:20 -08:00
player-03
a6aad10e92 Merge pull request #1721 from player-03/escaped-characters
Only escape backslashes in Android SDK/NDK paths. The others don't need to be escaped in .properties files, and shouldn't be escaped in .gradle files.
2023-10-25 19:08:19 -04:00
Joseph Cloutier
d931869dcf Only escape backslashes in Android paths.
Neither .properties nor .gradle files require anything else to be escaped. And at least in .gradle files, escaping anything else is incorrect.
2023-10-24 01:13:32 -04:00
player-03
1a3a9bd5c5 Avoid integer overflow for long sounds.
Multiplying `dataLength * 8` produces a high number, which in the case of very long audio files can exceed the integer limit. Multiplying by 8.0 coerces to float, allowing much higher values.

An alternate solution is to divide first and multiply by 8 second, thus keeping the number from getting too large at any point. However, the purpose of the 8 is to convert `dataLength` from bytes to bits, so it's clearer if those two are close together.
2023-10-19 22:57:43 -04:00
Josh Tynjala
51273fb258 FUNDING: add joshtynjala 2023-10-18 10:24:56 -07:00
Josh Tynjala
6d36d6f874 CHANGELOG and releasenote 8.1.0 2023-10-16 11:01:46 -07:00
Josh Tynjala
2b50fe5273 actions: move some jobs from macos to ubuntu 2023-09-29 11:13:05 -07:00
Josh Tynjala
667567f7bd WebAudioContext: add missing resume() field for non-html5 platforms to fix doc gen 2023-09-29 09:31:08 -07:00
Josh Tynjala
27c528ffbb air externs: don't use openfl APIs in lime 2023-09-12 08:47:23 -07:00
Josh Tynjala
7979a99c7b fill in more of sys file externs for AIR 2023-09-12 08:02:40 -07:00
Josh Tynjala
0b87e1aa63 fix invalid air extern 2023-09-12 07:46:08 -07:00
player-03
d4a04c80df Merge pull request #1709 from UncertainProd/remove-hello
Removed unused field `hello` in Float32Array.hx
2023-08-19 12:39:16 -04:00
UncertainProd
843e7fc873 Removed unused field hello in Float32Array.hx 2023-08-19 22:02:19 +05:30
player-03
b284e56d4e Clarify changelog and remove reference to private feature.
The click count feature is only meant to be used internally until 9.0.0, so shouldn't be advertised.
2023-08-18 17:28:07 -04:00
player-03
3c245b5287 Make replaceVariable() account for properties.
Some useful information is only available as a property, not a field.
2023-08-18 16:20:01 -04:00
Josh Tynjala
2a570037a2 CHANGELOG for 8.1.0-Dev 2023-08-15 08:00:34 -07:00
Josh Tynjala
987e3dd425 Merge branch 'develop' into 8.1.0-Dev 2023-08-14 15:53:18 -07:00
Josh Tynjala
39c77cfe46 CHANGELOG for develop branch before merge 2023-08-14 15:53:01 -07:00
Josh Tynjala
42ae523188 AIR externs: Haxe 3 compatibility on :extern :enum abstracts 2023-08-14 13:24:05 -07:00
Josh Tynjala
b6cfc7d812 HTTPRequest: fix missing response data for HTTP status codes (closes #1699)
Backends now return error and response data, but public API has not changed.

This allows OpenFL to expose URLLoader.data on IOErrorEvent.IO_ERROR to match the behavior of Flash
2023-08-11 13:43:16 -07:00
Josh Tynjala
6cff64018a Add -npx flag for lime test electron to run the npx electron command instead of just electron.
This will prompt the user to install electron, if required. Saves a separate `npm install -g electron` command before testing.
2023-07-25 08:43:39 -07:00
player-03
c16f27818d Merge pull request #1695 from Apprentice-Alchemist/patch-1
Fix string conversion in hl_window_alert.
2023-07-04 20:36:31 -04:00
player-03
828864063f Merge pull request #1694 from loudoweb/dev-fix-library-unload
clear cached files on library unload
2023-07-04 20:31:03 -04:00
player-03
8b27623afb Follow formatting conventions. 2023-07-04 20:30:33 -04:00
player-03
914009ddb3 Merge pull request #1680 from player-03/auto_formatting_error
Fix `WebGL2RenderContext` formatting.
2023-07-04 20:23:40 -04:00
player-03
a917b5ea51 Don't check out submodules during docs action.
The docs action only needs to look at Haxe code, so downloading the submodules just wastes 30-50 seconds. That's a lot of time for an action that clocks in at about 2 minutes.
2023-07-04 20:14:39 -04:00
Josh Tynjala
ef37cd9afb AIRHelper: needs .app file extension on macOS if AIR target is bundle 2023-06-29 10:25:38 -07:00
Josh Tynjala
b6ebe15d15 Replace Adobe AIR debug certificate because it expired 2023-06-29 10:23:03 -07:00
Zeta
26247f4f41 Fix string conversion in hl_window_alert. 2023-06-11 13:42:40 +02:00
Josh Tynjala
2cd1dad5ed Merge branch 'develop' into 8.1.0-Dev 2023-06-09 11:12:43 -07:00
Josh Tynjala
01a04c4d48 Clipboard: (windows/mac) fix issue where requesting text from clipboard ignores clipboard contents, if user last modified the clipboard before app startup 2023-06-09 10:06:45 -07:00
Joshua Granick
a46eecc831 Disable try_blocking for now (requires HXCPP 4.3+) 2023-06-07 18:12:01 -07:00
Joshua Granick
06122fe72a Compile fix 2023-06-07 18:11:40 -07:00
player-03
71c1854779 Don't call Map.clear() in Haxe 3. 2023-06-06 21:55:37 -04:00
Josh Tynjala
9e2d431e2b Merge branch 'develop' into 8.1.0-Dev 2023-06-06 12:35:57 -07:00
Josh Tynjala
aebf139dc7 Fix window show/hide on desktop being incorrectly considered the same as app going into and out of the background/suspend on mobile
The app's Timers should still continue when a window is hidden. Especially since an app could have multiple windows, with some being shown and some being hidden. If only one were hidden, the other shown windows would clearly behave in a broken manner because the one hidden window would cause all app timers, even those associated with other windows, to be paused.

Introduces new WINDOW_SHOW AND WINDOW_HIDE events from C++ to Haxe, and new onShow and onHide events on Haxe Window.

Followup to 0918ee2381
2023-06-06 10:56:06 -07:00
Josh Tynjala
f6e61b1bac actions: matrix for AIR 2023-06-06 10:19:39 -07:00
Josh Tynjala
c8b35c2a09 actions: lime config AIR_SDK 2023-06-06 10:19:05 -07:00
Ludovic Bas
76c76652cc I don't know why the unload method was empty but now it clears all cached files when calling Assets.unloadLibrary(""); 2023-06-06 15:51:01 +02:00
Josh Tynjala
de7bf3e5ed actions: AIR samples 2023-06-05 16:03:19 -07:00
Josh Tynjala
9ca9c2e32c Better Haxe 4.3 extern enum abstract
Previous attempt tried to use @:extern and @:enum for Haxe 3, but enum is fine for both, which is actually what we were using before. Keep @:extern for Haxe 3, but use enum for both
2023-06-05 15:56:26 -07:00
Josh Tynjala
f053205b7e Merge branch 'develop' into 8.1.0-Dev 2023-06-05 14:29:12 -07:00
Josh Tynjala
0918ee2381 SDLApplication: fix inconsistent setting of inBackground flag when dispatching WINDOW_DEACTIVATE and WINDOW_ACTIVATE (closes openfl/openfl#2645)
On SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERFOREGROUND, inBackground was being toggled, but it was not toggled on SDL_WINDOWEVENT_SHOWN and SDL_WINDOWEVENT_HIDDEN. However, both pairs were dispatching WINDOW_DEACTIVATE and WINDOW_ACTIVATE from C++ to Haxe. When inBackground wasn't toggled, the UPDATE ApplicationEvent continued being dispatched from the C++, but the Haxe assumed that it wouldn't be. This meant that timers were still updated after WINDOW_DEACTIVATE for SDL_WINDOWEVENT_HIDDEN, but then they were still "advanced" as if paused on WINDOW_ACTIVATE for SDL_WINDOWEVENT_SHOWN. The next update time would be some time in the future, roughly equal to how long the Haxe thought the timers were paused. This could make it seem like the timers completed stopped updating, especially if they should have been paused for a long time. They would eventually continue, but they should have paused on WINDOW_DEACTIVATE and continued immediately on WINDOW_ACTIVATE.
2023-06-05 14:22:19 -07:00
Josh Tynjala
5a87d77897 Merge branch 'develop' into 8.1.0-Dev 2023-06-05 10:29:26 -07:00