Commit Graph

852 Commits

Author SHA1 Message Date
Josh Tynjala
dd79e5852a LZMA: fix is check missing parentheses 2024-09-10 11:10:34 -07:00
Joseph Cloutier
f917cb0133 Merge branch 'develop' into 8.3.0-Dev 2024-09-02 17:14:31 -04:00
player-03
169e737486 Remove unnecessary operations in Promise.
We're allocating memory we don't use and calling functions that it would make more sense to inline.
2024-09-02 15:58:21 -04:00
player-03
96c5c1c121 Simplify ThreadPool.cancelJob().
Offering four options makes the underlying code more complicated for minimal benefit.
2024-08-24 16:19:46 -04:00
Chris Speciale
0b936846d9 AudioBuffer: docs
Missing docs.
2024-08-22 17:40:58 -04:00
Chris Speciale
4f4f5df7d8 AudioSource: Docs
We need more docs!
2024-08-22 17:30:50 -04:00
Chris Speciale
5c8538efcb BackgroundWorker: More docs
Forgot the properties.
2024-08-22 17:22:39 -04:00
Chris Speciale
2907e42431 BackgroundWorker:Docs
Originally had docs for this but we nixed it for a while so they never got added.
2024-08-22 17:19:38 -04:00
Joseph Cloutier
d3a39b560d One more documentation pass.
Hopefully my last before 8.2.0.
2024-08-22 01:44:39 -04:00
Joseph Cloutier
a774bac183 Remove canceled and completed from ThreadPool.
These were added for drop-in compatibility with `BackgroundWorker`, but we might not need that level of compatibility. We can discuss adding these back later if there's demand.
2024-08-18 21:44:47 -04:00
Joseph Cloutier
b7dd45586c Haxe expects documentation above metadata. 2024-08-18 21:42:44 -04:00
Patrick Gutlich
40764acbf3 set correct paths for ndll for linxuarm and linuxarm64 (raspberrypi)
and remove conflicting legacy includepaths in build.xml
2024-08-18 17:12:47 +02:00
Joseph Cloutier
b3e44ba03d Run formatter. 2024-08-17 23:47:46 -04:00
Joseph Cloutier
9b7c7914bf Update ThreadPool documentation. 2024-08-17 23:46:26 -04:00
ACrazyTown
ed05aa2674 Fix getContextsDevice on Hashlink 2024-08-16 14:14:17 -07:00
Joseph Cloutier
6873ae1fd4 Future.ready() only works when threads are available. 2024-08-15 16:44:52 -04:00
Joseph Cloutier
2866d099a2 Remove external link.
While I put a lot of effort into that guide, we're changing several things suddenly, and I don't have time to make sure it's up to date.
2024-08-15 16:31:48 -04:00
Joseph Cloutier
52931a8dc7 Revert to Future's behavior from 8.1.3.
As with `BackgroundWorker`, we're postponing major changes to give us more time to consider.
2024-08-15 16:16:17 -04:00
Joseph Cloutier
d0cef427bc Revert BackgroundWorker to its 8.1.3 version.
It looks like we'll want to take `BackgroundWorker` in a different direction, so for the moment it's safest not to change anything about it. That way, there's only one historical version to maintain backwards compatibility with.
2024-08-15 15:39:07 -04:00
Joseph Cloutier
8f631fe3ad Optimize ThreadPool slightly.
`__activeThreads` and `__idleThreads` only need to be allocated for multi-threaded pools. Plus, there's no benefit to using a `List` here; we only add to and remove from the end.

And finally, checking `event.job == null` instead of `isOfType()` is faster and avoids an issue in HTML5. Sadly it is less safe, so we might need to revisit it eventually.
2024-08-11 21:40:00 -04:00
Joseph Cloutier
0b83b7d45e Fix typo. 2024-08-11 16:11:19 -04:00
Joseph Cloutier
bf4711a01d Avoid sending JobData back to the main thread.
The main thread can easily look these up by ID, and in HTML5, sending the full `JobData` can cause errors.
2024-08-09 16:43:51 -04:00
Joseph Cloutier
dae33c0c1a Bug fix: new job could be ignored if it arrived with precise timing. 2024-08-09 15:11:50 -04:00
Josh Tynjala
9cc7a8fa7d HTML5Window: allow both onMouseMove and onMouseUp to be dispatched outside the bounds of the parent element, if the mouse button is down
Previously, only onMouseUp was allowed, but we want onMouseMove to work too so that dragging objects with the mouse won't look broken.

