Get screen resolution in Windows
This commit is contained in:
parent
d4fa9f89d6
commit
9250dad9ce
|
@ -2,6 +2,8 @@
|
|||
|
||||
#ifndef _WIN32
|
||||
#include <X11/Xlib.h>
|
||||
#else // _WIN32
|
||||
#include <windows.h>
|
||||
#endif // _WIN32
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -17,7 +19,7 @@ Dimension getScreenDimensions(void)
|
|||
free(d);
|
||||
free(s);
|
||||
#else // _WIN32
|
||||
Dimension dim = (Dimension) { 1920, 1080 };
|
||||
Dimension dim = (Dimension) { GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) };
|
||||
#endif // _WIN32
|
||||
|
||||
return dim;
|
||||
|
|
Loading…
Reference in New Issue