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.42 by asvitkine, 2011-12-28T22:15:10Z vs.
Revision 1.46 by asvitkine, 2012-01-14T15:45:18Z

# Line 66 | Line 66
66   #define DEBUG 0
67   #include "debug.h"
68  
69 #if (defined(__APPLE__) && defined(__MACH__))
70 extern "C" {
71        void NSAutoReleasePool_wrap(void (*fn)(void));
72 }
73 #endif
74
69   // Supported video modes
70   using std::vector;
71   static vector<VIDEO_MODE> VideoModes;
# Line 628 | Line 622 | public:
622   };
623  
624   class driver_window;
625 + #ifdef ENABLE_VOSF
626   static void update_display_window_vosf(driver_window *drv);
627 < static void update_display_dynamic(int ticker, driver_window *drv);
627 > #endif
628   static void update_display_static(driver_base *drv);
629  
630   class driver_window : public driver_base {
631 + #ifdef ENABLE_VOSF
632          friend void update_display_window_vosf(driver_window *drv);
633 <        friend void update_display_dynamic(int ticker, driver_window *drv);
633 > #endif
634          friend void update_display_static(driver_base *drv);
635  
636   public:
# Line 743 | Line 739 | driver_window::driver_window(SDL_monitor
739          : driver_base(m), mouse_grabbed(false)
740   {
741          int width = VIDEO_MODE_X, height = VIDEO_MODE_Y;
746        int aligned_width = (width + 15) & ~15;
742          int aligned_height = (height + 15) & ~15;
743  
744          // Set absolute mouse mode
# Line 897 | Line 892 | driver_fullscreen::driver_fullscreen(SDL
892          : driver_base(m)
893   {
894          int width = VIDEO_MODE_X, height = VIDEO_MODE_Y;
900        int aligned_width = (width + 15) & ~15;
895          int aligned_height = (height + 15) & ~15;
896  
897          // Set absolute mouse mode
# Line 1067 | Line 1061 | static void keycode_init(void)
1061   bool SDL_monitor_desc::video_open(void)
1062   {
1063          D(bug("video_open()\n"));
1070        const VIDEO_MODE &mode = get_current_mode();
1064   #if DEBUG
1065 +        const VIDEO_MODE &mode = get_current_mode();
1066          D(bug("Current video mode:\n"));
1067          D(bug(" %dx%d (ID %02x), %d bpp\n", VIDEO_MODE_X, VIDEO_MODE_Y, VIDEO_MODE_RESOLUTION, 1 << (VIDEO_MODE_DEPTH & 0x0f)));
1068   #endif
# Line 1554 | Line 1548 | bool video_can_change_cursor(void)
1548                  if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver))
1549                          quartzok = true;
1550                  else {
1551 <                        // Quartz driver bug prevents cursor changing in SDL 1.2.11 and later
1551 >                        // Quartz driver bug prevents cursor changing in SDL 1.2.11 to 1.2.14.
1552                          const SDL_version *vp = SDL_Linked_Version();
1553 <                        quartzok = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch) <= SDL_VERSIONNUM(1, 2, 10);
1553 >                        int version = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch);
1554 >                        quartzok = (version <= SDL_VERSIONNUM(1, 2, 10) || version >= SDL_VERSIONNUM(1, 2, 15));
1555                  }
1556          }
1557  
# Line 2242 | Line 2237 | static inline void do_video_refresh(void
2237          handle_events();
2238  
2239          // Update display
2245 #if (defined(__APPLE__) && defined(__MACH__))
2246        // SDL expects an auto-release pool to be present.
2247        NSAutoReleasePool_wrap(video_refresh);
2248 #else
2240          video_refresh();
2250 #endif
2241  
2242   #ifdef SHEEPSHAVER
2243          // Set new cursor image if it was changed

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines