// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <[email protected]>1// SPDX-License-Identifier: CC-BY-NC-ND-4.023#pragma once45#include "core.h"67class Error;89namespace Core {1011/// Based on the current configuration, determines what the data directory is.12bool SetCriticalFolders(const char* resources_subdir, Error* error);1314#ifndef __ANDROID__1516/// Returns the path to the configuration file.17/// We split this out so it can be retrieved by the host for error message purposes,18/// and so that regtest can override with no-config.19std::string GetBaseSettingsPath();2021/// Loads the configuration file.22bool InitializeBaseSettingsLayer(std::string settings_path, Error* error);2324/// Saves the configuration file.25bool SaveBaseSettingsLayer(Error* error);2627/// Restores default settings.28void SetDefaultSettings(bool host, bool system, bool controller);2930#else3132/// Sets the base settings layer. Should be called by the host at initialization time.33void SetBaseSettingsLayer(SettingsInterface* sif);3435#endif // __ANDROID__3637/// Sets the game settings layer. Called by System when the game changes.38void SetGameSettingsLayer(SettingsInterface* sif, std::unique_lock<std::mutex>& lock);3940/// Sets the input profile settings layer. Called by System when the game changes.41void SetInputSettingsLayer(SettingsInterface* sif, std::unique_lock<std::mutex>& lock);4243} // namespace Core4445namespace Host {4647#ifndef __ANDROID__4849/// Sets host-specific default settings.50void SetDefaultSettings(SettingsInterface& si);5152/// Called when settings have been reset.53void OnSettingsResetToDefault(bool host, bool system, bool controller);5455#endif // __ANDROID__5657} // namespace Host585960