From 4adb13c9435baade511d3ac78fb142dc73bd2e1f Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Fri, 8 Dec 2017 18:24:06 +0200 Subject: generate dumps using new diagnostics settings --- src/organizercore.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index f8a368c9..adb895ec 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -47,6 +47,7 @@ #include // for qPrintable, etc #include +#include #include // for _tcsicmp #include @@ -66,6 +67,9 @@ using namespace MOShared; using namespace MOBase; +//static +CrashDumpsType OrganizerCore::m_globalCrashDumpsType = CrashDumpsType::None; + static bool isOnline() { QList interfaces = QNetworkInterface::allInterfaces(); @@ -643,8 +647,23 @@ void OrganizerCore::prepareVFS() m_USVFS.updateMapping(fileMapping(m_CurrentProfile->name(), QString())); } -void OrganizerCore::setLogLevel(int logLevel) { - m_USVFS.setLogLevel(logLevel); +void OrganizerCore::updateVFSParams(int logLevel, int crashDumpsType) { + setGlobalCrashDumpsType(crashDumpsType); + m_USVFS.updateParams(logLevel, crashDumpsType); +} + +//static +void OrganizerCore::setGlobalCrashDumpsType(int crashDumpsType) { + m_globalCrashDumpsType = ::crashDumpsType(crashDumpsType); +} + +//static +std::wstring OrganizerCore::crashDumpsPath() { + wchar_t appDataLocal[MAX_PATH]{ 0 }; + ::SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, appDataLocal); + std::wstring dumpPath{ appDataLocal }; + dumpPath += L"\\modorganizer"; + return dumpPath; } void OrganizerCore::setCurrentProfile(const QString &profileName) -- cgit v1.3.1