lut = CGColorSpaceCreateDeviceRGB();
if (!lut)
- throw rfb::Exception(_("Could not create framebuffer device"));
+ throw rfb::Exception("CGColorSpaceCreateDeviceRGB");
bitmap = CGBitmapContextCreate(data, width, height, 8, width*4, lut,
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little);
CGColorSpaceRelease(lut);
if (!bitmap)
- throw rfb::Exception(_("Could not create framebuffer bitmap"));
+ throw rfb::Exception("CGBitmapContextCreate");
}
bitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bih,
DIB_RGB_COLORS, (void**)&data, NULL, 0);
- if (!bitmap) {
- int err = GetLastError();
- throw rdr::SystemException(_("unable to create DIB section"), err);
- }
+ if (!bitmap)
+ throw rdr::SystemException("CreateDIBSection", GetLastError());
}
dc = CreateCompatibleDC(fl_gc);
if (!dc)
- throw rdr::SystemException(_("CreateCompatibleDC failed"), GetLastError());
+ throw rdr::SystemException("CreateCompatibleDC", GetLastError());
if (!SelectObject(dc, bitmap))
- throw rdr::SystemException(_("SelectObject failed"), GetLastError());
+ throw rdr::SystemException("SelectObject", GetLastError());
if (!BitBlt(fl_gc, x, y, w, h, dc, src_x, src_y, SRCCOPY)) {
// If the desktop we're rendering to is inactive (like when the screen
// with it. For now, we've only seen this error and for this function
// so only ignore this combination.
if (GetLastError() != ERROR_INVALID_HANDLE)
- throw rdr::SystemException(_("BitBlt failed"), GetLastError());
+ throw rdr::SystemException("BitBlt", GetLastError());
}
DeleteDC(dc);
xim = XCreateImage(fl_display, fl_visual->visual, fl_visual->depth,
ZPixmap, 0, 0, width, height, BitmapPad(fl_display), 0);
if (!xim)
- throw rfb::Exception(_("Could not create framebuffer image"));
+ throw rfb::Exception("XCreateImage");
xim->data = (char*)malloc(xim->bytes_per_line * xim->height);
if (!xim->data)
throw rfb::Exception(_("Not enough memory for framebuffer"));
+
+ vlog.debug("Using standard XImage");
}
data = (rdr::U8*)xim->data;