Skip to content

Commit

Permalink
Fix incorrect architecture report on a 32bit ARM processor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Simpson committed Oct 15, 2024
1 parent f0ae4cf commit 52f892a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ public virtual void InitialiseTest()
LogNewLine(); // Blank line

// Set the architecture and bitness
string architecture = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "ARM" : "Intel/AMD";
string architecture = ((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) | (RuntimeInformation.ProcessArchitecture == Architecture.Arm)) ? "ARM" : "Intel/AMD";
string osBitness = Environment.Is64BitOperatingSystem ? "64" : "32";
string processBitness = Environment.Is64BitProcess ? "64" : "32";

Expand Down
8 changes: 4 additions & 4 deletions ConformU/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@

statusMessage = $"Version {Update.ConformuVersionDisplayString}";

string processBitness = Environment.Is64BitProcess ? "64bit" : "32bit";
string osBitness = Environment.Is64BitOperatingSystem ? "64bit" : "32bit";
string architecture = RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "ARM" : "Intel/AMD";
string processBitness = Environment.Is64BitProcess ? "64" : "32";
string osBitness = Environment.Is64BitOperatingSystem ? "64" : "32";
string architecture = ((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) | (RuntimeInformation.ProcessArchitecture == Architecture.Arm)) ? "ARM" : "Intel/AMD";
string osName;

// Select the best descriptive name depending on OS.
Expand All @@ -108,7 +108,7 @@
osName = Environment.OSVersion.ToString();
#endif

statusMessage += $" Running as a {processBitness} application on a {osBitness} {architecture} processor. OS: {osName}";
statusMessage += $" Running as a {processBitness}bit application on a {osBitness}bit {architecture} processor. OS: {osName}";

// Validate that the application SEMVER string is valid
if (SemVersion.TryParse(Update.ConformuVersion, SemVersionStyles.AllowV, out SemVersion currentversion))
Expand Down

0 comments on commit 52f892a

Please sign in to comment.