Commit Graph

852 Commits

Author SHA1 Message Date
Tobiasz Laskowski
ca770337cb Add hb_buffer_add_hxstring
To properly handle encoding conversions, we need to do it in native
code. This new function performs this role.

This is useful for hxcpp which may have either ascii or utf16 encoding,
but this can only be checked via the native api and it is not possible
on the haxe side.
2025-03-10 02:37:52 +00:00
Josh Tynjala
9f9a5b9f31 Merge branch 'develop' into 8.3.0-Dev 2025-03-03 13:19:35 -08:00
Josh Tynjala
3aa32e2167 Image: __fromBytes() null and length check to avoid EXC_BAD_ACCESS lime::PNG::Decode (closes #1894) 2025-03-03 11:44:44 -08:00
Joseph Cloutier
ec4305915d Stop shadowing haxe.io.Bytes. (#1765) 2025-02-24 15:42:51 -08:00
Josh Tynjala
ebab7dd2c2 AL: keep old constant to avoid breaking user code 2025-02-24 15:36:56 -08:00
Ralty
be461754a3 Fix typo on EFFECT_AUTOWAH 2025-02-24 15:36:56 -08:00
DigiEggz
cd404bd2a0 Support pannerAttr for Howler sounds (#1788)
Exposes the pannerAttr field, which allows panner values to be set. By setting the panningModel to "equalpower", audio degradation is prevented and results in crisp by default, resolving the problem mentioned in https://github.com/goldfire/howler.js/issues/112.

In the future, panner attributes can be passed (for example `parent.buffer.__srcHowl.pannerAttr({panningModel: "HRTF”});)` within the HTML5AudioSource `play()` function, after it has began playback via `parent.buffer.__srcHowl.play()`.
2025-02-24 15:32:50 -08:00
MAJigsaw77
df3f816f9b Add copyrightYears to MetaData. 2025-02-11 13:59:39 +02:00
unknown
f331941a6b Set hardware attribute on context creation 2025-02-08 19:54:00 +01:00
Josh Tynjala
af2299670f Display: add safeArea property
display.safeArea is a subset of display.bounds that accounts for notches, holes, or other display cutouts.
2025-01-30 15:56:27 -08:00
Josh Tynjala
8031ed22d9 System: fix typo in openFile() docs 2025-01-29 15:12:30 -08:00
Josh Tynjala
2c42843333 NativeApplication: compile fix 2025-01-29 15:10:01 -08:00
Josh Tynjala
daa8cf1284 Application: move deviceOrientation getter implementation into backends 2025-01-29 14:21:39 -08:00
Josh Tynjala
98cdb15a3c AIR: map orientation values from AIR to Lime 2025-01-29 14:13:51 -08:00
Josh Tynjala
40cc093faf Application, System: html5 device/display orientation 2025-01-29 12:59:00 -08:00
Josh Tynjala
bca04cdf49 Display: orientation property should be typed as lime.system.Orientation instead of Int 2025-01-29 12:03:46 -08:00
Josh Tynjala
8f0b8f356e Application: onDisplayOrientation and onDeviceOrientation events for iOS and Android
Device orientation is the orientation of the phone/tablet.

Display orientation is the orientation of what is rendered on the display.

By default, they should usually be the same. If orientation is locked, device orientation will update, but display orientation usually won't.
2025-01-29 09:38:00 -08:00
Josh Tynjala
2da06fa2af Merge branch 'develop' into 8.3.0-Dev 2025-01-29 09:37:47 -08:00
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
Josh Tynjala
ff3ccf159d Merge branch 'develop' into 8.3.0-Dev 2025-01-10 15:08:32 -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
Joseph Cloutier
8bc9a1190c Merge branch 'develop' into 8.3.0-Dev 2024-12-31 16:57:54 -05: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
Josh Tynjala
d1dd5bccf6 Merge branch 'develop' into 8.3.0-Dev 2024-11-05 13:57:08 -08:00
player-03
7c96738d9f Merge pull request #1542 from Stencyl/packed-asset-library-preloader
Display preloader progress for packed asset libraries.
2024-11-03 17:43:14 -05: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