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

--- color-true.cc.orig	1996-03-04 11:32:13.000000000 +0000
+++ color-true.cc
@@ -173,14 +173,17 @@ typedef void (TrueWindowRenderer::*TrueM
 class TrueWindowRenderer : public WindowDitherer {
 public:
 	TrueWindowRenderer(VideoWindow* vw, int decimation, TrueColorModel& cm)
-		: WindowDitherer(vw, decimation), cm_(cm), method_(0){ }
+		: WindowDitherer(vw, decimation), 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:
 	TrueColorModel& cm_;
 	virtual void update();
-	virtual void disable() { method_ = TrueMethod(WindowRenderer::dither_null); }
+	virtual void disable() { method_ = NULL; }
 	TrueMethod method_;
 	void map_422(const u_char* frm, u_int off, u_int x,
 		     u_int width, u_int height) const;