I might not be qualified to comment on this and are not sure exactly what is the question. I am going to assume the question is whether the changes that this code is making to the input improve things for gdi32. My answer is yes. The code essentially replaces invalid points with the PT_MOVETO type. PolyDraw(at least the wine version) ignores PT_MOVETO type points or uses them as a starting point to draw.
When we generate consequent PT_MOVETO type points, all will get ignored except the last which will be used as the starting point for a valid line segment.
To sum it up, PT_MOVETO type of points are ultra cheap hence why I used them here instead of complicating everything while trying to come up with a new set of updated points.