Skip to content

Commit

Permalink
Check for data in ../share/principia/ on Windows too
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Apr 28, 2024
1 parent 9e7e841 commit c57b38d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/tms/backends/windows/main.cc
Expand Up @@ -171,8 +171,14 @@ WinMain(HINSTANCE hi, HINSTANCE hp, LPSTR cl, int cs)

// How about now?
if (stat("data-shared", &st) != 0) {
// We're doomed, better just fail.
tms_fatalf("Could not find data directories.");
// If that doesn't work we're assuming a system install.
tms_infof("chdirring to ./share/principia/");
chdir("./share/principia/");

if (stat("data-shared", &st) != 0) {
// We're doomed, better just fail.
tms_fatalf("Could not find data directories.");
}
}
} else {
// Switch to portable if ./portable.txt exists next to exe
Expand Down

0 comments on commit c57b38d

Please sign in to comment.