Add GetMonitorScale()
This commit is contained in:
parent
11429b48eb
commit
626ef8f9d2
|
|
@ -480,6 +480,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -921,6 +921,19 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return refresh;
|
return refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
Vector2 scale = { 1.0f, 1.0f };
|
||||||
|
int monitorCount = 0;
|
||||||
|
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
|
||||||
|
|
||||||
|
if ((monitor >= 0) && (monitor < monitorCount)) glfwGetMonitorContentScale(monitors[monitor], &scale.x, &scale.y);
|
||||||
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||||
|
|
||||||
|
return scale;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -629,6 +629,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1036,6 +1036,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return refresh;
|
return refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return refresh;
|
return refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -751,6 +751,13 @@ int GetMonitorRefreshRate(int monitor)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get specified monitor scale
|
||||||
|
Vector2 GetMonitorScale(int monitor)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetMonitorScale() not implemented on target platform");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
// Get the human-readable, UTF-8 encoded name of the selected monitor
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1006,6 +1006,7 @@ RLAPI int GetMonitorHeight(int monitor); // Get specifi
|
||||||
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
|
||||||
|
RLAPI Vector2 GetMonitorScale(int monitor); // Get specified monitor scale
|
||||||
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
||||||
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
||||||
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user