diff options
| -rw-r--r-- | src/organizercore.cpp | 5 | ||||
| -rw-r--r-- | src/organizercore.h | 3 | ||||
| -rw-r--r-- | src/usvfsconnector.cpp | 51 | ||||
| -rw-r--r-- | src/usvfsconnector.h | 6 |
4 files changed, 16 insertions, 49 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index df824c2b..5613e8ce 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -485,10 +485,12 @@ void OrganizerCore::prepareVFS() void OrganizerCore::updateVFSParams( log::Levels logLevel, CrashDumpsType crashDumpsType, + const QString& crashDumpsPath, std::chrono::seconds spawnDelay, QString executableBlacklist) { setGlobalCrashDumpsType(crashDumpsType); - m_USVFS.updateParams(logLevel, crashDumpsType, spawnDelay, executableBlacklist); + m_USVFS.updateParams( + logLevel, crashDumpsType, crashDumpsPath, spawnDelay, executableBlacklist); } void OrganizerCore::setLogLevel(log::Levels level) @@ -498,6 +500,7 @@ void OrganizerCore::setLogLevel(log::Levels level) updateVFSParams( m_Settings.diagnostics().logLevel(), m_Settings.diagnostics().crashDumpsType(), + QString::fromStdWString(crashDumpsPath()), m_Settings.diagnostics().spawnDelay(), m_Settings.executablesBlacklist()); diff --git a/src/organizercore.h b/src/organizercore.h index 5b7dd87b..0d0a092c 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -195,7 +195,8 @@ public: void updateVFSParams(
MOBase::log::Levels logLevel, CrashDumpsType crashDumpsType,
- std::chrono::seconds spawnDelay, QString executableBlacklist);
+ const QString& crashDumpsPath, std::chrono::seconds spawnDelay,
+ QString executableBlacklist);
void setLogLevel(MOBase::log::Levels level);
diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp index 9a4fa742..311c6dd3 100644 --- a/src/usvfsconnector.cpp +++ b/src/usvfsconnector.cpp @@ -118,48 +118,6 @@ CrashDumpsType crashDumpsType(int type) } } -QString toString(LogLevel lv) -{ - switch (lv) - { - case LogLevel::Debug: - return "debug"; - - case LogLevel::Info: - return "info"; - - case LogLevel::Warning: - return "warning"; - - case LogLevel::Error: - return "error"; - - default: - return QString("%1").arg(static_cast<int>(lv)); - } -} - -QString toString(CrashDumpsType t) -{ - switch (t) - { - case CrashDumpsType::None: - return "none"; - - case CrashDumpsType::Mini: - return "mini"; - - case CrashDumpsType::Data: - return "data"; - - case CrashDumpsType::Full: - return "full"; - - default: - return QString("%1").arg(static_cast<int>(t)); - } -} - UsvfsConnector::UsvfsConnector() { using namespace std::chrono; @@ -188,9 +146,9 @@ UsvfsConnector::UsvfsConnector() " . log: {}\n" " . dump: {} ({})", SHMID, - toString(logLevel), + usvfsLogLevelToString(logLevel), dumpPath.c_str(), - toString(dumpType)); + usvfsCrashDumpTypeToString(dumpType)); usvfsCreateVFS(params); usvfsFreeParameters(params); @@ -263,14 +221,17 @@ void UsvfsConnector::updateMapping(const MappingType &mapping) void UsvfsConnector::updateParams( MOBase::log::Levels logLevel, CrashDumpsType crashDumpsType, - std::chrono::seconds spawnDelay, QString executableBlacklist) + const QString& crashDumpsPath, std::chrono::seconds spawnDelay, + QString executableBlacklist) { using namespace std::chrono; usvfsParameters* p = usvfsCreateParameters(); + usvfsSetDebugMode(p, FALSE); usvfsSetLogLevel(p, toUsvfsLogLevel(logLevel)); usvfsSetCrashDumpType(p, crashDumpsType); + usvfsSetCrashDumpPath(p, crashDumpsPath.toStdString().c_str()); usvfsSetProcessDelay(p, duration_cast<milliseconds>(spawnDelay).count()); usvfsUpdateParameters(p); diff --git a/src/usvfsconnector.h b/src/usvfsconnector.h index a4647eaf..d0071678 100644 --- a/src/usvfsconnector.h +++ b/src/usvfsconnector.h @@ -88,9 +88,11 @@ public: void updateParams( MOBase::log::Levels logLevel, CrashDumpsType crashDumpsType, - std::chrono::seconds spawnDelay, QString executableBlacklist); + const QString& crashDumpsPath, std::chrono::seconds spawnDelay, + QString executableBlacklist); - void updateForcedLibraries(const QList<MOBase::ExecutableForcedLoadSetting> &forcedLibraries); + void updateForcedLibraries( + const QList<MOBase::ExecutableForcedLoadSetting> &forcedLibraries); private: |
