Qt: Fix updater

This commit is contained in:
Connor McLaughlin 2022-07-22 21:51:00 +10:00
parent 0590a6098d
commit 853e9a8a6a
4 changed files with 9 additions and 11 deletions

View file

@ -197,6 +197,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget*
Qt::QueuedConnection); Qt::QueuedConnection);
m_ui.tweakOptionTable->setColumnWidth(0, 380); m_ui.tweakOptionTable->setColumnWidth(0, 380);
m_ui.tweakOptionTable->setColumnWidth(1, 170);
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Disable All Enhancements"), "Main", "DisableAllEnhancements", addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Disable All Enhancements"), "Main", "DisableAllEnhancements",
false); false);
@ -204,8 +205,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget*
true); true);
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Show Enhancement Settings"), "Display", "ShowEnhancements", addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Show Enhancement Settings"), "Display", "ShowEnhancements",
false); false);
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Controller Enhanced Mode (PS4/PS5)"), "Main",
"ControllerEnhancedMode", false);
addIntRangeTweakOption(dialog, m_ui.tweakOptionTable, tr("Display FPS Limit"), "Display", "MaxFPS", 0, 1000, 0); addIntRangeTweakOption(dialog, m_ui.tweakOptionTable, tr("Display FPS Limit"), "Display", "MaxFPS", 0, 1000, 0);
addMSAATweakOption(dialog, m_ui.tweakOptionTable, tr("Multisample Antialiasing")); addMSAATweakOption(dialog, m_ui.tweakOptionTable, tr("Multisample Antialiasing"));
@ -284,7 +283,6 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable all enhancements setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable all enhancements
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Show enhancement settings setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Show enhancement settings
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Controller enhanced mode (PS4/PS5)
setIntRangeTweakOption(m_ui.tweakOptionTable, i++, 0); // Display FPS limit setIntRangeTweakOption(m_ui.tweakOptionTable, i++, 0); // Display FPS limit
setChoiceTweakOption(m_ui.tweakOptionTable, i++, 0); // Multisample antialiasing setChoiceTweakOption(m_ui.tweakOptionTable, i++, 0); // Multisample antialiasing
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // PGXP vertex cache setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // PGXP vertex cache

View file

@ -92,7 +92,7 @@ std::string AutoUpdaterDialog::getDefaultTag()
std::string AutoUpdaterDialog::getCurrentUpdateTag() const std::string AutoUpdaterDialog::getCurrentUpdateTag() const
{ {
#ifdef AUTO_UPDATER_SUPPORTED #ifdef AUTO_UPDATER_SUPPORTED
return m_host_interface->GetStringSettingValue("AutoUpdater", "UpdateTag", THIS_RELEASE_TAG); return Host::GetBaseStringSettingValue("AutoUpdater", "UpdateTag", THIS_RELEASE_TAG);
#else #else
return {}; return {};
#endif #endif

View file

@ -645,7 +645,6 @@ void MainWindow::recreate()
MainWindow* new_main_window = new MainWindow(); MainWindow* new_main_window = new MainWindow();
new_main_window->initialize(); new_main_window->initialize();
new_main_window->refreshGameList(false);
new_main_window->show(); new_main_window->show();
deleteLater(); deleteLater();
} }

View file

@ -30,7 +30,7 @@ static void SetStyle();
static void SetKeyMap(); static void SetKeyMap();
static bool LoadFontData(); static bool LoadFontData();
static bool AddImGuiFonts(bool fullscreen_fonts); static bool AddImGuiFonts(bool fullscreen_fonts);
static ImFont* AddTextFont(float size); static ImFont* AddTextFont(float size, bool full_range);
static ImFont* AddFixedFont(float size); static ImFont* AddFixedFont(float size);
static bool AddIconFonts(float size); static bool AddIconFonts(float size);
static void AcquirePendingOSDMessages(); static void AcquirePendingOSDMessages();
@ -419,7 +419,7 @@ bool ImGuiManager::LoadFontData()
return true; return true;
} }
ImFont* ImGuiManager::AddTextFont(float size) ImFont* ImGuiManager::AddTextFont(float size, bool full_range)
{ {
static const ImWchar default_ranges[] = { static const ImWchar default_ranges[] = {
// Basic Latin + Latin Supplement + Central European diacritics // Basic Latin + Latin Supplement + Central European diacritics
@ -445,7 +445,7 @@ ImFont* ImGuiManager::AddTextFont(float size)
cfg.FontDataOwnedByAtlas = false; cfg.FontDataOwnedByAtlas = false;
return ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_standard_font_data.data(), return ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_standard_font_data.data(),
static_cast<int>(s_standard_font_data.size()), size, &cfg, static_cast<int>(s_standard_font_data.size()), size, &cfg,
s_font_range ? s_font_range : default_ranges); (s_font_range && full_range) ? s_font_range : default_ranges);
} }
ImFont* ImGuiManager::AddFixedFont(float size) ImFont* ImGuiManager::AddFixedFont(float size)
@ -478,7 +478,7 @@ bool ImGuiManager::AddImGuiFonts(bool fullscreen_fonts)
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
io.Fonts->Clear(); io.Fonts->Clear();
s_standard_font = AddTextFont(standard_font_size); s_standard_font = AddTextFont(standard_font_size, true);
if (!s_standard_font || !AddIconFonts(standard_font_size)) if (!s_standard_font || !AddIconFonts(standard_font_size))
return false; return false;
@ -488,13 +488,14 @@ bool ImGuiManager::AddImGuiFonts(bool fullscreen_fonts)
if (fullscreen_fonts) if (fullscreen_fonts)
{ {
// Don't add full range for FSUI, we probably don't have the texture space, and it's not translated yet anyway.
const float medium_font_size = std::ceil(ImGuiFullscreen::LayoutScale(ImGuiFullscreen::LAYOUT_MEDIUM_FONT_SIZE)); const float medium_font_size = std::ceil(ImGuiFullscreen::LayoutScale(ImGuiFullscreen::LAYOUT_MEDIUM_FONT_SIZE));
s_medium_font = AddTextFont(medium_font_size); s_medium_font = AddTextFont(medium_font_size, false);
if (!s_medium_font || !AddIconFonts(medium_font_size)) if (!s_medium_font || !AddIconFonts(medium_font_size))
return false; return false;
const float large_font_size = std::ceil(ImGuiFullscreen::LayoutScale(ImGuiFullscreen::LAYOUT_LARGE_FONT_SIZE)); const float large_font_size = std::ceil(ImGuiFullscreen::LayoutScale(ImGuiFullscreen::LAYOUT_LARGE_FONT_SIZE));
s_large_font = AddTextFont(large_font_size); s_large_font = AddTextFont(large_font_size, false);
if (!s_large_font || !AddIconFonts(large_font_size)) if (!s_large_font || !AddIconFonts(large_font_size))
return false; return false;
} }