diff options
| author | Eran Mizrahi <erasmux@gmail.com> | 2017-12-08 18:24:06 +0200 |
|---|---|---|
| committer | Eran Mizrahi <erasmux@gmail.com> | 2017-12-10 02:53:09 +0200 |
| commit | 4adb13c9435baade511d3ac78fb142dc73bd2e1f (patch) | |
| tree | ef08ae55a1d263c8e5c2a02e49d24b209ab6d4b4 /src/organizercore.cpp | |
| parent | 54fd26fee15c320c363a4be355c80e4b7ce38164 (diff) | |
generate dumps using new diagnostics settings
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
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 <QtGlobal> // for qPrintable, etc
#include <Psapi.h>
+#include <Shlobj.h>
#include <tchar.h> // for _tcsicmp
#include <limits.h>
@@ -66,6 +67,9 @@ using namespace MOShared;
using namespace MOBase;
+//static
+CrashDumpsType OrganizerCore::m_globalCrashDumpsType = CrashDumpsType::None;
+
static bool isOnline()
{
QList<QNetworkInterface> 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)
|
