openfl / starling

Known as the "Cross-Platform Game Engine", Starling is a popular Stage3D framework for OpenFL and Haxe
Other
236 stars 68 forks source link

Fixes runtime crashes on HashLink #171

Closed badlogic closed 10 months ago

badlogic commented 1 year ago

In RenderUtil, HashLink fails to convert renderMode:String and profile:Dynamic to the respective concrete types. Fixed by explicitly assigning the values to local variables with the correct types. This fixes https://github.com/openfl/starling/issues/149

In Painter.hx, HashLink assumes the keys of _stencilReferenceValues:Dictionary<Dynamic, UInt> are actually strings and fails when trying to cast the keys to String. Fixed by directly using ObjectMap.

Without these fixes, Starling will not run on HashLink at all. I'd a appreciate a new release, as one of our libraries depends on Starling.

zpshank commented 10 months ago

I was also experiencing problems related to #149. I can confirm that this PR fixed the issue on my machine.

joshtynjala commented 10 months ago

Closing with #173