Merge pull request #2922 from impiaaa/nonachievement

Achievements: Fix building Qt frontend with achievements disabled
This commit is contained in:
Connor McLaughlin 2022-11-15 18:54:57 +10:00 committed by GitHub
commit a883652616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 3 deletions

View file

@ -343,6 +343,7 @@ void Settings::Load(SettingsInterface& si)
memory_card_paths[1] = si.GetStringValue("MemoryCards", "Card2Path", "");
memory_card_use_playlist_title = si.GetBoolValue("MemoryCards", "UsePlaylistTitle", true);
#ifdef WITH_CHEEVOS
achievements_enabled = si.GetBoolValue("Cheevos", "Enabled", false);
achievements_test_mode = si.GetBoolValue("Cheevos", "TestMode", false);
achievements_unofficial_test_mode = si.GetBoolValue("Cheevos", "UnofficialTestMode", false);
@ -353,6 +354,7 @@ void Settings::Load(SettingsInterface& si)
achievements_notifications = si.GetBoolValue("Cheevos", "Notifications", true);
achievements_sound_effects = si.GetBoolValue("Cheevos", "SoundEffects", true);
achievements_primed_indicators = si.GetBoolValue("Cheevos", "PrimedIndicators", true);
#endif
log_level = ParseLogLevelName(si.GetStringValue("Logging", "LogLevel", GetLogLevelName(DEFAULT_LOG_LEVEL)).c_str())
.value_or(DEFAULT_LOG_LEVEL);
@ -530,6 +532,7 @@ void Settings::Save(SettingsInterface& si) const
si.SetStringValue("ControllerPorts", "MultitapMode", GetMultitapModeName(multitap_mode));
#ifdef WITH_CHEEVOS
si.SetBoolValue("Cheevos", "Enabled", achievements_enabled);
si.SetBoolValue("Cheevos", "TestMode", achievements_test_mode);
si.SetBoolValue("Cheevos", "UnofficialTestMode", achievements_unofficial_test_mode);
@ -540,6 +543,7 @@ void Settings::Save(SettingsInterface& si) const
si.SetBoolValue("Cheevos", "Notifications", achievements_notifications);
si.SetBoolValue("Cheevos", "SoundEffects", achievements_sound_effects);
si.SetBoolValue("Cheevos", "PrimedIndicators", achievements_primed_indicators);
#endif
si.SetStringValue("Logging", "LogLevel", GetLogLevelName(log_level));
si.SetStringValue("Logging", "LogFilter", log_filter.c_str());

View file

@ -5,6 +5,7 @@
#include "common/assert.h"
#include "common/file_system.h"
#include "common/log.h"
#include "core/achievements.h"
#include "core/host.h"
#include "core/host_display.h"
#include "core/memory_card.h"

View file

@ -1,6 +1,4 @@
add_library(frontend-common
achievements.cpp
achievements.h
common_host.cpp
common_host.h
fullscreen_ui.cpp

View file

@ -11,6 +11,7 @@
#include "common/string_util.h"
#include "common/threading.h"
#include "common_host.h"
#include "core/achievements.h"
#include "core/bios.h"
#include "core/cheats.h"
#include "core/controller.h"

View file

@ -1,6 +1,5 @@
#include "imgui_overlays.h"
#include "IconsFontAwesome5.h"
#include "achievements.h"
#include "common/assert.h"
#include "common/file_system.h"
#include "common/log.h"