Files
LookingGlass/idd/LGIdd/CSettings.h
Geoffrey McRae e9b7bdfea1 Revert "[all] refresh copyright"
Corrupted IDD sources due to lack of UTF-8 with BOM support in the
script.
2026-05-31 15:10:44 +10:00

32 lines
692 B
C++

#pragma once
#include <windows.h>
#include <vector>
#include <string>
class CSettings
{
public:
struct DisplayMode
{
unsigned width;
unsigned height;
unsigned refresh;
bool preferred;
};
typedef std::vector<DisplayMode> DisplayModes;
CSettings();
void LoadModes();
const DisplayModes& GetDisplayModes() { return m_displayModes; }
void SetExtraMode(const DisplayMode & mode);
bool GetExtraMode(DisplayMode & mode);
private:
DisplayModes m_displayModes;
bool ReadModesValue(std::vector<std::wstring> &out) const;
bool ParseModeString(const std::wstring& in, DisplayMode& out);
};
extern CSettings g_settings;