Misc: Fix various warnings

This commit is contained in:
Connor McLaughlin 2022-10-03 23:20:03 +10:00
parent a9038133c8
commit f25d7f6e09
4 changed files with 5 additions and 12 deletions

View File

@ -2288,7 +2288,7 @@ void System::UpdateDisplaySync()
const bool video_sync_enabled = ShouldUseVSync();
const bool syncing_to_host_vsync = (s_syncing_to_host && video_sync_enabled && s_display_all_frames);
const float max_display_fps = (s_throttler_enabled || s_syncing_to_host) ? 0.0f : g_settings.display_max_fps;
Log_VerbosePrintf("Using vsync: %s", video_sync_enabled ? "YES" : "NO",
Log_VerbosePrintf("Using vsync: %s%s", video_sync_enabled ? "YES" : "NO",
syncing_to_host_vsync ? " (for throttling)" : "");
Log_VerbosePrintf("Max display fps: %f (%s)", max_display_fps,
s_display_all_frames ? "displaying all frames" : "skipping displaying frames when needed");

View File

@ -105,7 +105,7 @@ GeneralSettingsWidget::GeneralSettingsWidget(SettingsDialog* dialog, QWidget* pa
AutoUpdaterDialog::getDefaultTag());
m_ui.autoUpdateCurrentVersion->setText(tr("%1 (%2)").arg(g_scm_tag_str).arg(g_scm_date_str));
connect(m_ui.checkForUpdates, &QPushButton::clicked, [this]() { g_main_window->checkForUpdates(true); });
connect(m_ui.checkForUpdates, &QPushButton::clicked, []() { g_main_window->checkForUpdates(true); });
}
else
{

View File

@ -76,7 +76,7 @@ void PostProcessingShaderConfigWidget::createUi()
slider->setSingleStep(1);
slider->setTickInterval(step_value);
slider->setValue((option.value[i].int_value - option.min_value[i].int_value) / step_value);
connect(slider, &QSlider::valueChanged, [this, &option, i, slider_label, step_value](int value) {
connect(slider, &QSlider::valueChanged, [this, &option, i, slider_label](int value) {
const int new_value = std::clamp(option.min_value[i].int_value + (value * option.step_value[i].int_value),
option.min_value[i].int_value, option.max_value[i].int_value);
option.value[i].int_value = new_value;
@ -105,7 +105,7 @@ void PostProcessingShaderConfigWidget::createUi()
slider->setTickInterval(step_value);
slider->setValue(
static_cast<int>((option.value[i].float_value - option.min_value[i].float_value) / step_value));
connect(slider, &QSlider::valueChanged, [this, &option, i, slider_label, step_value](int value) {
connect(slider, &QSlider::valueChanged, [this, &option, i, slider_label](int value) {
const float new_value = std::clamp(option.min_value[i].float_value +
(static_cast<float>(value) * option.step_value[i].float_value),
option.min_value[i].float_value, option.max_value[i].float_value);

View File

@ -44,8 +44,6 @@ Log_SetChannel(FullscreenUI);
#ifdef WITH_CHEEVOS
#include "achievements.h"
#endif
static constexpr float LAYOUT_MAIN_MENU_BAR_SIZE = 20.0f; // Should be DPI scaled, not layout scaled!
static constexpr s32 MAX_SAVE_STATE_SLOTS = 10;
using ImGuiFullscreen::g_large_font;
using ImGuiFullscreen::g_layout_padding_left;
@ -252,7 +250,6 @@ static void DoToggleAnalogMode();
//////////////////////////////////////////////////////////////////////////
static constexpr double INPUT_BINDING_TIMEOUT_SECONDS = 5.0;
static constexpr u32 NUM_MEMORY_CARD_PORTS = 2;
static void SwitchToSettings();
static void SwitchToGameSettings();
@ -1154,7 +1151,7 @@ void FullscreenUI::DrawLandingWindow()
ImGui::SetCursorPos(ImVec2(ImGui::GetWindowWidth() - rev_size.x - LayoutScale(20.0f),
ImGui::GetWindowHeight() - rev_size.y - LayoutScale(20.0f)));
ImGui::PushFont(g_medium_font);
ImGui::Text(g_scm_tag_str);
ImGui::TextUnformatted(g_scm_tag_str);
ImGui::PopFont();
}
@ -4344,9 +4341,6 @@ void FullscreenUI::DrawResumeStateSelector()
bool is_open = true;
if (ImGui::BeginPopupModal("Load Resume State", &is_open, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize))
{
static constexpr float max_image_width = 96.0f;
static constexpr float max_image_height = 96.0f;
const SaveStateListEntry& entry = s_save_state_selector_slots.front();
ImGui::TextWrapped("A resume save state created at %s was found.\n\nDo you want to load this save and continue?",
TimeToPrintableString(entry.timestamp).c_str());
@ -5794,7 +5788,6 @@ void FullscreenUI::DrawLeaderboardsWindow()
float right = bb.Max.x - padding;
float top = bb.Min.y + padding;
SmallString text;
ImVec2 text_size;
const u32 leaderboard_count = Achievements::GetLeaderboardCount();