Skip to content

Commit

Permalink
Simplify architecture selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
player-03 authored Jan 28, 2024
1 parent 17ad057 commit 8a1c0ff
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions tools/platforms/MacPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,6 @@ class MacPlatform extends PlatformTarget
title: ""
};

switch (System.hostArchitecture)
{
case ARMV6:
defaults.architectures = [ARMV6];
case ARMV7:
defaults.architectures = [ARMV7];
case X86:
defaults.architectures = [X86];
case X64:
defaults.architectures = [X64];
case ARM64:
defaults.architectures = [ARM64];
default:
defaults.architectures = [];
}

defaults.window.allowHighDPI = false;

for (i in 1...project.windows.length)
Expand All @@ -126,17 +110,14 @@ class MacPlatform extends PlatformTarget
project.architectures.remove(excludeArchitecture);
}

if (project.architectures.indexOf(X64) != -1)
targetArchitecture = System.hostArchitecture;
for (architecture in project.architectures)
{
targetArchitecture = X64;
}
else if (project.architectures.indexOf(ARM64) != -1)
{
targetArchitecture = ARM64;
}
else
{
targetArchitecture = X86;
if (architecture == X86 || architecture == X64 || architecture == ARM64)
{
targetArchitecture = architecture;
break;
}
}

if (project.targetFlags.exists("neko") || project.target != cast System.hostPlatform)
Expand Down

0 comments on commit 8a1c0ff

Please sign in to comment.