Forgot #else in platform check
- Added else so return not compiled twice.
This commit is contained in:
parent
ed95337eb8
commit
6b84b76b70
18
src/core.c
18
src/core.c
@ -777,8 +777,9 @@ int GetMonitorCount(void)
|
|||||||
int monitorCount;
|
int monitorCount;
|
||||||
glfwGetMonitors(&monitorCount);
|
glfwGetMonitors(&monitorCount);
|
||||||
return monitorCount;
|
return monitorCount;
|
||||||
#endif
|
#else
|
||||||
return 1;
|
return 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get primary monitor width
|
// Get primary monitor width
|
||||||
@ -788,8 +789,9 @@ int GetMonitorWidth(void)
|
|||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
const GLFWvidmode * mode = glfwGetVideoMode(monitor);
|
const GLFWvidmode * mode = glfwGetVideoMode(monitor);
|
||||||
return mode->width;
|
return mode->width;
|
||||||
#endif
|
#else
|
||||||
return GetScreenWidth();
|
return GetScreenWidth();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get primary monitor height
|
// Get primary monitor height
|
||||||
@ -799,8 +801,9 @@ int GetMonitorHeight(void)
|
|||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
const GLFWvidmode * mode = glfwGetVideoMode(monitor);
|
const GLFWvidmode * mode = glfwGetVideoMode(monitor);
|
||||||
return mode->height;
|
return mode->height;
|
||||||
#endif
|
#else
|
||||||
return GetScreenHeight();
|
return GetScreenHeight();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get primary montior physical width in millimetres
|
// Get primary montior physical width in millimetres
|
||||||
@ -811,8 +814,9 @@ int GetMonitorPhysicalWidth(void)
|
|||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
glfwGetMonitorPhysicalSize(monitor, &physicalWidth, NULL);
|
glfwGetMonitorPhysicalSize(monitor, &physicalWidth, NULL);
|
||||||
return physicalWidth;
|
return physicalWidth;
|
||||||
#endif
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get primary monitor physical height in millimetres
|
// Get primary monitor physical height in millimetres
|
||||||
@ -823,8 +827,9 @@ int GetMonitorPhysicalHeight(void)
|
|||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
glfwGetMonitorPhysicalSize(monitor, NULL, &physicalHeight);
|
glfwGetMonitorPhysicalSize(monitor, NULL, &physicalHeight);
|
||||||
return physicalHeight;
|
return physicalHeight;
|
||||||
#endif
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the human-readable, UTF-8 encoded name of the primary monitor
|
// Get the human-readable, UTF-8 encoded name of the primary monitor
|
||||||
@ -833,8 +838,9 @@ const char *GetMonitorName(void)
|
|||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
return glfwGetMonitorName(monitor);
|
return glfwGetMonitorName(monitor);
|
||||||
#endif
|
#else
|
||||||
return "";
|
return "";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show mouse cursor
|
// Show mouse cursor
|
||||||
|
Loading…
Reference in New Issue
Block a user