Files
LookingGlass/idd/LGIdd/CSettings.h
Geoffrey McRae 8120f73cc6
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
[idd] driver: CSettings minor refactor
2025-12-01 14:35:38 +11:00

33 lines
771 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;
std::wstring ReadStringValue(const wchar_t* name, const wchar_t* default);
bool ReadModesValue(std::vector<std::wstring> &out) const;
bool ParseModeString(const std::wstring& in, DisplayMode& out);
};
extern CSettings g_settings;