Commit Graph

826 Commits

Author SHA1 Message Date
Josh Tynjala
7255873893 AudioManager: if alc.openDevice() returns null, don't call alc.createContext() to avoid a SIGNAL 11 crash 2025-01-24 09:47:09 -08:00
Josh Tynjala
2d22455e50 HTML5Thread: Haxe 3 compatibility fixes 2025-01-17 09:30:30 -08:00
Igor
6a5908b02b Just fixing some typo 2025-01-08 12:46:23 -08:00
Tobiasz Laskowski
37e7580720 Fix module paths for haxe 5
Haxe 5 will no longer support module resolution like this. See:
https://github.com/HaxeFoundation/haxe/issues/9150
2025-01-06 09:44:13 -08:00
Tobiasz Laskowski
d2129bbd64 Respect -cpp flag for windows cross compile 2024-12-18 08:48:18 -08:00
Tobiasz Laskowski
988a0e836f Add missing neko target flag on cross compile
Otherwise, we end up with a cpp build instead.
For cross compiling with mingw, this breaks the build since no mingw
flag is set.
2024-12-18 08:48:18 -08:00
player-03
d6e20eb987 Don't run embedBytes() if embedByteArray() is also running. (#1871)
* Don't run `embedBytes()` if `embedByteArray()` is also running.

Both functions insert a constructor, and one class can't have two constructors, much less call `super()` with two different signatures.

I can only assume a bug in Haxe that prevented this from being an issue until now, and that Haxe 5 is fixing the bug.

* Check for `@:autoBuild` only after checking for embed data.

If we ever decide to handle the case of the embed functions being called for non-classes (meaning `getLocalClass()` would return null), we'd handle it in `embedData()`. Therefore `embedData()` should happen first.
2024-12-06 16:14:58 -05:00
Josh Tynjala
5905e7cc6f CPPHelper: warn when rebuild command cannot find C++ project source files
Typically, you can't run rebuild with Haxelib releases and need to check out from Git
2024-12-04 08:48:25 -08:00
player-03
71e45e3258 Merge pull request #1836 from player-03/Promise_unnecessary_operations
Remove unnecessary operations in `Promise`.
2024-12-03 11:21:04 -05:00
Josh Tynjala
837534c05d IOSHelper: fix lime test ios with Xcode 16 or newer
The ios-deploy tool no longer works with new iOS SDKs that don't have DeveloperDiskImage.dmg, but Xcode added new commands that can be used in the terminal to install and launch on connected devices.
2024-12-02 11:24:45 -08:00
Josh Tynjala
19b571d8c2 HashlinkHelper, PlatformSetup: proper casing in user-facing messages for HashLink name 2024-11-13 11:13:16 -08:00
Josh Tynjala
de665a5fe5 IOSHelper: when -verbose is specified, print the name of the selected iOS simulator
This can be useful for debugging when the way that we select a simulator needs to be tweaked. For instance, I recently fixed an issue where "Unavailable" simulators could be automatically selected, but I saw only a UUID instead of the device name in the output, so it was hard to figure out which simulator had been selected.
2024-11-11 08:57:49 -08:00
Josh Tynjala
35d23c6ced XCodeHelper: fix issue where lime test ios -simulator may try to install app on unavailable iOS simulators 2024-11-11 08:50:32 -08:00
Giuppe
b52223e360 Fix: attribute "gradle-plugin" in Project.xml <android> tag is never read 2024-11-08 01:34:50 +01:00
Chris Speciale
c6165350c6 Font: renderGlyphs should use the internal __setSize() 2024-10-30 13:17:50 -04:00
Chris Speciale
17bd36ac29 Fix compilation for cpp 2024-10-30 13:08:21 -04:00
Chris Speciale
fa77a6b370 Font: Make sure we pass dpi value 2024-10-30 13:04:06 -04:00
Chris Speciale
2f99776336 Font: Set 72 as default dpi for backwards compatibility 2024-10-30 12:56:16 -04:00
Chris Speciale
579efa5351 Font: Allow setting dpi internally
This fixes some unexpected changes in text rendering for OpenFL which rely on a private function in Lime. Previously we defaulted at 72 dpi, which apparently is expected to layout the text properly. Most displays are 96 dpi or higher today, so we should probably look into this. For RenderGlyph, which was previously broken over several versions, we will now use a dpi of 96 for now. In the next version of lime, we absolutely should alter the function signature to allow for renderGlyph to accept a dpi argument.
2024-10-30 12:49:30 -04:00
Chris Speciale
85414fce46 Font: Fix renderGlyph to render correctly
Accounts for some changes to the native code called through cffi. We use 32 bit space (24 bit color) to create our image. We had some problems using 8 bit color previously. This might be a breaking change to anyone expecting an 8 bit image buffer, but it wasn't working for several versions anyway and this api is not used for anything within lime to render text as is.
2024-10-28 22:58:23 -04:00
Josh Tynjala
802ae3518e System: expand documentation of exit() method
Includes explanation that Sys.exit() bypasses Lime's ability to shut down its C++ subsystems, so System.exit() is recommended as best practice instead of Sys.exit().
2024-10-25 09:13:48 -07:00
player-03
579a7cd61b Work around compile error in specific cases.
This appears to have been a bug in Haxe 4.0-4.1's HashLink target. `value++` failed, but `value = value + 1` was fine.
2024-10-22 13:49:03 -04:00
Chris Speciale
a8939e9951 Merge pull request #1834 from gepatto/8.2.0-Dev
set correct paths for ndll for linxuarm and linuxarm64 (raspberrypi)
2024-10-22 07:17:56 -04:00
player-03
4c987ef1cc HL didn't support threads in Haxe 3. 2024-10-21 19:51:14 -04:00
Chris Speciale
8a5b9d506a Font: Add missing Docs 2024-10-18 02:56:35 -04:00
Josh Tynjala
9b1ea24648 FileDialog: Fixes issue where file dialog stops responding in HashLink on Windows (closes #1849)
Does not seem to recover when it happens, requiring the Lime app to be force closed. Some kind of threading issue that is affecting HashLink on Windows only (macOS and Linux are fine, and other sys targets are fine).

Fixed by passing SINGLE_THREADED to ThreadPool constructor using #if (windows && hl)
2024-10-17 13:41:28 -07:00
Josh Tynjala
0e974fd733 AIRHelper: add support for AIR adt -tsa option
Example:

<config:air tsa="http://timestamp.digicert.com"/>

Required to workaround "Could not generate timestamp: Connection reset" error from adt with default timestamp URL.
2024-10-17 09:18:05 -07:00
Chris Speciale
7dc3718551 BackgroundWorker: Add hl flag
Prevents hl from freezing up when using bgworker
2024-10-16 00:34:09 -04:00
Josh Tynjala
dd79e5852a LZMA: fix is check missing parentheses 2024-09-10 11:10:34 -07: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