mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-23 06:17:19 +03:00
feat(gx): add GxAdapterMonitorModes
This commit is contained in:
1 parent
749273e217
commit
a06d989d30
12 files changed
+231
-7
No files matched your search
@@ -0,0 +1,14 @@
|
||||
#include "gx/win/Display.hpp"
|
||||
|
||||
int32_t FindDisplayDevice(PDISPLAY_DEVICE device, uint32_t flag) {
|
||||
device->cb = sizeof(DISPLAY_DEVICE);
|
||||
|
||||
DWORD deviceNum = 0;
|
||||
while (EnumDisplayDevices(nullptr, deviceNum++, device, 0)) {
|
||||
if ((device->StateFlags & flag) == flag) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef GX_WIN_DISPLAY_HPP
|
||||
#define GX_WIN_DISPLAY_HPP
|
||||
|
||||
#include <windows.h>
|
||||
#include <cstdint>
|
||||
|
||||
int32_t FindDisplayDevice(PDISPLAY_DEVICE device, uint32_t flag);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user