Haxe will usually prevent `EventMacro.build()` from running if there are the wrong number of type params. Therefore the "wrong number" message would usually only appear when there were the right number of params (one) and the type was wrong.
Two reasons:
1. This is how it always worked in practice. The old special case actually did nothing due to an oversight.
2. Per the principle of least astonishment, Lime should avoid messing with the user's assets. If they wanted it to be a template, they would have specified `type="template"`.
We might as well do it for 8.3.0, so that it and 9.3.x patches can hopefully target the same version.
This means that our CI now runs on ARM64 instead of x86_64 for macOS.
To build HashLink, we need to install x86_64 Homebrew to get the necessary dependencies.
We also need a new enough krdlab/setup-haxe that supports ARM64 macOS, and can run older Haxe versions. This is currently commit 8f35d1215b93e940a76f9470e22e8a5ba6149598, but hopefully, setup-haxe's v2 tag will be updated in the future.
As far as I can tell, SDL_QuitSubSystem is not required, and SDL_Quit should automatically quit each subsystem. However, this stops the crash, so maybe there's some kind of race condition that this avoids.
Hxcpp needs the PLATFORM define for older ndks that require the gcc toolchain. We initially removed it since Lime potentially was going to have a minimum requirement of android sdk 28 due to openal soft version 1.20.1, however, this was solved by upgrading to 1.21.1 which presented no further conflicts with sdk 21.
To simply things, we just provide both defines for now.
Co-authored-by: player-03 <player3.14@gmail.com>
They were using float values, but they should have been int values instead.
The numeric type conversion was causing some kind of data loss that resulted in wrong values being returned in some cases. In particular, arrow keys.
* Add SDL rumble
* Fix rumble
* whitespace fixins real (#2)
* whitespacing real.. please!
* nativecffi rumble thing fix lol
* Remove trailing whitespace.
* Use SDL's argument names and order.
* Standardize formatting.
* Make `SDLGamepad` fully static again, for simplicity.
Also, consistently use `find()` instead of array access, to avoid accidentally creating entries.
Also also, consistently use guard clauses instead of indenting.
* Make another guard clause.
* Update CFFI function signature.
* Use `clamp()` instead of `if` statements.
* Include required header for `std::clamp()`.
* Revert "Use `clamp()` instead of `if` statements."
`std::clamp()` was not available until C++17, and we'd like to continue supporting older versions.
This reverts commit 715a270f79.
* Revert "Include required header for `std::clamp()`."
This reverts commit f47aebf640.
* Tidy up.
* Document `Gamepad.rumble()`'s arguments.
* Don't limit rumble duration.
SDL apparently supports the full Uint32 range, so there's no reason for Lime to restrict it.
* Fix whitespace.
* Add rumble support in HTML5 (experimental).
---------
Co-authored-by: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Co-authored-by: player-03 <player3.14@gmail.com>
The implementation was copy-pasted, so it makes more sense to have only a single copy. `HTML5Platform` added a comment about possible future changes, so I kept that. Future changes will still be possible by overriding the function.
The old code appeared to be trying to do this, but it didn't work. When it found appinfo.json, it would call `copyAsset()` with an extra `context` argument, which is what you do for templates. However, `copyAsset()` only processes templates when `type == TEMPLATE`, otherwise it ignores the extra argument and processes it as a normal asset.
Having eight separate implementations made it harder to maintain. While an asset embedding bug got fixed on desktop targets, it got overlooked on others. This lead to assets being included twice on those other targets: once embedded, and once normally. (#1898) Now, that behavior is controlled from one place, and the bug is fixed for eight targets at once.
This also standardizes the case of `asset.embed == true && asset.type == TEMPLATE`. Previously, some targets would prioritze `embed` over `type`, embedding the template into the app without even processing it as a template. Now, it will always prioritize `type`, processing templates as templates and never trying to embed them.
Three targets are left out since they have more complex asset embedding behavior. I haven't checked if the bug is present on any of those.
* allow setting gradle jvmargs in project.xml
* Make gradle.properties fully configurable from project.xml.
---------
Co-authored-by: Joseph Cloutier <player3.14@gmail.com>
Documented semver-based versioning flow
- Explained usage of patch (develop), minor (x.x.x-dev), and major (x.0.0-dev) branches
- Added guidance on where to submit bug fixes, new features, and breaking changes
- Improves contributor clarity and aligns with current project workflow (e.g., Lime 8.2.2 -> 8.3.0-dev, 9.0.0-dev)
This helps reduce confusion about where to submit changes and ensures consistency across releases.