ソースを参照

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

pull/1492/head
Jeffery Myers 4年前
committed by GitHub
コミット
24b6dcf29f
この署名に対応する既知のキーがデータベースに存在しません 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

読み込み中…
キャンセル
保存