소스 검색

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

pull/1492/head
Jeffery Myers 4 년 전
committed by GitHub
부모
커밋
24b6dcf29f
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. +10
    -1
      src/core.c

+ 10
- 1
src/core.c 파일 보기

@ -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

불러오는 중...
취소
저장