1
0
Fork 0

src/Main/fg_init.cxx: open popup message if going readonly because of existing fgfs process.

Should avoid confusion, e.g. because terrasync being disabled.
This commit is contained in:
Julian Smith 2021-01-22 13:02:59 +00:00
parent 25e56ceee7
commit 42eacf6928

View file

@ -494,7 +494,7 @@ InitHomeResult fgInitHome()
SG_LOG(SG_GENERAL, SG_POPUP, "Failed to create mutex for multi-app protection");
return InitHomeAbort;
} else if (GetLastError() == ERROR_ALREADY_EXISTS) {
SG_LOG(SG_GENERAL, SG_ALERT, "flightgear instance already running, switching to FG_HOME read-only.");
SG_LOG(SG_GENERAL, SG_POPUP, "flightgear instance already running, switching to FG_HOME read-only.");
fgSetBool("/sim/fghome-readonly", true);
return InitHomeReadOnly;
} else {
@ -517,7 +517,7 @@ InitHomeResult fgInitHome()
int err = ::flock(fd, LOCK_EX | LOCK_NB);
if (err < 0) {
if ( errno == EWOULDBLOCK) {
SG_LOG(SG_GENERAL, SG_ALERT, "flightgear instance already running, switching to FG_HOME read-only. ");
SG_LOG(SG_GENERAL, SG_POPUP, "flightgear instance already running, switching to FG_HOME read-only. ");
SG_LOG(SG_GENERAL, SG_ALERT, "Couldn't flock() file at:" << pidPath);
// set a marker property so terrasync/navcache don't try to write