I changed the implementation to use a boolean flag to indicate that the browser window listener should return early, instead of calling event.stopPropagation(), because this allows other JS code in the page to listen to these mouse events, if desired. Our internal implementation shouldn't do something that might break other events.
2024-07-31 14:53:10 -07:00
Josh Tynjala
b866632a6f tools: allow -x86_64 and -x86_32 as command line flags to select those architectures instead of defaults (closes #1819)
Still supports -32 and -64, though, for backwards compatibility. We could consider removing those in Lime 9.
2024-07-19 14:46:47 -07:00
Josh Tynjala
8f3ea8d271 Merge branch 'develop' into 8.2.0-Dev 2024-07-08 14:31:23 -07:00
tobil4sk
0ef949f865 Merge pull request #1472 from nixbody/cffi-unicode-fixes
UNICODE fixes (clipboard, window title, file dialogs, paths, font glyphs, ...)
2024-07-07 23:10:43 +01:00
player-03
b99eff85c1 Merge pull request #1794 from player-03/environment-variable-conflicts
Ignore system environment variables with the same name as common targets.
2024-07-02 15:56:31 -04:00
Josh Tynjala
e257b7ebe4 Merge branch 'develop' into 8.2.0-Dev 2024-07-01 08:53:48 -07:00
Joseph Cloutier
593f4fa52c Rename web-workerallow-web-workers for clarity.
The former was unclear about how the dependency would relate to web workers. Would it only be available to workers? Would it automatically spin up a worker?

`allow-web-workers` isn't 100% perfect, but it implies the correct answers to the questions above (no and no) and isn't too long.
2024-06-15 22:13:05 -04:00
Josh Tynjala
44852467f4 AndroidHelper: report errors for missing adb and emulator executables when they are used only, instead of immediately in AndroidHelper.initialize()
It turns out that adb isn't included GitHub Actions unless you install it specifically. However, you can technically build Android apps with Lime without adb, so we shouldn't report the error in initialize(). Most important is install(), where both adb and emulator are commonly used.

Followup to eed47e7132
2024-06-14 10:55:49 -07:00
Josh Tynjala
eed47e7132 AndroidHelper: Fix Android -emulator flag by preferring newer executable paths from Android SDK
The 'SDK Tools' package located in /tools/ is officially considered 'obsolete', so we should not use it by default.

We now prefer /platform-tools/adb over /tools/adb

We now prefer /emulator/emulator over /tools/emulator

If the newer replacement executables are missing, we still try to fall back to /tools/. This should allow older Android SDKs to continue to work properly.

Additionally, if neither version can be found, we report an error. For adb, we always need it, so we always report an error if it is missing. For emulator, we report an error only if we're actually going to use an emulator.

/tools/android doesn't have a newer alternative. We were running 'android list avds' to get a list of all available AVDs. However, both '/emulator/emulator -list-avds' and '/tools/emulator -list-avds' provide a simple list of AVDs separated by line breaks. So it seems that we never actually needed /tools/android. Plus, it outputs a better format that doesn't require searching every line of the output string for 'Name:', and we can just split and trim. So I completely removed /tools/android and we now use either '/emulator/emulator -list-avds' or '/tools/emulator -list-avds'.
2024-06-14 10:04:11 -07:00
Joseph Cloutier
fc393eabd1 Restore "web-worker" attribute.
This was mistakenly removed while merging.
2024-06-10 13:28:23 -04:00
player-03
7a25f656d0 Ignore system environment variables with the same name as common targets.
If you have a `<section if="cpp">` tag in your project.xml, you don't want it to be active just because a system environment variable happens to be named "cpp". You only want it active if actually targeting C++.
2024-06-04 23:11:55 -04:00
player-03
6a23b6eee3 Merge pull request #1790 from player-03/stale_assets
Automatically delete stale assets and dependency files.
2024-06-04 13:42:31 -04:00
player-03
f23ecb6c3f Add preserveDrawingBuffer context attribute. 2024-05-31 21:43:37 -04:00
player-03
5bcf8fcf8e Merge pull request #1770 from barisyild/make-preserveDrawingBuffer-configurable
make preserveDrawingBuffer configurable
2024-05-31 17:54:20 -04:00
tobil4sk
a74127b866 Fix usage of missing variable in CFFI.hx
See a850b12fa0
2024-05-31 22:46:54 +01:00
tobil4sk
1ebce5faa3 Load ndlls from correct path on Apple Silicon Mac 2024-05-31 14:40:23 -07:00
player-03
6c8d742cc3 Merge pull request #1792 from player-03/Matrix3
Make `Matrix3` use column-major order.
2024-05-31 13:26:55 -04:00
Josh Tynjala
81615dc245 CairoPattern: use new CairoMatrix3 for get/set matrix (references #1791) (references #1778) (references #1792)
Fixes gradient drawing in OpenFL
2024-05-31 10:18:03 -07:00
Josh Tynjala
e88b3d21c1 ProjectXMLParser: <echo/> and <log/> (except error) are skipped if the command is display (references openfl/lime-vscode-extension#88) 2024-05-31 08:34:48 -07:00
Joshua Granick
d0678156dd Add initial support for LZMA decompression on HTML5 target 2024-05-31 08:09:28 -07:00
Josh Tynjala
0cf13bf3dd Clipboard: fix text always getting cleared to null in __update() when targeting html5 2024-05-30 16:02:54 -07:00
Joseph Cloutier
084324a7ed Consistently refer to Matrix3 values in column-major order. 2024-05-30 18:42:08 -04:00
Joseph Cloutier
93ad84faeb Remove unused code.
These appear to have been copied from elsewhere and never used.
2024-05-30 18:41:16 -04:00
Joseph Cloutier
9dc809d3e4 Validate array length when converting to Matrix3. 2024-05-30 14:00:19 -04:00
player-03
c0ca857fa6 Merge pull request #1791 from player-03/CairoMatrix3
Create a placeholder object to send `Matrix3`s to C++ code.
2024-05-30 12:20:25 -04:00
player-03
57da678f67 Limit total time spent on green threads. (#1774)
Every single-threaded `ThreadPool` takes up a certain fraction of the app's time per frame. Without any coordination, they could take up more than 100% of the allotted time, causing the app to slow down. By using static variables, we can make them work together to limit the total time spent per frame.
2024-05-29 21:15:20 -04:00
Joseph Cloutier
224c0a0e93 Delete stale dependencies in addition to stale assets. 2024-05-29 20:55:09 -04:00