mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e473caf14a | ||
|
|
1c87f1d8d4 | ||
|
|
bb6cde175a | ||
|
|
bd93864ed2 | ||
|
|
406d6f28c0 |
+7
-2
@@ -80,7 +80,8 @@ int run(int argc, char *argv[])
|
||||
// stuff that's done only once, even if MO restarts in the loop below
|
||||
app.firstTimeSetup(multiProcess);
|
||||
|
||||
// force the "Select instance" dialog on startup (only for first loop)
|
||||
// force the "Select instance" dialog on startup, only for first loop or when
|
||||
// the current instance cannot be used
|
||||
bool pick = cl.pick();
|
||||
|
||||
// MO runs in a loop because it can be restarted in several ways, such as
|
||||
@@ -105,13 +106,17 @@ int run(int argc, char *argv[])
|
||||
const auto r = app.setup(multiProcess, pick);
|
||||
pick = false;
|
||||
|
||||
if (r == RestartExitCode) {
|
||||
if (r == RestartExitCode || r == ReselectExitCode) {
|
||||
// resets things when MO is "restarted"
|
||||
app.resetForRestart();
|
||||
|
||||
// don't reprocess command line
|
||||
cl.clear();
|
||||
|
||||
if (r == ReselectExitCode) {
|
||||
pick = true;
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if (r != 0) {
|
||||
// something failed, quit
|
||||
|
||||
@@ -492,7 +492,7 @@ std::optional<int> MOApplication::setupInstanceLoop(
|
||||
continue;
|
||||
} else if (setupResult == SetupInstanceResults::SelectAnother) {
|
||||
InstanceManager::singleton().clearCurrentInstance();
|
||||
return RestartExitCode;
|
||||
return ReselectExitCode;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ enum class Exit
|
||||
};
|
||||
|
||||
const int RestartExitCode = INT_MAX;
|
||||
const int ReselectExitCode = INT_MAX - 1;
|
||||
|
||||
using ExitFlags = QFlags<Exit>;
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(ExitFlags);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser
|
||||
// Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha
|
||||
#define VER_FILEVERSION 2,4,0
|
||||
#define VER_FILEVERSION_STR "2.4.0rc2\0"
|
||||
#define VER_FILEVERSION_STR "2.4.0rc3\0"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
|
||||
Reference in New Issue
Block a user