Review formating for latest PR
This commit is contained in:
parent
6be1be4573
commit
090c790e50
2 changed files with 10 additions and 12 deletions
18
src/core.c
18
src/core.c
|
@ -1528,7 +1528,7 @@ Vector2 GetMonitorPosition(int monitor)
|
||||||
return (Vector2){ 0, 0 };
|
return (Vector2){ 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get selected monitor width
|
// Get selected monitor width (max available by monitor)
|
||||||
int GetMonitorWidth(int monitor)
|
int GetMonitorWidth(int monitor)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
@ -1540,17 +1540,16 @@ int GetMonitorWidth(int monitor)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
const GLFWvidmode *modes = glfwGetVideoModes(monitors[monitor], &count);
|
const GLFWvidmode *modes = glfwGetVideoModes(monitors[monitor], &count);
|
||||||
|
|
||||||
if(count > 0)
|
// We return the maximum resolution available, the last one in the modes array
|
||||||
{
|
if (count > 0) return modes[count - 1].width;
|
||||||
return modes[count - 1].width;
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
|
||||||
} else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
|
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get selected monitor width
|
// Get selected monitor width (max available by monitor)
|
||||||
int GetMonitorHeight(int monitor)
|
int GetMonitorHeight(int monitor)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
@ -1562,10 +1561,9 @@ int GetMonitorHeight(int monitor)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
const GLFWvidmode *modes = glfwGetVideoModes(monitors[monitor], &count);
|
const GLFWvidmode *modes = glfwGetVideoModes(monitors[monitor], &count);
|
||||||
|
|
||||||
if(count > 0)
|
// We return the maximum resolution available, the last one in the modes array
|
||||||
{
|
if (count > 0) return modes[count - 1].height;
|
||||||
return modes[count - 1].height;
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
|
||||||
} else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
|
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -921,8 +921,8 @@ RLAPI int GetScreenHeight(void); // Get current
|
||||||
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
||||||
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
||||||
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
||||||
RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width
|
RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (max available by monitor)
|
||||||
RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height
|
RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (max available by monitor)
|
||||||
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specified monitor physical width in millimetres
|
RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specified monitor physical width in millimetres
|
||||||
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
||||||
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue