Merge branch 'develop' into 8.3.0-Dev

This commit is contained in:
Joseph Cloutier
2025-09-01 00:42:57 -04:00
7 changed files with 59 additions and 30 deletions

View File

@@ -16,3 +16,24 @@ You may consider creating a branch specific to the fix or improvement you wish t
It is our goal to help Lime evolve as a clean, easy-to-use (but powerful) layer for cross-platform development. Thanks for being a part of making this possible!
## Versioning and Branching Guidelines
We follow Semantic Versioning (semver): MAJOR.MINOR.PATCH.
### Patch Updates (x.x.x)
All bug fixes should be submitted to the current stable development branch (e.g., develop).
These changes are released as patch versions (e.g., 8.2.3 → 8.2.4).
### Minor Updates (x.x.0)
All new features (non-breaking) should be submitted to the next minor development branch, named x.x.x-dev.
For example, if the current version is 8.2.2, features targeting 8.3.0 should go into 8.3.0-dev.
### Major Updates (x.0.0)
Any breaking changes or major version updates must be submitted to the next major development branch, named x.0.0-dev.
For example, breaking changes intended for 9.0.0 go into 9.0.0-dev.

View File

@@ -1,5 +1,9 @@
<xml>
<section if="android LIME_OPENALSOFT">
<error value="NDK version 20 or higher is required." unless="NDKV20+" />
</section>
<files id="native-toolkit-openal">
<compilerflag value="-std=c++11" if="android" />
@@ -157,7 +161,6 @@
<section if="android">
<error value="NDK version 20 or higher is required." unless="NDKV20+" />
<compilerflag value="-fsigned-char" />
<file name="${NATIVE_TOOLKIT_PATH}/openal/alc/backends/opensl.cpp" />

View File

@@ -57,6 +57,19 @@ namespace lime {
std::map<void*, CURL_XferInfo*> xferInfoValues;
Mutex curl_gc_mutex;
void free_header_values (const std::vector<char*>* values) {
if (values) {
for (auto it = values->begin (); it != values->end (); ++it) {
free (*it);
}
}
}
void gc_curl (value handle) {
@@ -121,6 +134,7 @@ namespace lime {
std::vector<char*>* values = headerValues[handle];
headerCallbacks.erase (handle);
headerValues.erase (handle);
free_header_values (values);
delete callback;
delete values;
@@ -254,6 +268,7 @@ namespace lime {
std::vector<char*>* values = headerValues[handle];
headerCallbacks.erase (handle);
headerValues.erase (handle);
free_header_values (values);
delete callback;
delete values;
@@ -581,6 +596,7 @@ namespace lime {
}
free_header_values (values);
values->clear ();
}
@@ -688,6 +704,7 @@ namespace lime {
}
free_header_values (values);
values->clear ();
}
@@ -1691,8 +1708,9 @@ namespace lime {
{
curl_gc_mutex.Lock ();
if (headerCallbacks.find (handle) == headerCallbacks.end ()) {
if (headerCallbacks.find (handle) != headerCallbacks.end ()) {
free_header_values (headerValues[handle]);
delete headerCallbacks[handle];
delete headerValues[handle];
@@ -2118,8 +2136,9 @@ namespace lime {
{
curl_gc_mutex.Lock ();
if (headerCallbacks.find (handle) == headerCallbacks.end ()) {
if (headerCallbacks.find (handle) != headerCallbacks.end ()) {
free_header_values (headerValues[handle]);
delete headerCallbacks[handle];
delete headerValues[handle];

View File

@@ -270,19 +270,7 @@ class Timer
public function stop():Void
{
if (mRunning)
{
mRunning = false;
for (i in 0...sRunningTimers.length)
{
if (sRunningTimers[i] == this)
{
sRunningTimers[i] = null;
break;
}
}
}
mRunning = false;
}
@:noCompletion private function __check(inTime:Float)

View File

@@ -64,7 +64,8 @@ class HTML5HTTPRequest
if (parent.method == POST)
{
request.upload.addEventListener("progress", progress, false);
if(request.upload != null)
request.upload.addEventListener("progress", progress, false);
}
else
{

View File

@@ -107,9 +107,9 @@ class NativeApplication
if (pauseTimer > -1)
{
var offset = System.getTimer() - pauseTimer;
for (i in 0...Timer.sRunningTimers.length)
for (timer in Timer.sRunningTimers)
{
if (Timer.sRunningTimers[i] != null) Timer.sRunningTimers[i].mFireAt += offset;
if (timer.mRunning) timer.mFireAt += offset;
}
pauseTimer = -1;
}
@@ -623,16 +623,13 @@ class NativeApplication
if (Timer.sRunningTimers.length > 0)
{
var currentTime = System.getTimer();
var foundNull = false;
var timer;
var foundStopped = false;
for (i in 0...Timer.sRunningTimers.length)
for (timer in Timer.sRunningTimers)
{
timer = Timer.sRunningTimers[i];
if (timer != null)
if (timer.mRunning)
{
if (timer.mRunning && currentTime >= timer.mFireAt)
if (currentTime >= timer.mFireAt)
{
timer.mFireAt += timer.mTime;
timer.run();
@@ -640,15 +637,15 @@ class NativeApplication
}
else
{
foundNull = true;
foundStopped = true;
}
}
if (foundNull)
if (foundStopped)
{
Timer.sRunningTimers = Timer.sRunningTimers.filter(function(val)
{
return val != null;
return val.mRunning;
});
}
}