Wait, what? That's the first I've heard about it; what's the problem with doing it in ReleaseDC()? Or even, how can it be a problem to not reset the pixel format for a DC we're about to destroy?
ReleaseDC does not destroy the DC, it adds it back to some cache which has some complicated logic I don't really want to mess with. The issue then comes from the internal OpenGL surfaces, when they are owned by window DCs, as their creation / destruction might require other GDI calls involving all sorts of convoluted locking.
I forgot that ReleaseDC() is different from DeleteDC(). I know that there's caching involved, but I thought it was of a form (mostly? entirely?) invisible to the application, and that the actual properties of a DC were always reset between GetDC() calls. Thanks for bearing with me while I recall how this works.
With that knowledge it makes more sense to reset the pixel format between calls on the d3d side. But I'm still confused, now because as I understand, part of the point of this patch is to separate the internal pixel format and entirely hide it. Why do we need to unset it when we're not using it, anywhere at all?