summaryrefslogtreecommitdiff
path: root/mbone/vic/patches/patch-ar
blob: 41a127f09c2d34d461050dcf0d469e6d072f7b9c (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-ar,v 1.2 2006/02/27 15:49:56 joerg Exp $

--- color-ed.cc.orig	1995-11-14 05:46:10.000000000 +0000
+++ color-ed.cc
@@ -173,14 +173,17 @@ class EDWindowRenderer : public PseudoWi
 public:
 	EDWindowRenderer(VideoWindow* vw, int decimation, EDColorModel& cm) :
 		PseudoWindowRenderer(vw, decimation, cm.graylut()),
-		cm_(cm) { }
+		cm_(cm), method_(NULL) { }
 	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:
 	EDColorModel& cm_;
 	virtual void update();
-	virtual void disable() { method_ = PseudoWindowRenderer::dither_null; }
+	virtual void disable() { method_ = NULL; }
 	EDMethod method_;
 	void dither_422(const u_char* frm, u_int off, u_int x,
 			u_int width, u_int height) const;