Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Backend Mutex lock and unlock Methods to be Constant #1729

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions project/include/system/Mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace lime {
Mutex ();
~Mutex ();

bool Lock ();
bool TryLock ();
bool Unlock ();
bool Lock () const;
bool TryLock () const;
bool Unlock () const;

private:

Expand All @@ -28,4 +28,4 @@ namespace lime {
}


#endif
#endif
8 changes: 4 additions & 4 deletions project/src/backend/sdl/SDLMutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace lime {
}


bool Mutex::Lock () {
bool Mutex::Lock () const {

if (mutex) {

Expand All @@ -36,7 +36,7 @@ namespace lime {
}


bool Mutex::TryLock () {
bool Mutex::TryLock () const {

if (mutex) {

Expand All @@ -49,7 +49,7 @@ namespace lime {
}


bool Mutex::Unlock () {
bool Mutex::Unlock () const {

if (mutex) {

Expand All @@ -62,4 +62,4 @@ namespace lime {
}


}
}
18 changes: 9 additions & 9 deletions src/lime/utils/AssetLibrary.hx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class AssetLibrary
}
else
{
return AudioBuffer.fromFile(paths.get(id));
return AudioBuffer.fromFile(getPath(id));
}
}

Expand Down Expand Up @@ -239,7 +239,7 @@ class AssetLibrary
}
else
{
return Bytes.fromFile(paths.get(id));
return Bytes.fromFile(getPath(id));
}
}

Expand All @@ -263,7 +263,7 @@ class AssetLibrary
}
else
{
return Font.fromFile(paths.get(id));
return Font.fromFile(getPath(id));
}
}

Expand All @@ -283,7 +283,7 @@ class AssetLibrary
}
else
{
return Image.fromFile(paths.get(id));
return Image.fromFile(getPath(id));
}
}

Expand Down Expand Up @@ -498,7 +498,7 @@ class AssetLibrary
}
else
{
return Bytes.loadFromFile(paths.get(id));
return Bytes.loadFromFile(getPath(id));
}
}

Expand All @@ -521,9 +521,9 @@ class AssetLibrary
else
{
#if (js && html5)
return Font.loadFromName(paths.get(id));
return Font.loadFromName(getPath(id));
#else
return Font.loadFromFile(paths.get(id));
return Font.loadFromFile(getPath(id));
#end
}
}
Expand Down Expand Up @@ -579,7 +579,7 @@ class AssetLibrary
}
else
{
return Image.loadFromFile(paths.get(id));
return Image.loadFromFile(getPath(id));
}
}

Expand Down Expand Up @@ -607,7 +607,7 @@ class AssetLibrary
else
{
var request = new HTTPRequest<String>();
return request.load(paths.get(id));
return request.load(getPath(id));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lime/utils/PackedAssetLibrary.hx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ import flash.media.Sound;
else
{
var basePath = rootPath == null || rootPath == "" ? "" : Path.addTrailingSlash(rootPath);
var libPath = paths.exists(id) ? paths.get(id) : id;
var libPath = paths.exists(id) ? getPath(id) : id;

var path = Path.join([basePath, libPath]);
path = __cacheBreak(path);
Expand Down
11 changes: 10 additions & 1 deletion tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,20 @@ class AndroidPlatform extends PlatformTarget
var architectures = [];

if (hasARMV5) architectures.push(Architecture.ARMV5);
if (hasARMV7 || (!hasARMV5 && !hasX86)) architectures.push(Architecture.ARMV7);
if (hasARMV7) architectures.push(Architecture.ARMV7);
if (hasARM64) architectures.push(Architecture.ARM64);
if (hasX86) architectures.push(Architecture.X86);
if (hasX64) architectures.push(Architecture.X64);

if (architectures.length == 0)
{
Log.warn("No architecture selected, defaulting to ARM64.");

hasARM64 = true;

architectures.push(Architecture.ARM64);
}

for (architecture in architectures)
{
var haxeParams = [hxml, "-D", "android", "-D", "PLATFORM=android-21"];
Expand Down
3 changes: 1 addition & 2 deletions tools/platforms/IOSPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ class IOSPlatform extends PlatformTarget
public override function rebuild():Void
{
var armv6 = (project.architectures.indexOf(Architecture.ARMV6) > -1 && !project.targetFlags.exists("simulator"));
var armv7 = (command == "rebuild"
|| (project.architectures.indexOf(Architecture.ARMV7) > -1 && !project.targetFlags.exists("simulator")));
var armv7 = (project.architectures.indexOf(Architecture.ARMV7) > -1 && !project.targetFlags.exists("simulator"));
var armv7s = (project.architectures.indexOf(Architecture.ARMV7S) > -1 && !project.targetFlags.exists("simulator"));
var arm64 = (command == "rebuild"
|| (project.architectures.indexOf(Architecture.ARM64) > -1 && !project.targetFlags.exists("simulator")));
Expand Down
Loading