diff --git a/Common/File/FileUtil.cpp b/Common/File/FileUtil.cpp index 164647de3f..9ecc2904a6 100644 --- a/Common/File/FileUtil.cpp +++ b/Common/File/FileUtil.cpp @@ -150,7 +150,7 @@ FILE *OpenCFile(const Path &path, const char *mode) { case PathType::CONTENT_URI: // We're gonna need some error codes.. if (!strcmp(mode, "r") || !strcmp(mode, "rb") || !strcmp(mode, "rt")) { - INFO_LOG(Log::IO, "Opening content file for read: '%s'", path.c_str()); + DEBUG_LOG(Log::IO, "Opening content file for read: '%s'", path.c_str()); // Read, let's support this - easy one. int descriptor = Android_OpenContentUriFd(path.ToString(), Android_OpenContentUriMode::READ); if (descriptor < 0) { @@ -163,7 +163,7 @@ FILE *OpenCFile(const Path &path, const char *mode) { // This is also a terrible possible data race, ugh. Anyway... // Not exactly sure which abstractions are best, let's start simple. if (!File::Exists(path)) { - INFO_LOG(Log::IO, "OpenCFile(%s): Opening content file for write. Doesn't exist, creating empty and reopening.", path.c_str()); + DEBUG_LOG(Log::IO, "OpenCFile(%s): Opening content file for write. Doesn't exist, creating empty and reopening.", path.c_str()); std::string name = path.GetFilename(); if (path.CanNavigateUp()) { Path parent = path.NavigateUp(); @@ -176,7 +176,7 @@ FILE *OpenCFile(const Path &path, const char *mode) { return nullptr; } } else { - INFO_LOG(Log::IO, "OpenCFile(%s): Opening existing content file for write (truncating). Requested mode: '%s'", path.c_str(), mode); + DEBUG_LOG(Log::IO, "OpenCFile(%s): Opening existing content file for write (truncating). Requested mode: '%s'", path.c_str(), mode); } // TODO: Support append modes and stuff... For now let's go with the most common one. diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index ddfc8a01e6..5be3b26f52 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -737,9 +737,16 @@ void GameSettingsScreen::CreateAudioSettings(UI::ViewGroup *audioSettings) { uiVolume->SetZeroLabel(a->T("Mute")); uiVolume->SetLiveUpdate(true); uiVolume->OnChange.Add([](UI::EventParams &e) { + static double lastTimePlayed = 0.0; + double now = time_now_d(); + if (now - lastTimePlayed < 0.1) { + return; // Don't play if we just played one, to avoid spamming when dragging. + } + lastTimePlayed = now; // Audio preview PlayUISound(UI::UISound::CONFIRM); }); + uiVolume->SetEnabledPtr(&g_Config.iUIVolume); PopupSliderChoice *gamePreviewVolume = audioSettings->Add(new PopupSliderChoice(&g_Config.iGamePreviewVolume, VOLUME_OFF, VOLUMEHI_FULL, Config::GetDefaultValueInt(&g_Config.iGamePreviewVolume), a->T("Game preview volume"), screenManager())); gamePreviewVolume->SetFormat("%d%%");