97 void ResetInvalidSettings();
99 struct CaseInsensitiveLess {
101 using is_transparent = void;
The settings of BossRally.ini.
Definition config.h:18
long GetInteger(std::string_view section, std::string_view key, long fallback) const
bool Save(const std::filesystem::path &path) const
Atomically replace path under a process lock.
void Set(std::string_view section, std::string_view key, std::string value)
Store a value, replacing any value of the same key.
static GameConfig Load(const std::filesystem::path &path)
Read path.
int GetIndex(std::string_view section, std::string_view key, std::size_t count, int fallback) const
float GetFloat(std::string_view section, std::string_view key, float fallback) const
std::optional< std::string > Get(std::string_view section, std::string_view key) const
static GameConfig Parse(std::string_view text)
Parse INI section headers, Key=Value lines, and comments that start with ; or #.
bool GetBoolean(std::string_view section, std::string_view key, bool fallback) const
Definition assetimport.h:11
std::optional< float > ParseAspectRatio(std::string_view text)
Read a finite, positive aspect ratio or an automatic-sizing setting.
std::array< int, 2 > ScaleFrameResolution(int width, int height, float scale, float aspect)
Scale window dimensions and fit an aspect ratio before bounded integer conversion.
std::array< int, 2 > ExpandInternalResolution(int width, int height, float aspect)
Expand a resolution to an aspect ratio, with minimum dimensions of 320x240.