summaryrefslogtreecommitdiff
path: root/mbone/vic/patches/patch-au
blob: 5fd0610c69a90b2dfd4dee58b3245591e3cd8cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-au,v 1.2 2006/02/27 15:49:56 joerg Exp $

--- color-gray.cc.orig	1995-11-14 05:46:10.000000000 +0000
+++ color-gray.cc
@@ -75,14 +75,17 @@ typedef void (GrayWindowRenderer::*GrayM
 class GrayWindowRenderer : public PseudoWindowRenderer {
 public:
 	GrayWindowRenderer(VideoWindow* vw, int decimation,
-			   const u_short* graylut) :
+			   const u_short* graylut) : method_(NULL),
 		PseudoWindowRenderer(vw, decimation, graylut) { }
 	void render(const u_char* frm, int off, int x, int w, int h) {
-		(this->*method_)(frm, off, x, w, h);
+		if (this->method_)
+			(this->*method_)(frm, off, x, w, h);
+		else
+			dither_null(frm, off, x, w, h);
 	}
 protected:
 	virtual void update();
-	virtual void disable() { method_ = PseudoWindowRenderer::dither_null; }
+	virtual void disable() { method_ = NULL; }
 	GrayMethod method_;
 };