From acaddf9cd95d488eb71b71861327603dda916576 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 26 Jan 2015 06:17:58 +0100 Subject: [PATCH] Added decimals to DPI reported by monitor test. --- tests/monitors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/monitors.c b/tests/monitors.c index 47f12faf..5dc5d13f 100644 --- a/tests/monitors.c +++ b/tests/monitors.c @@ -83,7 +83,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action, static void list_modes(GLFWmonitor* monitor) { - int count, x, y, widthMM, heightMM, dpi, i; + int count, x, y, widthMM, heightMM, i; const GLFWvidmode* mode = glfwGetVideoMode(monitor); const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count); @@ -96,8 +96,8 @@ static void list_modes(GLFWmonitor* monitor) printf("Current mode: %s\n", format_mode(mode)); printf("Virtual position: %i %i\n", x, y); - dpi = (int) ((float) mode->width * 25.4f / (float) widthMM); - printf("Physical size: %i x %i mm (%i dpi)\n", widthMM, heightMM, dpi); + printf("Physical size: %i x %i mm (%0.2f dpi)\n", + widthMM, heightMM, mode->width * 25.4f / widthMM); printf("Modes:\n");