Commit Graph

5101 Commits

Author SHA1 Message Date
Joseph Cloutier
a9580a9486 Clarify Future.
The `Future` constructor creates a new `Future` instance, and in other
news, this floor is made out of floor.

Since there's now so much more to read, we should cut out the blatantly
obvious parts.
2022-02-11 15:46:54 -05:00
Joseph Cloutier
1ebff2e795 Remove redundancy. 2022-02-11 15:43:44 -05:00
Josh Tynjala
925e2b67e7 Image: compatibility fix to allow use of genes library to compile as ES modules 2022-02-11 10:32:47 -08:00
Joseph Cloutier
cc2611048b Correctly calculate when to close threads.
And add some documentation so I won't make this mistake again.
2022-02-09 15:45:53 -05:00
Joseph Cloutier
f3c35a2fd0 Improve ThreadPool job chaining. 2022-02-09 15:28:13 -05:00
Joseph Cloutier
c6f355941b Catch errors in threads.
Without this, if an error happened during a `ThreadPool` job, that
thread would exit without updating `currentThreads`.

This can almost replace `FutureWork`'s error handling, but not quite.
2022-02-09 12:12:40 -05:00
Apprentice-Alchemist
b15dcb94c1 Upgrade to android API level 21. 2022-02-03 17:23:43 +01:00
Joseph Cloutier
f700b2de55 Make FutureWork use new ThreadPool features. 2022-02-02 15:05:06 -05:00
Joseph Cloutier
6560596d0d Update documentation. 2022-02-02 15:04:18 -05:00
Joseph Cloutier
689b78cec2 Implement workLoad. 2022-02-01 19:32:08 -05:00
Joseph Cloutier
fabb7e085a Link to my threading tutorial. 2022-01-31 19:59:26 -05:00
Joseph Cloutier
71305a7bce Use a loop to process events.
Otherwise, `BackgroundWorker` would be limited to one event per frame.
2022-01-31 12:39:19 -05:00
Joseph Cloutier
e47d5f4280 Fix errors in ThreadPool's single-threaded mode. 2022-01-31 12:29:13 -05:00
Joseph Cloutier
3a4ec6daa6 Improve BackgroundWorker's documentation. 2022-01-29 19:20:30 -05:00
Joseph Cloutier
223ab9bcd0 Make run() prefer local variables.
The benefit being that local variables can't be deleted by outside code.

The outside variables must still be set so `__update()` can access them.
2022-01-29 19:20:14 -05:00
Joseph Cloutier
3015a4e72e Enforce thread safety.
Modifying `onUpdate` is not thread safe, and must only be done on the
main thread. This is more important - and more enforceable - than most
of the "only do this on XYZ thread" comments.
2022-01-29 19:19:28 -05:00
Joseph Cloutier
deaa0713d8 Make ThreadPool extend BackgroundWorker.
Plus, add documentation.
2022-01-29 10:41:00 -05:00
Joseph Cloutier
8662d0a1c7 Implement SINGLE_THREADED mode.
Also addresses haxelime/lime#1502.
2022-01-28 17:13:51 -05:00
player-03
cda9d3a4bb Add missing feature warning to FlashAudioSource. 2022-01-26 12:20:10 -05:00
player-03
878982e3e2 Never skip setCurrentTime(). 2022-01-26 12:14:20 -05:00
Joshua Granick
45955412eb Resolve KeyCode data type issue on Neko 2022-01-13 15:11:25 -08:00
player-03
07e65257c4 Add missing #if tag. 2022-01-10 07:46:04 -05:00
player-03
8e46831823 Remove redundant code. 2022-01-08 12:01:23 -05:00
player-03
c328d0c85c Make sure NativeAudioSource.handle is non-null.
Using `getGain()` and `setGain()` as a template. Like gain, you won't be able to set pitch before calling `init()`.
2022-01-07 20:44:28 -05:00
player-03
f46ed3dc7e Standardize setters in NativeAudioSource.
These setters now: (1) start by checking if anything changed, (2) use the new value in calculations, and (3) perform the assignment only at the end.
2022-01-07 19:02:43 -05:00
player-03
809ba2fd0c Add pitch functions to FlashAudioSource
Just placeholders, for now.
2021-12-29 18:36:20 -05:00
player-03
f65eedf28e Calculate time remaining based on pitch 2021-12-29 18:33:07 -05:00
player-03
2f35e0b24c Merge pull request #1498 from player-03/loadAudioBuffer
Fix error when loading embedded audio.
2021-12-20 10:05:16 -05:00
player-03
8ab755d359 Merge pull request #1497 from player-03/gitignore-obj
Ignore project/obj in extensions.
2021-12-20 10:03:45 -05:00
Cameron Taylor
cd2ab1600e following structure of other stuff 2021-12-18 18:05:32 -05:00
Cameron Taylor
b3dd46ee68 HTML5 backend pitch 2021-12-18 17:51:33 -05:00
Cameron Taylor
2ffb6eef3f initial pitch stuff 2021-12-18 17:42:25 -05:00
Joseph Cloutier
455dd2017c If two icons are equivalent, prefer the second. 2021-12-14 13:33:54 -05:00
Joseph Cloutier
e848002f93 Implement Icon priorities.
With this, a library can set a "default" icon, to be used only if the
user doesn't provide a better one.

