From 4aa08bb812d466f720df58fd03e798ab27fdc5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=82=A6=E8=A7=A3=E8=AF=B4?= Date: Wed, 12 Jul 2023 16:02:36 +0800 Subject: [PATCH] Remove weird kamikaze code from pixel plotter --- gxruntime/ddutil.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gxruntime/ddutil.cpp b/gxruntime/ddutil.cpp index a244012c..0ecae4ce 100644 --- a/gxruntime/ddutil.cpp +++ b/gxruntime/ddutil.cpp @@ -29,11 +29,6 @@ void PixelFormat::setFormat(const DDPIXELFORMAT& pf) { VirtualFree(plot_code, 0, MEM_RELEASE); } - if(!(pf.dwFlags & DDPF_RGB)) { - memset(this, 0, sizeof(*this)); - return; - } - plot_code = (char*)VirtualAlloc(0, 128, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); point_code = plot_code + 64;