mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 19:42:00 +00:00
Formatting.
This commit is contained in:
parent
3817771a40
commit
1bc91bfe5b
@ -202,12 +202,12 @@ struct _GLFWwindow
|
||||
struct _GLFWwindow* next;
|
||||
|
||||
// Window settings and state
|
||||
GLboolean iconified; // GL_TRUE if this window is iconified
|
||||
GLboolean closeRequested; // GL_TRUE if this window should be closed
|
||||
int width, height;
|
||||
int positionX, positionY;
|
||||
GLboolean resizable; // GL_TRUE if user may resize this window
|
||||
GLboolean visible; // GL_TRUE if this window is visible
|
||||
GLboolean iconified;
|
||||
GLboolean resizable;
|
||||
GLboolean visible;
|
||||
GLboolean closeRequested;
|
||||
void* userPointer;
|
||||
_GLFWmonitor* monitor;
|
||||
|
||||
@ -256,12 +256,10 @@ struct _GLFWmonitor
|
||||
|
||||
GLboolean primary;
|
||||
|
||||
// physical dimensions in millimeters.
|
||||
int physicalWidth;
|
||||
int physicalHeight;
|
||||
// logical orientation of the screen on the desktop
|
||||
int positionX;
|
||||
int positionY;
|
||||
// Physical dimensions in millimeters.
|
||||
int widthMM, heightMM;
|
||||
// Logical orientation of the screen on the desktop
|
||||
int positionX, positionY;
|
||||
|
||||
GLFWvidmode* modes;
|
||||
int modeCount;
|
||||
@ -706,7 +704,7 @@ GLboolean _glfwIsValidContext(_GLFWwndconfig* wndconfig);
|
||||
*/
|
||||
_GLFWmonitor* _glfwCreateMonitor(const char* name,
|
||||
GLboolean primary,
|
||||
int physicalWidth, int physicalHeight,
|
||||
int widthMM, int heightMM,
|
||||
int x, int y);
|
||||
|
||||
/*! @ingroup utility
|
||||
|
@ -81,7 +81,7 @@ static int compareVideoModes(const void* firstPtr, const void* secondPtr)
|
||||
|
||||
_GLFWmonitor* _glfwCreateMonitor(const char* name,
|
||||
GLboolean primary,
|
||||
int physicalWidth, int physicalHeight,
|
||||
int widthMM, int heightMM,
|
||||
int x, int y)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
|
||||
@ -93,8 +93,8 @@ _GLFWmonitor* _glfwCreateMonitor(const char* name,
|
||||
|
||||
monitor->name = strdup(name);
|
||||
monitor->primary = primary;
|
||||
monitor->physicalWidth = physicalWidth;
|
||||
monitor->physicalHeight = physicalHeight;
|
||||
monitor->widthMM = widthMM;
|
||||
monitor->heightMM = heightMM;
|
||||
monitor->positionX = x;
|
||||
monitor->positionY = y;
|
||||
|
||||
@ -357,9 +357,9 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor handle, int param)
|
||||
switch (param)
|
||||
{
|
||||
case GLFW_MONITOR_WIDTH_MM:
|
||||
return monitor->physicalWidth;
|
||||
return monitor->widthMM;
|
||||
case GLFW_MONITOR_HEIGHT_MM:
|
||||
return monitor->physicalHeight;
|
||||
return monitor->heightMM;
|
||||
case GLFW_MONITOR_POS_X:
|
||||
return monitor->positionX;
|
||||
case GLFW_MONITOR_POS_Y:
|
||||
|
@ -157,8 +157,8 @@ typedef struct _GLFWwindowWin32
|
||||
//------------------------------------------------------------------------
|
||||
typedef struct _GLFWlibraryWin32
|
||||
{
|
||||
HINSTANCE instance; // Instance of the application
|
||||
ATOM classAtom; // Window class atom
|
||||
HINSTANCE instance;
|
||||
ATOM classAtom;
|
||||
DWORD foregroundLockTimeout;
|
||||
char* clipboardString;
|
||||
|
||||
|
@ -224,7 +224,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
||||
{
|
||||
XRROutputInfo* oi;
|
||||
XRRCrtcInfo* ci;
|
||||
int physicalWidth, physicalHeight;
|
||||
int widthMM, heightMM;
|
||||
|
||||
oi = XRRGetOutputInfo(_glfw.x11.display, sr, sr->outputs[i]);
|
||||
if (oi->connection != RR_Connected)
|
||||
@ -235,22 +235,20 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
||||
|
||||
if (oi->mm_width && oi->mm_height)
|
||||
{
|
||||
physicalWidth = oi->mm_width;
|
||||
physicalHeight = oi->mm_height;
|
||||
widthMM = oi->mm_width;
|
||||
heightMM = oi->mm_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
physicalWidth = DisplayWidthMM(_glfw.x11.display,
|
||||
_glfw.x11.screen);
|
||||
physicalHeight = DisplayHeightMM(_glfw.x11.display,
|
||||
_glfw.x11.screen);
|
||||
widthMM = DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen);
|
||||
heightMM = DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);
|
||||
}
|
||||
|
||||
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc);
|
||||
|
||||
monitors[found] = _glfwCreateMonitor(oi->name,
|
||||
sr->outputs[i] == primary,
|
||||
physicalWidth, physicalHeight,
|
||||
widthMM, heightMM,
|
||||
ci->x, ci->y);
|
||||
|
||||
XRRFreeCrtcInfo(ci);
|
||||
|
Loading…
Reference in New Issue
Block a user