Make screen refresh more snappy on macOS
This commit is contained in:
parent
81dc7593da
commit
c1b2811bbf
3 changed files with 23 additions and 6 deletions
11
src/macos.h
11
src/macos.h
|
|
@ -37,4 +37,15 @@ const char *apple_picturesPath(void);
|
|||
int apple_trash(const char *path);
|
||||
|
||||
|
||||
/*
|
||||
* It's unclear why we need this on macOS, but the SDL2 library on the Mac
|
||||
* appears to require an extra flip during a delay without which the flip does
|
||||
* occur but not until the next click or after much time passes.
|
||||
*/
|
||||
#define SDL_Delay(n) do { \
|
||||
SDL_Flip(screen); \
|
||||
SDL_Delay(n); \
|
||||
} while(0)
|
||||
|
||||
|
||||
#endif /* __MACOS_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue