mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-05-01 12:45:42 -04:00
Qt: Add option for internal/window resolution screenshots
This commit is contained in:
parent
2aea58d056
commit
359d1509be
@ -32,11 +32,12 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
|
|||||||
&Settings::ParseDownsampleModeName, &Settings::GetDownsampleModeName,
|
&Settings::ParseDownsampleModeName, &Settings::GetDownsampleModeName,
|
||||||
Settings::DEFAULT_GPU_DOWNSAMPLE_MODE);
|
Settings::DEFAULT_GPU_DOWNSAMPLE_MODE);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayLinearFiltering, "Display",
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayLinearFiltering, "Display",
|
||||||
"LinearFiltering");
|
"LinearFiltering", true);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayIntegerScaling, "Display",
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayIntegerScaling, "Display",
|
||||||
"IntegerScaling");
|
"IntegerScaling", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayStretch, "Display",
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayStretch, "Display", "Stretch", false);
|
||||||
"Stretch");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.internalResolutionScreenshots, "Display",
|
||||||
|
"InternalResolutionScreenshots", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.vsync, "Display", "VSync");
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.vsync, "Display", "VSync");
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayAllFrames, "Display", "DisplayAllFrames",
|
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayAllFrames, "Display", "DisplayAllFrames",
|
||||||
false);
|
false);
|
||||||
@ -101,9 +102,12 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
|
|||||||
m_ui.displayIntegerScaling, tr("Integer Upscaling"), tr("Unchecked"),
|
m_ui.displayIntegerScaling, tr("Integer Upscaling"), tr("Unchecked"),
|
||||||
tr("Adds padding to the display area to ensure that the ratio between pixels on the host to "
|
tr("Adds padding to the display area to ensure that the ratio between pixels on the host to "
|
||||||
"pixels in the console is an integer number. <br>May result in a sharper image in some 2D games."));
|
"pixels in the console is an integer number. <br>May result in a sharper image in some 2D games."));
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(m_ui.displayStretch, tr("Stretch To Fill"), tr("Unchecked"),
|
||||||
m_ui.displayStretch, tr("Stretch To Fill"), tr("Unchecked"),
|
tr("Fills the window with the active display area, regardless of the aspect ratio."));
|
||||||
tr("Fills the window with the active display area, regardless of the aspect ratio."));
|
dialog->registerWidgetHelp(m_ui.internalResolutionScreenshots, tr("Internal Resolution Screenshots"), tr("Unchecked"),
|
||||||
|
tr("Saves screenshots at internal render resolution and without postprocessing. If this "
|
||||||
|
"option is disabled, the screenshots will be taken at the window's resolution. "
|
||||||
|
"Internal resolution screenshots can be very large at high rendering scales."));
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(
|
||||||
m_ui.vsync, tr("VSync"), tr("Checked"),
|
m_ui.vsync, tr("VSync"), tr("Checked"),
|
||||||
tr("Enable this option to match DuckStation's refresh rate with your current monitor or screen. "
|
tr("Enable this option to match DuckStation's refresh rate with your current monitor or screen. "
|
||||||
|
@ -156,6 +156,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="internalResolutionScreenshots">
|
||||||
|
<property name="text">
|
||||||
|
<string>Internal Resolution Screenshots</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -2569,6 +2569,8 @@ void CommonHostInterface::SetDefaultSettings(SettingsInterface& si)
|
|||||||
si.SetStringValue("Main", "ControllerBackend",
|
si.SetStringValue("Main", "ControllerBackend",
|
||||||
ControllerInterface::GetBackendName(ControllerInterface::GetDefaultBackend()));
|
ControllerInterface::GetBackendName(ControllerInterface::GetDefaultBackend()));
|
||||||
|
|
||||||
|
si.SetBoolValue("Display", "InternalResolutionScreenshots", false);
|
||||||
|
|
||||||
#ifdef WITH_DISCORD_PRESENCE
|
#ifdef WITH_DISCORD_PRESENCE
|
||||||
si.SetBoolValue("Main", "EnableDiscordPresence", false);
|
si.SetBoolValue("Main", "EnableDiscordPresence", false);
|
||||||
#endif
|
#endif
|
||||||
@ -2962,8 +2964,12 @@ bool CommonHostInterface::SaveScreenshot(const char* filename /* = nullptr */, b
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool internal_resolution = GetBoolSettingValue("Display", "InternalResolutionScreenshots", false);
|
||||||
const bool screenshot_saved =
|
const bool screenshot_saved =
|
||||||
m_display->WriteDisplayTextureToFile(filename, full_resolution, apply_aspect_ratio, compress_on_thread);
|
internal_resolution ?
|
||||||
|
m_display->WriteDisplayTextureToFile(filename, full_resolution, apply_aspect_ratio, compress_on_thread) :
|
||||||
|
m_display->WriteScreenshotToFile(filename, compress_on_thread);
|
||||||
|
|
||||||
if (!screenshot_saved)
|
if (!screenshot_saved)
|
||||||
{
|
{
|
||||||
AddFormattedOSDMessage(10.0f, TranslateString("OSDMessage", "Failed to save screenshot to '%s'"), filename);
|
AddFormattedOSDMessage(10.0f, TranslateString("OSDMessage", "Failed to save screenshot to '%s'"), filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user