mirror of
https://github.com/glfw/glfw.git
synced 2026-08-28 02:35:54 +02:00
Made glfwGetVideoMode return a GLFWvidmode.
This commit is contained in:
@@ -346,8 +346,7 @@ void monitor_callback(GLFWmonitor* monitor, int event)
|
||||
{
|
||||
if (event == GLFW_CONNECTED)
|
||||
{
|
||||
GLFWvidmode mode;
|
||||
glfwGetVideoMode(monitor, &mode);
|
||||
GLFWvidmode mode = glfwGetVideoMode(monitor);
|
||||
|
||||
printf("%08x at %0.3f: Monitor %s (%ix%i at %ix%i, %ix%i mm) was connected\n",
|
||||
counter++,
|
||||
|
||||
@@ -130,8 +130,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if (monitor)
|
||||
{
|
||||
GLFWvidmode mode;
|
||||
glfwGetVideoMode(monitor, &mode);
|
||||
GLFWvidmode mode = glfwGetVideoMode(monitor);
|
||||
width = mode.width;
|
||||
height = mode.height;
|
||||
}
|
||||
|
||||
@@ -125,8 +125,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if (monitor)
|
||||
{
|
||||
GLFWvidmode mode;
|
||||
glfwGetVideoMode(monitor, &mode);
|
||||
GLFWvidmode mode = glfwGetVideoMode(monitor);
|
||||
width = mode.width;
|
||||
height = mode.height;
|
||||
}
|
||||
|
||||
@@ -93,11 +93,9 @@ static void key_callback(GLFWwindow* window, int key, int action)
|
||||
static void list_modes(GLFWmonitor* monitor)
|
||||
{
|
||||
int count, widthMM, heightMM, dpi, i;
|
||||
GLFWvidmode mode;
|
||||
GLFWvidmode mode = glfwGetVideoMode(monitor);
|
||||
const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);
|
||||
|
||||
glfwGetVideoMode(monitor, &mode);
|
||||
|
||||
printf("Name: %s (%s)\n",
|
||||
glfwGetMonitorName(monitor),
|
||||
glfwGetPrimaryMonitor() == monitor ? "primary" : "secondary");
|
||||
|
||||
Reference in New Issue
Block a user