这是我的简单代码。
#include <iostream>
#include <GLFW/glfw3.h>
int main() {
int count;
GLFWmonitor** monitors = glfwGetMonitors(&count);
std::cout << count << std::endl;
return 0;
}
由于某些原因,它一直告诉我显示器数量为0。我估计0意味着实际上有1个。但我连接了另外两个显示器到我的电脑。当我进入系统偏好设置时,我可以清楚地看到其他两个显示器。但我不知道为什么它一直告诉我是0。我完全不知道问题出在哪里。