Commit Graph

1438 Commits

Author SHA1 Message Date
Chris Speciale
d5455f0e8f Update Build.xml 2025-11-13 15:22:11 -05:00
Chris Speciale
ee7ac0f5d4 Add sdl_sound-files config 2025-11-13 15:18:32 -05:00
Chris Speciale
ca58342a9e Include the sdl_sound submodule
Allows us to use sdl_sound to decode extended audio formats
2025-11-13 15:16:35 -05:00
Tobiasz Laskowski
4bb0380b39 Update mojoal to fix audio bug 2025-10-28 14:44:59 -07:00
ACrazyTown
3643bf0830 OpenALBindings: fix crash on HL when passing NULL device 2025-10-14 08:35:56 -07:00
Josh Tynjala
9bea6169bf SDLApplication: fix crash in SDL_Quit on Windows by calling SDL_QuitSubSystem first with the same flags passed to SDL_Init (closes #1934)
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.
2025-10-03 14:54:29 -07:00
Josh Tynjala
fc58879a1a Merge branch 'develop' into 8.3.0-Dev 2025-09-18 09:42:54 -07:00
Josh Tynjala
05591ebdb0 NativeCFFI: fix key_code_to_scan_code and key_code_from_scan_code
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.
2025-09-12 15:59:46 -07:00
Joseph Cloutier
58e15337db Fix hl_gamepad_rumble function signature. 2025-09-01 16:59:33 -04:00
player-03
cb41de5300 Add seperate defines for OpenAL Soft and MojoAL (#1912) 2025-09-01 01:49:41 -04:00
Joseph Cloutier
57355ba8cf Merge branch 'develop' into 8.3.0-Dev 2025-09-01 00:42:57 -04:00
Regan Green
c8beb396f6 Implement controller rumble support in Gamepad (#1739)
* 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>
2025-09-01 00:29:58 -04:00
player-03
06c4934f45 Fix old android ndk error not showing (#1926) 2025-09-01 00:23:29 -04:00
player-03
2bdd41ef57 Memory leak fix in curl bindings (#1856) 2025-08-31 23:20:16 -04:00
player-03
0b1ab0a245 Update tinyfiledialogs to fix compatibility with zenity. (#1964) 2025-08-31 15:07:19 -04:00
Josh Tynjala
9b6f81d006 Font: add strikethroughPosition and strikethroughThickness
Similar to underlinePosition and underlineThickness
2025-08-25 14:11:47 -07:00
Apprentice-Alchemist
8d81a0fc8e HashLink 1.14 (closes #1827) (closes #1801) (closes #1967)
Co-Authored-By: Josh Tynjala <joshtynjala@users.noreply.github.com>
2025-08-22 15:43:26 -07:00
Josh Tynjala
54516f8693 Merge branch 'develop' into 8.3.0-Dev 2025-08-20 07:33:22 -07:00
unknown
75f994afb7 Add seperate defines for OpenAL Soft and MojoAL 2025-08-19 23:41:23 +02:00
Tobiasz Laskowski
d1369f1aaa Fix merge error from 985e0994d9 2025-08-18 18:40:13 +01:00
Tobiasz Laskowski
985e0994d9 Fix unicode system path conversions on linux
For non windows platforms, we previously just passed char* into wstring,
which didn't perform the necessary conversion into utf32 which is
expected when hxcpp converts a wchar string to a hxstring on platforms
where wchar has 4 bytes.
2025-08-18 09:32:28 -07:00
Tobiasz Laskowski
c81d70c303 Fix NULL handling in GetDirectory(DESKTOP)
If HOME is NULL, we cannot return here immediately, since we haven't
called `System::GCExitBlocking()`. This currently causes:
```
Critical Error: Allocating from a GC-free thread
```

This is already handled correctly for `USER` and `DOCUMENTS`, however
`DESKTOP` was missed out in f6e38208d3
2025-08-18 08:41:28 -07:00
Tobiasz Laskowski
cbcb5f029e Fix crash on null returns from sdl path functions
On android SDL_GetBasePath is not implemented and returns NULL, which
means that calling strlen causes a crash:

1f21aae242/src/filesystem/android/SDL_sysfilesystem.c (L35-L40)

According to sdl docs, SDL_GetPrefPath can also return NULL, so we also
need to check for that:
https://wiki.libsdl.org/SDL2/SDL_GetPrefPath#return-value
https://wiki.libsdl.org/SDL2/SDL_GetBasePath#return-value
2025-08-18 08:39:58 -07:00
Tobiasz Laskowski
99e986ce39 Fix typos in mbedtls xml includes 2025-08-15 15:13:38 -07:00
Thomas Cashman
52ad5b1b24 Fix GetDirectory UTF16 encoding issue 2025-08-14 09:43:29 -07:00
Joseph Cloutier
1e47c4d0be Fix tinyfiledialogs compatibility with zenity. 2025-07-24 15:47:19 -04:00
Josh Tynjala
ae5751c230 HashLink 1.13
Tested on macOS, Linux, and Windows. Works better with Haxe 5 than HashLink 1.12 did. This upgrade is easier than 1.14 and presumably 1.15, which we can still do later.
2025-07-09 10:24:20 -07:00
Josh Tynjala
f4d2965426 Merge branch 'develop' into 8.3.0-Dev 2025-06-04 11:36:03 -07:00
Josh Tynjala
bc8f9df60f zlib 1.2.13
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:28:26 -07:00
Josh Tynjala
97466c6360 png 1.6.46
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:28:01 -07:00
Josh Tynjala
241edd9d10 efsw 1.4.1
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:27:24 -07:00
Chris Speciale
236e143a8e [fix] Extract values before locking to avoid deadlock with GC
Attempts to fix reported freezes/crashes related to possible gc contention related to: https://github.com/openfl/lime/issues/1943
2025-04-10 11:20:12 -04:00
Barış Yıldırım
12d3ee5916 curl encoding support added 2025-03-21 10:56:23 -04:00
Chris Speciale
844222e99d Merge branch 'develop' into 8.3.0-Dev 2025-03-14 06:53:14 -04:00
Chris Speciale
6f5bc336f3 Merge branch 'develop' into 8.3.0-Dev 2025-03-14 06:47:14 -04:00
Tobiasz Laskowski
52072d1f21 Apply -std=c++11 to openal-soft build on android
openal-soft assumes that aligned_alloc is available with c++17. Newer
android ndks set c++17 by default, however they do not expose
aligned_alloc without setting min sdk version to 28.

We can avoid this issue by forcing openal to be compiled with c++11.

Also note, we have HXCPP_CPP11 defined, however, hxcpp ignores this for
the android toolchain.  This means we must set it explicitly

See:
f5e0eef34d/common/almalloc.cpp (L15)
2025-03-14 10:04:25 +00:00
Chris Speciale
1dd2acf479 Merge branch 'develop' into 8.3.0-Dev 2025-03-14 05:30:43 -04:00
Chris Speciale
20c9bec3bc Update Build.xml
Hxcpp doesn't respect HXCPP_CPP11 for android. We can avoid this issue just by adding -std=c++11 here. This resolves a conflict with openal soft 1.20.1 for android builds. This works because the library assumes c++17 and invokes a function that isn't available in android sdk below 28.
2025-03-14 05:29:18 -04:00
Chris Speciale
e41dc949fe Revert "Merge pull request #1924 from tobil4sk/update-openal-1.21.1"
This reverts commit 3f0179657b, reversing
changes made to 80aaaaef9f.
2025-03-14 05:16:24 -04:00
Tobiasz Laskowski
b709a5bb0d Fix old android ndk error not showing
The error flag is not valid inside `<files />`, so this wasn't actually
doing anything.

The error now shows properly
2025-03-14 07:41:17 +00:00
Tobiasz Laskowski
755781fdf2 Fix mac -stdlib=libstdc++ compilation error
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2025-03-13 21:15:45 +00:00
Tobiasz Laskowski
a13b3c37bb Avoid hxcpp overriding openal_soft's c++14 2025-03-13 21:15:34 +00:00
Tobiasz Laskowski
ea2bbd0be3 Update OpenAL Soft to 1.21.1 2025-03-13 21:15:18 +00:00
Chris Speciale
855996e122 Remove PLATFORM from Build.xml
We shouldn't need it anymore following this commit: 46aab0c80e
2025-03-13 05:59:14 -04:00
Chris Speciale
8d21626297 set PLATFORM to android 28 2025-03-12 18:55:09 -04:00
Chris Speciale
63b9a88e34 Merge pull request #1921 from tobil4sk/fix/get_glyphs_infinite_loop
Fix Font.getGlyphs returning zeros and looping
2025-03-11 01:34:41 -04:00
Tobiasz Laskowski
23b90dff3f Fix loop in GetGlyphIndices with invalid input
If the text is invalid, then readNextChar returns -1 and does not
progress to the next character. This previously meant that we got stuck
and looped indefinitely.
2025-03-11 01:23:29 +00:00
Tobiasz Laskowski
f495b777ab Remove old comment for hl GetGlyphIndices
The array size is already determined by the first loop
2025-03-11 01:19:58 +00:00
Tobiasz Laskowski
6283017adb Fix GetGlyphIndices returning array of 0 on hl
Previously, the first for loop would reach the end of the characters, so
no further characters were read in the second loop. This meant that the
array remained filled with 0 values.
2025-03-11 01:19:43 +00:00
Tobiasz Laskowski
70e55b1fa5 Fix rebuild warning about unknown option on msvc
cl : Command line warning D9002 : ignoring unknown option '-std=c11'
2025-03-10 14:20:55 -07:00