Explorar el Código

lookup the returned monitor in the list of monitors to get an index. (#1490)

pull/1492/head
Jeffery Myers hace 4 años
cometido por GitHub
padre
commit
24b6dcf29f
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  1. +10
    -1
      src/core.c

+ 10
- 1
src/core.c Ver fichero

@ -1456,7 +1456,16 @@ int GetMonitorCount(void)
int GetCurrentMonitor(void)
{
#if defined(PLATFORM_DESKTOP)
return glfwGetWindowMonitor(CORE.Window.handle);
int monitorCount;
GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);
GLFWmonitor* monitor = glfwGetWindowMonitor(CORE.Window.handle);
for (int i = 0; i < monitorCount; i++)
{
if (monitors[i] == monitor)
return i;
}
return 0;
#else
return 0;
#endif

Cargando…
Cancelar
Guardar