[idd] driver; support custom resolution and refresh rate list

Custom modes can now be configured via the registry under

HKEY_LOCAL_MACHINE\SOFTWARE\LookingGlass\IDD

Create the value "Modes" as a REG_MULTI_SZ with the value as
a list of modes, for example:

1024x768@60
1920x1080@60
1920x1080@120*

The '*' denotes the preferred mode to default to if one has not
been selected by the user.
This commit is contained in:
Geoffrey McRae
2025-08-30 18:02:55 +00:00
parent 5a4a2529af
commit 16a283717a
5 changed files with 36 additions and 52 deletions

View File

@@ -26,6 +26,7 @@
#include <vector>
#include "CIVSHMEM.h"
#include "CSettings.h"
extern "C" {
#include "lgmp/host.h"
@@ -87,16 +88,10 @@ private:
void LGMPTimer();
void ResendCursor();
struct DisplayMode
{
unsigned width;
unsigned height;
unsigned refresh;
bool preferred;
};
std::vector<DisplayMode> m_displayModes;
DisplayMode m_customMode = {};
bool m_setCustomMode = false;
CSettings::DisplayModes m_displayModes;
CSettings::DisplayMode m_setMode;
bool m_doSetMode;
public:
CIndirectDeviceContext(_In_ WDFDEVICE wdfDevice) :
@@ -106,7 +101,7 @@ public:
bool SetupLGMP(size_t alignSize);
void PopulateDefaultModes(bool setDefaultMode);
void PopulateDefaultModes();
void InitAdapter();
void FinishInit(UINT connectorIndex);
void ReplugMonitor();