d->callbacks = &pixmap_callbacks;
// Access file mapping object by a name
- snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08lx", (uintptr_t)handle);
+ snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08x", (unsigned int)(uintptr_t)handle);
d->hSection = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, name);
if (!d->hSection)
- printf("OpenFileMapping failed %x\n", GetLastError());
+ printf("OpenFileMapping failed %x\n", (int)GetLastError());
// Create a screen-compatible DC
d->dibDC = CreateCompatibleDC(NULL);
// Map the shared memory section to access the BITMAPINFOHEADER
pBmpHeader = (BITMAPINFOHEADER *)MapViewOfFile(d->hSection, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(BITMAPINFOHEADER));
if (!pBmpHeader)
- printf("MapViewOfFile failed %x\n", GetLastError());
+ printf("MapViewOfFile failed %x\n", (int)GetLastError());
// Create a DIB using the file mapping
d->hDIB = CreateDIBSection(d->dibDC, (BITMAPINFO *) pBmpHeader,
read->callbacks->releasedc(read, readDc);
if (!ret) {
- printf("wglMakeContextCurrentARB error: %08x\n", GetLastError());
+ printf("wglMakeContextCurrentARB error: %08x\n", (int)GetLastError());
return FALSE;
}
}
/* Otherwise, just use wglMakeCurrent */
BOOL ret = wglMakeCurrent(drawDc, context->ctx);
if (!ret) {
- printf("wglMakeCurrent error: %08x\n", GetLastError());
+ printf("wglMakeCurrent error: %08x\n", (int)GetLastError());
return FALSE;
}
}