Merge pull request #16 from belkiss/master

Replaced snprintf with sprintf due to MSVC.
This commit is contained in:
Camilla Löwy Berglund 2012-08-12 03:48:19 -07:00
commit c8c36f6ec0
3 changed files with 11 additions and 11 deletions

View File

@ -46,9 +46,9 @@ static void set_swap_interval(GLFWwindow window, int interval)
swap_interval = interval;
glfwSwapInterval(swap_interval);
snprintf(title, sizeof(title),
"Cursor Inaccuracy Detector (interval %i)",
swap_interval);
sprintf(title,
"Cursor Inaccuracy Detector (interval %i)",
swap_interval);
glfwSetWindowTitle(window, title);
}

View File

@ -53,11 +53,11 @@ static const char* format_mode(GLFWvidmode* mode)
{
static char buffer[512];
snprintf(buffer, sizeof(buffer),
"%i x %i x %i (%i %i %i)",
mode->width, mode->height,
mode->redBits + mode->greenBits + mode->blueBits,
mode->redBits, mode->greenBits, mode->blueBits);
sprintf(buffer,
"%i x %i x %i (%i %i %i)",
mode->width, mode->height,
mode->redBits + mode->greenBits + mode->blueBits,
mode->redBits, mode->greenBits, mode->blueBits);
buffer[sizeof(buffer) - 1] = '\0';
return buffer;

View File

@ -43,9 +43,9 @@ static void set_swap_interval(GLFWwindow window, int interval)
swap_interval = interval;
glfwSwapInterval(swap_interval);
snprintf(title, sizeof(title),
"Tearing detector (interval %i)",
swap_interval);
sprintf(title,
"Tearing detector (interval %i)",
swap_interval);
glfwSetWindowTitle(window, title);
}