wgl: Put the core functionality of X11DRV_SetPixelFormat in a separate function.