6573: set SDL_MAC_OPENGL_ASYNC_DISPATCH sdl hint to fix macos resizing r=heinrich5991 a=edg-l

Fixes a issue where ddnet freezes on resize on macos

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Edgar <git@edgarluque.com>
This commit is contained in:
bors[bot] 2023-05-09 12:52:23 +00:00 committed by GitHub
commit e95fb14612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4743,6 +4743,12 @@ int main(int argc, const char **argv)
pClient->ShellRegister();
#endif
#if defined(CONF_PLATFORM_MACOS)
// Hints will not be set if there is an existing override hint or environment variable that takes precedence.
// So this respects cli environment overrides.
SDL_SetHint("SDL_MAC_OPENGL_ASYNC_DISPATCH", "1");
#endif
// init SDL
if(SDL_Init(0) < 0)
{