From 5e528fb4cf16ae208944d15d568c9140e3d741e4 Mon Sep 17 00:00:00 2001
From: isanae <14251494+isanae@users.noreply.github.com>
Date: Sat, 18 Jul 2020 02:24:44 -0400
Subject: new CommandLine class implemented crashdump as a command, fixed
dump_running_process.bat to use it attach to console if present instead of
always create one
---
src/main.cpp | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
(limited to 'src/main.cpp')
diff --git a/src/main.cpp b/src/main.cpp
index 7130d15c..8a006907 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -49,6 +49,7 @@ along with Mod Organizer. If not, see .
#include "env.h"
#include "envmodule.h"
#include "shared/util.h"
+#include "commandline.h"
#include
#include "shared/windows_error.h"
@@ -811,22 +812,6 @@ int runApplication(
return 1;
}
-int doCoreDump(env::CoreDumpTypes type)
-{
- env::Console c;
-
- // dump
- const auto b = env::coredumpOther(type);
- if (!b) {
- std::wcerr << L"\n>>>> a minidump file was not written\n\n";
- }
-
- std::wcerr << L"Press enter to continue...";
- std::wcin.get();
-
- return (b ? 0 : 1);
-}
-
log::Levels convertQtLevel(QtMsgType t)
{
switch (t)
@@ -895,17 +880,11 @@ void initLogging()
int main(int argc, char *argv[])
{
TimeThis tt("main to runApplication()");
+ cl::CommandLine cl;
- // handle --crashdump first
- for (int i=1; i= 0)
+ return r;
initLogging();
--
cgit v1.3.1