add texture dumping as a config entry

This commit is contained in:
khang06 2019-04-02 20:57:13 -04:00 committed by James Rowe
parent 2b92065d2a
commit e0d63bd21b
10 changed files with 49 additions and 1 deletions

2
externals/fmt vendored

@ -1 +1 @@
Subproject commit 4b8f8fac96a7819f28f4be523ca10a2d5d8aaaf2 Subproject commit 7512a55aa3ae309587ca89668ef9ec4074a51a1f

1
externals/lodepng/lodepng vendored Submodule

@ -0,0 +1 @@
Subproject commit 31d9704fdcca0b68fb9656d4764fa0fb60e460c2

View File

@ -162,6 +162,9 @@ void Config::ReadValues() {
Settings::values.custom_bottom_bottom = Settings::values.custom_bottom_bottom =
static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480)); static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480));
// Utility
Settings::values.dump_textures = sdl2_config->GetBoolean("Utility", "dump_textures", false);
// Audio // Audio
Settings::values.enable_dsp_lle = sdl2_config->GetBoolean("Audio", "enable_dsp_lle", false); Settings::values.enable_dsp_lle = sdl2_config->GetBoolean("Audio", "enable_dsp_lle", false);
Settings::values.enable_dsp_lle_multithread = Settings::values.enable_dsp_lle_multithread =

View File

@ -178,6 +178,10 @@ custom_bottom_bottom =
# 0 (default): Top Screen is prominent, 1: Bottom Screen is prominent # 0 (default): Top Screen is prominent, 1: Bottom Screen is prominent
swap_screen = swap_screen =
# Dumps textures as PNG to dump/textures/[Title ID]/.
# 0 (default): Off, 1: On
dump_textures =
[Audio] [Audio]
# Whether or not to enable DSP LLE # Whether or not to enable DSP LLE
# 0 (default): No, 1: Yes # 0 (default): No, 1: Yes

View File

@ -230,6 +230,13 @@ void Config::ReadControlValues() {
qt_config->endGroup(); qt_config->endGroup();
} }
void Config::ReadUtilityValues() {
qt_config->beginGroup("Utility");
Settings::values.dump_textures = ReadSetting("dump_textures", false).toBool();
qt_config->endGroup();
}
void Config::ReadCoreValues() { void Config::ReadCoreValues() {
qt_config->beginGroup(QStringLiteral("Core")); qt_config->beginGroup(QStringLiteral("Core"));
@ -693,6 +700,14 @@ void Config::SaveControlValues() {
qt_config->endGroup(); qt_config->endGroup();
} }
void Config::SaveUtilityValues() {
qt_config->beginGroup("Utility");
WriteSetting("dump_textures", Settings::values.dump_textures, false);
qt_config->endGroup();
}
void Config::SaveCoreValues() { void Config::SaveCoreValues() {
qt_config->beginGroup(QStringLiteral("Core")); qt_config->beginGroup(QStringLiteral("Core"));

View File

@ -42,6 +42,7 @@ private:
void ReadUIGameListValues(); void ReadUIGameListValues();
void ReadUILayoutValues(); void ReadUILayoutValues();
void ReadUpdaterValues(); void ReadUpdaterValues();
void ReadUtilityValues();
void ReadWebServiceValues(); void ReadWebServiceValues();
void SaveValues(); void SaveValues();
@ -62,6 +63,7 @@ private:
void SaveUIGameListValues(); void SaveUIGameListValues();
void SaveUILayoutValues(); void SaveUILayoutValues();
void SaveUpdaterValues(); void SaveUpdaterValues();
void SaveUtilityValues();
void SaveWebServiceValues(); void SaveWebServiceValues();
QVariant ReadSetting(const QString& name) const; QVariant ReadSetting(const QString& name) const;

View File

@ -87,6 +87,7 @@ void ConfigureGraphics::ApplyConfiguration() {
Settings::values.layout_option = Settings::values.layout_option =
static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex());
Settings::values.swap_screen = ui->swap_screen->isChecked(); Settings::values.swap_screen = ui->swap_screen->isChecked();
Settings::values.dump_textures = ui->toggle_dump_textures->isChecked();
Settings::values.bg_red = static_cast<float>(bg_color.redF()); Settings::values.bg_red = static_cast<float>(bg_color.redF());
Settings::values.bg_green = static_cast<float>(bg_color.greenF()); Settings::values.bg_green = static_cast<float>(bg_color.greenF());
Settings::values.bg_blue = static_cast<float>(bg_color.blueF()); Settings::values.bg_blue = static_cast<float>(bg_color.blueF());

View File

@ -328,6 +328,25 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="utilityBox">
<property name="title">
<string>Utility</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="toggle_dump_textures">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dump textures to PNG files.&lt;/p&gt;&lt;p&gt;Textures are dumped to dump/textures/[Title ID]/.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Dump Textures (Hardware Renderer only)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">

View File

@ -87,6 +87,7 @@ void LogSettings() {
LogSetting("Stereoscopy_Factor3d", Settings::values.factor_3d); LogSetting("Stereoscopy_Factor3d", Settings::values.factor_3d);
LogSetting("Layout_LayoutOption", static_cast<int>(Settings::values.layout_option)); LogSetting("Layout_LayoutOption", static_cast<int>(Settings::values.layout_option));
LogSetting("Layout_SwapScreen", Settings::values.swap_screen); LogSetting("Layout_SwapScreen", Settings::values.swap_screen);
LogSetting("Utility_DumpTextures", Settings::values.dump_textures);
LogSetting("Audio_EnableDspLle", Settings::values.enable_dsp_lle); LogSetting("Audio_EnableDspLle", Settings::values.enable_dsp_lle);
LogSetting("Audio_EnableDspLleMultithread", Settings::values.enable_dsp_lle_multithread); LogSetting("Audio_EnableDspLleMultithread", Settings::values.enable_dsp_lle_multithread);
LogSetting("Audio_OutputEngine", Settings::values.sink_id); LogSetting("Audio_OutputEngine", Settings::values.sink_id);

View File

@ -170,6 +170,8 @@ struct Values {
bool filter_mode; bool filter_mode;
std::string pp_shader_name; std::string pp_shader_name;
bool dump_textures;
// Audio // Audio
bool enable_dsp_lle; bool enable_dsp_lle;
bool enable_dsp_lle_multithread; bool enable_dsp_lle_multithread;