Skip to content

Commit e3a37f7

Browse files
committed
Fix Windows compile errors
1 parent dfa6f3b commit e3a37f7

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

source/interface_derived.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -327,33 +327,33 @@ void MainFrameDerived::OpenProject(const long& index){
327327
//get the project
328328
project p = projects[index];
329329

330-
for(auto& path : installPaths){
330+
for (auto& path : installPaths) {
331331
auto editorPath = path / p.version / executable;
332-
332+
333333
//check that the unity editor exists at that location
334-
if (filesystem::exists(editorPath)){
335-
334+
if (filesystem::exists(editorPath)) {
335+
336336
string cmd = "\"" + editorPath.string() + "\" -projectpath \"" + p.path.string() + "\"";
337-
337+
338338
//start the process
339339
launch_process(cmd);
340-
340+
341341
return;
342342
}
343343
#if __APPLE__
344-
else if (filesystem::exists(path / executable)){
345-
// mac unlabeled version
346-
auto unlabeledPath = path/executable;
347-
char buffer[16];
348-
auto unlabeledPathInfo = path / "Unity.app" / "Contents" / "Info.plist";
349-
getCFBundleVersionFromPlist(unlabeledPathInfo.string().c_str(), buffer, sizeof(buffer));
350-
if (p.version == buffer){
351-
string cmd = "\"" + unlabeledPath.string() + "\" -projectpath \"" + p.path.string() + "\"";
352-
launch_process(cmd);
353-
return;
354-
}
355-
#endif
356-
}
344+
else if (filesystem::exists(path / executable)) {
345+
// mac unlabeled version
346+
auto unlabeledPath = path / executable;
347+
char buffer[16];
348+
auto unlabeledPathInfo = path / "Unity.app" / "Contents" / "Info.plist";
349+
getCFBundleVersionFromPlist(unlabeledPathInfo.string().c_str(), buffer, sizeof(buffer));
350+
if (p.version == buffer) {
351+
string cmd = "\"" + unlabeledPath.string() + "\" -projectpath \"" + p.path.string() + "\"";
352+
launch_process(cmd);
353+
return;
354+
}
355+
}
356+
#endif
357357
}
358358
//alert user
359359
wxMessageBox("The editor version " + p.version + " could not be found.\n\nCheck that it is installed, and that the folder where it has been installed is listed in the Editor Versions tab, under Install Search Paths.", "Unable to start Unity", wxOK | wxICON_ERROR);

source/interface_derived.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class MainFrameDerived : public MainFrame{
143143
editor& e = editors[id];
144144
std::filesystem::path path = e.path / e.name;
145145
if (!std::filesystem::exists(path)){
146-
reveal_in_explorer(e.path);
146+
reveal_in_explorer(e.path.string());
147147
}
148148
else{
149149
reveal_in_explorer(path.string());

0 commit comments

Comments
 (0)