--- BasiliskII/src/SDL/video_sdl.cpp 2011/12/28 21:35:42 1.40 +++ BasiliskII/src/SDL/video_sdl.cpp 2011/12/29 07:38:34 1.43 @@ -63,10 +63,13 @@ #include "video_blit.h" #include "vm_alloc.h" +#if (defined(__APPLE__) && defined(__MACH__)) +#include "utils_macosx.h" +#endif + #define DEBUG 0 #include "debug.h" - // Supported video modes using std::vector; static vector VideoModes; @@ -1549,10 +1552,9 @@ bool video_can_change_cursor(void) if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver)) quartzok = true; else { - // Quartz driver bug prevents cursor changing in SDL 1.2.11 to 1.2.13. + // Quartz driver bug prevents cursor changing in SDL 1.2.11 and later const SDL_version *vp = SDL_Linked_Version(); - int version = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch); - quartzok = (version <= SDL_VERSIONNUM(1, 2, 10) || version >= SDL_VERSIONNUM(1, 2, 14)); + quartzok = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch) <= SDL_VERSIONNUM(1, 2, 10); } } @@ -2238,7 +2240,12 @@ static inline void do_video_refresh(void handle_events(); // Update display +#if (defined(__APPLE__) && defined(__MACH__)) + // SDL expects an auto-release pool to be present. + NSAutoReleasePool_wrap(video_refresh); +#else video_refresh(); +#endif #ifdef SHEEPSHAVER // Set new cursor image if it was changed