9759e5be25
- Honor CC, CFLAGS. - Make this compile with gcc3.
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
$OpenBSD: patch-grabber-x11_cc,v 1.1 2002/10/06 22:28:49 naddy Exp $
|
|
--- grabber-x11.cc.orig Fri Jun 11 12:34:19 1999
|
|
+++ grabber-x11.cc Sun Oct 6 23:05:29 2002
|
|
@@ -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 @@ static X11Device find_x11_devices("x11")
|
|
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 @@ X11Grabber::X11Grab_RGB16(void)
|
|
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 @@ X11Grabber::X11Grab_Initialize(Window rw
|
|
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 @@ X11Device::command(int argc, const char*
|
|
|
|
X11Grabber::X11Grabber(const char* name, const char* format)
|
|
{
|
|
- c_grab = (int)NULL ; /* XXX */
|
|
+ c_grab = 0;
|
|
theroot_ = None ; /* XXX */
|
|
ximage_ = NULL ;
|
|
color = NULL ;
|