Merge pull request #4148 from RisingFog/frame_dump_fixes Fix frame dump issues where frame dumping stops before next drawn frame