Remove obsolete Cygwin/X11 addressing hack. Fix DirectX fullscreen mode

with hardware surface. On the other hand, DIB (SDL_VIDEODRIVER=windib)
always seems the fastest on my system for both windowed and fullscreen
modes.
This commit is contained in:
gbeauche 2005-11-21 23:38:46 +00:00
parent 934975e12b
commit a7da877356
2 changed files with 28 additions and 11 deletions

View File

@ -157,21 +157,38 @@ static int redraw_func(void *arg);
extern void SysMountFirstFloppy(void);
/*
* SDL surface locking glue
*/
#ifdef ENABLE_VOSF
#define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) do { \
if ((SURFACE)->flags & (SDL_HWSURFACE | SDL_FULLSCREEN)) \
the_host_buffer = (uint8 *)(SURFACE)->pixels; \
} while (0)
#else
#define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE)
#endif
#define SDL_VIDEO_LOCK_SURFACE(SURFACE) do { \
if (SDL_MUSTLOCK(SURFACE)) { \
SDL_LockSurface(SURFACE); \
SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE); \
} \
} while (0)
#define SDL_VIDEO_UNLOCK_SURFACE(SURFACE) do { \
if (SDL_MUSTLOCK(SURFACE)) \
SDL_UnlockSurface(SURFACE); \
} while (0)
/*
* Framebuffer allocation routines
*/
static void *vm_acquire_framebuffer(uint32 size)
{
#ifdef SHEEPSHAVER
#ifdef DIRECT_ADDRESSING_HACK
const uint32 FRAME_BUFFER_BASE = 0x61000000;
uint8 *fb = Mac2HostAddr(FRAME_BUFFER_BASE);
if (vm_acquire_fixed(fb, size) < 0)
fb = VM_MAP_FAILED;
return fb;
#endif
#endif
return vm_acquire(size);
}

View File

@ -35,8 +35,8 @@
#define MONITOR_INIT SDL_monitor_desc &monitor
#define VIDEO_DRV_WIN_INIT driver_window *drv
#define VIDEO_DRV_DGA_INIT driver_fullscreen *drv
#define VIDEO_DRV_LOCK_PIXELS if (SDL_MUSTLOCK(drv->s)) SDL_LockSurface(drv->s)
#define VIDEO_DRV_UNLOCK_PIXELS if (SDL_MUSTLOCK(drv->s)) SDL_UnlockSurface(drv->s)
#define VIDEO_DRV_LOCK_PIXELS SDL_VIDEO_LOCK_SURFACE(drv->s)
#define VIDEO_DRV_UNLOCK_PIXELS SDL_VIDEO_UNLOCK_SURFACE(drv->s)
#define VIDEO_DRV_DEPTH drv->s->format->BitsPerPixel
#define VIDEO_DRV_WIDTH drv->s->w
#define VIDEO_DRV_HEIGHT drv->s->h