upstream mg-sdl2 merge