Attempt to fix black screen flickering in non-buffered rendering mode.