openbsd-ports/mbone/vic/patches/patch-ac

57 lines
1.4 KiB
Plaintext
Raw Normal View History

--- grabber-x11.cc.orig Fri Jun 11 06:34:19 1999
+++ grabber-x11.cc Sat Oct 30 17:41:17 1999
@@ -46,6 +46,11 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
+
+#ifdef USE_SHM
+#include <X11/extensions/XShm.h>
+#endif
+
#include <tk.h>
/*** #include "sized_types.h" ***/
@@ -194,12 +199,9 @@
X11Device::X11Device(const char* nickname):
InputDevice(nickname), name_(nickname)
{
- if (free)
- attributes_ = "\
+ attributes_ = "\
size {large normal small cif} \
format {411}" ;
- else
- attributes_ = "disabled";
}
extern "C" {
@@ -454,7 +456,9 @@
uint8 *vp= up + (framesize_ >> 2) ;
uint16 *data=(uint16 *)ximage_->image->data, p0, p1, p2, p3;
+#if 0
printf("R: %d, G: %d, B: %d;\n", ximage_->image->red_mask, ximage_->image->green_mask, ximage_->image->blue_mask);
+#endif
for (y=0; y<height_; y+=2) {
for (x=0; x<width_; x += 2) {
@@ -693,7 +697,7 @@
VidUtil_DestroyXImage(dpy_, ximage_);
ximage_ = VidUtil_AllocXImage(dpy_, root_vis, root_depth_, w, h, False);
}
- return (c_grab == NULL) ? 0 : config|VID_SMALL|VID_MEDIUM|VID_LARGE;
+ return (c_grab == 0) ? 0 : config|VID_SMALL|VID_MEDIUM|VID_LARGE;
}
extern "C" {
@@ -1049,7 +1053,7 @@
X11Grabber::X11Grabber(const char* name, const char* format)
{
- c_grab = (int)NULL ; /* XXX */
+ c_grab = 0;
theroot_ = None ; /* XXX */
ximage_ = NULL ;
color = NULL ;