ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/SDL/video_sdl.cpp
(Generate patch)

Comparing BasiliskII/src/SDL/video_sdl.cpp (file contents):
Revision 1.38 by asvitkine, 2009-03-03T08:14:53Z vs.
Revision 1.44 by asvitkine, 2011-12-30T15:11:08Z

# Line 63 | Line 63
63   #include "video_blit.h"
64   #include "vm_alloc.h"
65  
66 + #if (defined(__APPLE__) && defined(__MACH__))
67 + #include "utils_macosx.h"
68 + #endif
69 +
70   #define DEBUG 0
71   #include "debug.h"
72  
69
73   // Supported video modes
74   using std::vector;
75   static vector<VIDEO_MODE> VideoModes;
# Line 1549 | Line 1552 | bool video_can_change_cursor(void)
1552                  if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver))
1553                          quartzok = true;
1554                  else {
1555 <                        // Quartz driver bug prevents cursor changing in SDL 1.2.11 and later
1555 >                        // Quartz driver bug prevents cursor changing in SDL 1.2.11 to 1.2.14.
1556                          const SDL_version *vp = SDL_Linked_Version();
1557 <                        quartzok = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch) <= SDL_VERSIONNUM(1, 2, 10);
1557 >                        int version = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch);
1558 >                        quartzok = (version <= SDL_VERSIONNUM(1, 2, 10) || version >= SDL_VERSIONNUM(1, 2, 15));
1559                  }
1560          }
1561  
# Line 2237 | Line 2241 | static inline void do_video_refresh(void
2241          handle_events();
2242  
2243          // Update display
2244 + #if (defined(__APPLE__) && defined(__MACH__))
2245 +        // SDL expects an auto-release pool to be present.
2246 +        NSAutoReleasePool_wrap(video_refresh);
2247 + #else
2248          video_refresh();
2249 + #endif
2250  
2251   #ifdef SHEEPSHAVER
2252          // Set new cursor image if it was changed
# Line 2327 | Line 2336 | static int redraw_func(void *arg)
2336   #ifdef SHEEPSHAVER
2337   void video_set_dirty_area(int x, int y, int w, int h)
2338   {
2339 + #ifdef ENABLE_VOSF
2340          const VIDEO_MODE &mode = drv->mode;
2341          const int screen_width = VIDEO_MODE_X;
2342          const int screen_height = VIDEO_MODE_Y;
2343          const int bytes_per_row = VIDEO_MODE_ROW_BYTES;
2344  
2335 #ifdef ENABLE_VOSF
2345          if (use_vosf) {
2346                  vosf_set_dirty_area(x, y, w, h, screen_width, screen_height, bytes_per_row);
2347                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines