197 |
|
|
198 |
|
static void *vm_acquire_framebuffer(uint32 size) |
199 |
|
{ |
200 |
< |
return vm_acquire(size); |
200 |
> |
// always try to reallocate framebuffer at the same address |
201 |
> |
static void *fb = VM_MAP_FAILED; |
202 |
> |
if (fb != VM_MAP_FAILED) { |
203 |
> |
if (vm_acquire_fixed(fb, size) < 0) { |
204 |
> |
#ifndef SHEEPSHAVER |
205 |
> |
printf("FATAL: Could not reallocate framebuffer at previous address\n"); |
206 |
> |
#endif |
207 |
> |
fb = VM_MAP_FAILED; |
208 |
> |
} |
209 |
> |
} |
210 |
> |
if (fb == VM_MAP_FAILED) |
211 |
> |
fb = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); |
212 |
> |
return fb; |
213 |
|
} |
214 |
|
|
215 |
|
static inline void vm_release_framebuffer(void *fb, uint32 size) |
731 |
|
* Windowed display driver |
732 |
|
*/ |
733 |
|
|
734 |
< |
static int SDL_display_opened = FALSE; |
734 |
> |
static bool SDL_display_opened = false; |
735 |
|
|
736 |
|
// Open display |
737 |
|
driver_window::driver_window(SDL_monitor_desc &m) |
759 |
|
if ((s = SDL_SetVideoMode(width, height, depth, SDL_HWSURFACE)) == NULL) |
760 |
|
return; |
761 |
|
|
762 |
< |
SDL_display_opened = TRUE; |
762 |
> |
SDL_display_opened = true; |
763 |
|
|
764 |
|
#ifdef ENABLE_VOSF |
765 |
|
use_vosf = true; |