vwebp: msvc build tweaks

snprintf -> _snprintf / remove double->float warnings

Change-Id: I5dcdc394cf7e2d37205beaf83ed0f80a18ec06ab
This commit is contained in:
James Zern 2011-12-16 19:30:33 -08:00
parent 7937b409e7
commit 911795490e

View File

@ -30,6 +30,10 @@
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
// Unfortunate global variables
static const WebPDecBuffer* kPic = NULL;
static const char* file_name = NULL;
@ -87,12 +91,12 @@ static void HandleDisplay(void) {
char tmp[32];
glColor4f(0.0, 0.0, 0.0, 0.0);
glRasterPos2f(-0.95, 0.90);
glRasterPos2f(-0.95f, 0.90f);
PrintString(file_name);
snprintf(tmp, sizeof(tmp), "Dimension:%d x %d", kPic->width, kPic->height);
glColor4f(0.0, 0.0, 0.0, 0.0);
glRasterPos2f(-0.95, 0.80);
glRasterPos2f(-0.95f, 0.80f);
PrintString(tmp);
}
glFlush();