[PATCH 1/1] Fix the screenshot function on macOS, modified from wxWidgets