Skip to content

Commit c482a8d

Browse files
committed
Display architecture in UI
1 parent 70d99d3 commit c482a8d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

source/interface_derived.cpp

+15-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <dirent.h>
1818
#endif
1919

20+
#include <fmt/format.h>
21+
2022
#include <fmt/format.h>
2123
#include <filesystem>
2224
#if __APPLE__
@@ -591,13 +593,22 @@ void MainFrameDerived::LoadEditorVersions(){
591593
auto addInstall = [this,&a,entry](const editor& e){
592594
if (std::find(editors.begin(), editors.end(), e) == editors.end()){
593595
//get the target architecture
594-
#if __APPLE
595-
auto bundlepath = e.path / entry->d_name / "Unity.app";
596+
#if __APPLE__
597+
auto bundlepath = e.path / e.name / "Unity.app";
596598
auto arch = getArchitectureFromBundle(bundlepath.string().c_str());
597-
#else
599+
std::string archstr;
600+
if (arch & architecture::arm64){
601+
archstr += "arm64 ";
602+
}
603+
if (arch & architecture::x86_64){
604+
archstr += "x86_64";
605+
}
598606

607+
const std::string displayName = fmt::format("{} {} - {}", e.name, archstr, e.path.string());
608+
#else
609+
const std::string displayName = e.name + " - " + e.path.string();
599610
#endif
600-
a.Add(e.name + " - " + e.path.string());
611+
a.Add(displayName);
601612
editors.push_back(e);
602613
}
603614
};

0 commit comments

Comments
 (0)