1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
DDrawCompat/DDrawCompat/Win32/DisplayMode.h
2023-11-05 14:21:19 +01:00

52 lines
927 B
C++

#pragma once
#include <tuple>
#include <Windows.h>
#include <Common/Comparison.h>
namespace Win32
{
namespace DisplayMode
{
struct DisplayMode
{
DWORD width;
DWORD height;
DWORD bpp;
DWORD refreshRate;
};
struct EmulatedDisplayMode : DisplayMode
{
std::wstring deviceName;
RECT rect;
SIZE diff;
};
struct Resolution
{
SIZE app;
SIZE display;
};
SIZE getAppResolution(const std::wstring& deviceName);
DWORD getBpp();
SIZE getDisplayResolution(const std::wstring& deviceName);
EmulatedDisplayMode getEmulatedDisplayMode();
MONITORINFOEXW getMonitorInfo(const std::wstring& deviceName);
Resolution getResolution(const std::wstring& deviceName);
ULONG queryDisplaySettingsUniqueness();
void installHooks();
using ::operator<;
inline auto toTuple(const DisplayMode& dm)
{
return std::make_tuple(dm.width, dm.height, dm.bpp, dm.refreshRate);
}
}
}