66 |
|
#define DEBUG 0 |
67 |
|
#include "debug.h" |
68 |
|
|
69 |
– |
|
69 |
|
// Supported video modes |
70 |
|
using std::vector; |
71 |
|
static vector<VIDEO_MODE> VideoModes; |
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: |
739 |
|
: driver_base(m), mouse_grabbed(false) |
740 |
|
{ |
741 |
|
int width = VIDEO_MODE_X, height = VIDEO_MODE_Y; |
741 |
– |
int aligned_width = (width + 15) & ~15; |
742 |
|
int aligned_height = (height + 15) & ~15; |
743 |
|
|
744 |
|
// Set absolute mouse mode |
892 |
|
: driver_base(m) |
893 |
|
{ |
894 |
|
int width = VIDEO_MODE_X, height = VIDEO_MODE_Y; |
895 |
– |
int aligned_width = (width + 15) & ~15; |
895 |
|
int aligned_height = (height + 15) & ~15; |
896 |
|
|
897 |
|
// Set absolute mouse mode |
1061 |
|
bool SDL_monitor_desc::video_open(void) |
1062 |
|
{ |
1063 |
|
D(bug("video_open()\n")); |
1065 |
– |
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 |
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 |
|
|
2327 |
|
#ifdef SHEEPSHAVER |
2328 |
|
void video_set_dirty_area(int x, int y, int w, int h) |
2329 |
|
{ |
2330 |
+ |
#ifdef ENABLE_VOSF |
2331 |
|
const VIDEO_MODE &mode = drv->mode; |
2332 |
|
const int screen_width = VIDEO_MODE_X; |
2333 |
|
const int screen_height = VIDEO_MODE_Y; |
2334 |
|
const int bytes_per_row = VIDEO_MODE_ROW_BYTES; |
2335 |
|
|
2335 |
– |
#ifdef ENABLE_VOSF |
2336 |
|
if (use_vosf) { |
2337 |
|
vosf_set_dirty_area(x, y, w, h, screen_width, screen_height, bytes_per_row); |
2338 |
|
return; |