mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7665d9dd61 | ||
|
|
12104ed988 |
@@ -5,6 +5,8 @@ set(MO2_CMAKE_DEPRECATED_UIBASE_INCLUDE ON)
|
||||
|
||||
project(organizer)
|
||||
|
||||
find_package(mo2-cmake CONFIG REQUIRED)
|
||||
|
||||
# if MO2_INSTALL_IS_BIN is set, this means that we should install directly into the
|
||||
# installation prefix, without the bin/ subfolder, typically for a standalone build
|
||||
# to update an existing install
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
find_package(mo2-cmake CONFIG REQUIRED)
|
||||
|
||||
find_package(usvfs CONFIG REQUIRED)
|
||||
|
||||
|
||||
@@ -2392,6 +2392,15 @@ void DiagnosticsSettings::setLootLogLevel(lootcli::LogLevels level)
|
||||
set(m_Settings, "Settings", "loot_log_level", level);
|
||||
}
|
||||
|
||||
bool DiagnosticsSettings::usvfsDebugMode() const
|
||||
{
|
||||
return get<bool>(m_Settings, "Settings", "usvfs_debug_mode", false);
|
||||
}
|
||||
void DiagnosticsSettings::setUsvfsDebugMode(bool enabled)
|
||||
{
|
||||
set(m_Settings, "Settings", "usvfs_debug_mode", enabled);
|
||||
}
|
||||
|
||||
env::CoreDumpTypes DiagnosticsSettings::coreDumpType() const
|
||||
{
|
||||
return get<env::CoreDumpTypes>(m_Settings, "Settings", "crash_dumps_type",
|
||||
|
||||
@@ -713,6 +713,10 @@ public:
|
||||
lootcli::LogLevels lootLogLevel() const;
|
||||
void setLootLogLevel(lootcli::LogLevels level);
|
||||
|
||||
// set USVFS debug mode
|
||||
bool usvfsDebugMode() const;
|
||||
void setUsvfsDebugMode(bool enabled);
|
||||
|
||||
// crash dump type for both MO and usvfs
|
||||
//
|
||||
env::CoreDumpTypes coreDumpType() const;
|
||||
|
||||
+18
-11
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>820</width>
|
||||
<height>592</height>
|
||||
<height>607</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="generalTab">
|
||||
<attribute name="title">
|
||||
@@ -44,8 +44,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>761</width>
|
||||
<height>550</height>
|
||||
<width>766</width>
|
||||
<height>611</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
@@ -1052,8 +1052,8 @@ If you disable this feature, MO will only display official DLCs this way. Please
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>761</width>
|
||||
<height>515</height>
|
||||
<width>766</width>
|
||||
<height>548</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
@@ -1742,8 +1742,8 @@ If you disable this feature, MO will only display official DLCs this way. Please
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>778</width>
|
||||
<height>475</height>
|
||||
<width>780</width>
|
||||
<height>489</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
@@ -2041,9 +2041,6 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
@@ -2247,6 +2244,16 @@ programs you are intentionally running.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="usvfsDebugModeBox">
|
||||
<property name="toolTip">
|
||||
<string>For developer only.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USVFS Debug Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -12,6 +12,7 @@ DiagnosticsSettingsTab::DiagnosticsSettingsTab(Settings& s, SettingsDialog& d)
|
||||
setLogLevel();
|
||||
setLootLogLevel();
|
||||
setCrashDumpTypesBox();
|
||||
ui->usvfsDebugModeBox->setChecked(settings().diagnostics().usvfsDebugMode());
|
||||
|
||||
ui->dumpsMaxEdit->setValue(settings().diagnostics().maxCoreDumps());
|
||||
|
||||
@@ -103,6 +104,8 @@ void DiagnosticsSettingsTab::update()
|
||||
settings().diagnostics().setLogLevel(
|
||||
static_cast<log::Levels>(ui->logLevelBox->currentData().toInt()));
|
||||
|
||||
settings().diagnostics().setUsvfsDebugMode(ui->usvfsDebugModeBox->isChecked());
|
||||
|
||||
settings().diagnostics().setCoreDumpType(
|
||||
static_cast<env::CoreDumpTypes>(ui->dumpsTypeBox->currentData().toInt()));
|
||||
|
||||
|
||||
@@ -130,13 +130,14 @@ UsvfsConnector::UsvfsConnector()
|
||||
const LogLevel logLevel = toUsvfsLogLevel(s.diagnostics().logLevel());
|
||||
const auto dumpType = toUsvfsCrashDumpsType(s.diagnostics().coreDumpType());
|
||||
const auto delay = duration_cast<milliseconds>(s.diagnostics().spawnDelay());
|
||||
const auto debugMode = s.diagnostics().usvfsDebugMode();
|
||||
std::string dumpPath =
|
||||
MOShared::ToString(OrganizerCore::getGlobalCoreDumpPath(), true);
|
||||
|
||||
usvfsParameters* params = usvfsCreateParameters();
|
||||
|
||||
usvfsSetInstanceName(params, SHMID);
|
||||
usvfsSetDebugMode(params, false);
|
||||
usvfsSetDebugMode(params, debugMode);
|
||||
usvfsSetLogLevel(params, logLevel);
|
||||
usvfsSetCrashDumpType(params, dumpType);
|
||||
usvfsSetCrashDumpPath(params, dumpPath.c_str());
|
||||
|
||||
Reference in New Issue
Block a user