Additionally, this treats SVGs as "near" matches rather than exact,
meaning that a perfect-size PNG will take precedence over an SVG. Why
would the PNG even exist if you didn't want to use it in that one case?

And finally, I took the liberty of cleaning up `findNearestMatch()`. It
seemed unnecessarily confusing for what it did.
2021-12-14 13:13:55 -05:00
Josh Tynjala
7bfaa441f2 Github Actions: better .gitignore exclusion 2021-12-09 13:26:36 -08:00
Josh Tynjala
67543f7417 Github Actions: fix typo 2021-12-09 13:09:56 -08:00
Josh Tynjala
9d6d398871 Github Actions: skip .gitignore file when uploading ndll artifacts 2021-12-09 13:08:48 -08:00
Josh Tynjala
5df1faf3c4 Github Actions: no Discord notify on pull request or fork 2021-12-09 12:46:47 -08:00
Josh Tynjala
0ecf27d2d6 disable_preloader_assets haxedef
When the project contains no assets, excludes asset-related classes for big file size savings
2021-11-18 10:46:07 -08:00
Josh Tynjala
e3d49867fb AssetHelper: don't bother creating the default library if there are no assets 2021-11-17 15:13:02 -08:00
Joshua Granick
568eaefa83 Fix OpenAL build with newer GCC on Linux 2021-11-13 15:54:00 -08:00
Josh Tynjala
bedeed591b Added new -air-simulator option for lime test air -ios (or lime test air -android)
This launches the AIR simulator (ADL), but it passes additional options to tell it to simulate a mobile device.
2021-11-12 14:58:22 -08:00
Joseph Cloutier
9f6da5e5c5 Fix error when loading embedded audio.
`loadAudioBuffer` skipped actually creating an `AudioBuffer`. Oops!
Fortunately, `getAudioBuffer` works fine, so I copied that code.
2021-11-09 15:35:21 -05:00
player-03
dc637ca98c Ignore project/obj in extensions.
No one ever wants to include the intermediate build files. However, some choose to include the outputs, so I left them as comments.
2021-11-07 12:33:47 -05:00
Joseph Cloutier
66d906395a Remove lime-samples dependency in createProject.
As pointed out in issue #976, `lime create project XYZ` doesn't rely on any project but Lime itself, and shouldn't try to load lime-samples.
2021-11-01 10:13:50 -07:00
Justin Espedal
ed3686661a Fix GC issues on iOS 15 with iPhone 12
https://github.com/HaxeFoundation/hxcpp/issues/969#issuecomment-941127280
2021-11-01 10:10:12 -07:00
Joshua Granick
2750cf5011 Allow unset values for library.preload/.generate 2021-10-31 15:44:57 -07:00
player-03
290f0bd588 Remove <uses-sdk /> from manifest.
The Android Gradle plugin prefers to retrieve this value from build.gradle, and some versions of the plugin actively complain about the tag being there.

Closes #1435
2021-10-28 03:14:05 -04:00
player-03
33cd3b15fd Set extension-api's defaultConfig.
The Android Gradle plugin prefers to use these values instead of the values in AndroidManifest.xml, and it will always ignore the manifest's `minSdkVersion` even without `defaultConfig.minSdkVersion`.
2021-10-27 20:38:26 -04:00
player-03
53c22391e2 Update extension-api's min/target sdk versions. 2021-10-27 15:16:20 -04:00