Fix test_egl
Fix resuming the main loop.