Compare commits
2 Commits
main
...
fix-macos-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c983a6307 | ||
|
|
6a8950c4f2 |
@@ -150,6 +150,15 @@ int _GNW95_init_mode_ex(int width, int height, int bpp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// macOS seems to require dequeuing NSApp events in order for window to
|
||||
// become visible. There is no concrete number of calls required to make
|
||||
// it happen. Sadly there is no particular event to watch for because SDL
|
||||
// marks window as shown immediately after creation (see
|
||||
// `SDL_FinishWindowCreation`).
|
||||
for (int i = 0; i < 10; i++) {
|
||||
SDL_PumpEvents();
|
||||
}
|
||||
|
||||
_scr_size.left = 0;
|
||||
_scr_size.top = 0;
|
||||
_scr_size.right = width - 1;
|
||||
|
||||
Reference in New Issue
Block a user