[idd] helper: load default mode list with default refresh rate

After 882d531792, the existing code in the
helper reads past the end of the array for refresh rate, which is broken.

This PR also refactors the default modes into a getDefaultModes method so
that it can be used for a reset feature later.
This commit is contained in:
Quantum
2026-06-03 01:50:15 -04:00
committed by Geoffrey McRae
parent 3ef8344e9f
commit cb70643fa4
2 changed files with 20 additions and 13 deletions

View File

@@ -44,6 +44,7 @@ public:
LSTATUS open();
bool isOpen() { return !!hKey; }
std::vector<DisplayMode> getDefaultModes();
std::optional<std::vector<DisplayMode>> getModes();
LSTATUS setModes(const std::vector<DisplayMode> &modes);