Users should be able to select sparsebundles in the disk prefs, but should still be able to navigate inside .sheepvm bundles. See #25 (comment)
* Look for CPU named "amd64" as well as "x86_64" * Don't use /dev/ptmx on FreeBSD * On amd64 FreeBSD uses SIGSEGV, not SIGBUS * Use MAP_FIXED to force allocations within 32-bits, it's the only way * Need <sys/param.h> for SHMLBA * The old offsetof() fix is no longer needed * Preliminary work on instruction skipping
Split init() into one-time initialization, and adaptation to a new video mode.
They don't use anything special from fullscreen/windowed derived classes. Also, get rid of unneeded friend declarations.
Also decide in just one place whether to use hardware or software cursor.
Including blitter, gray ramp, frame buffer initialization.
We want to have just one base driver that can handle both fullscreen and windowed mode, so that we can easily switch between modes. Create a virtual init() method to do construction, so we can move common code from the derived classes into the base init().
mouse_last_x, mouse_last_y and driver_window::mouse_moved() look like remnants of X11 video, they're never really used.
It always points to a member of an SDL_Surface, which is freed by SDL.
The old SDL_QuitSubsystem workaround is probably obsolete, and causes flicker on resolution changes.
Issue: #26 On non-Mac platforms, driver_fullscreen constructor sets up software cursor, but switch_to_current_mode() ask for a hardware cursor, possibly due to a typo. Neither one ends up being drawn, so the cursor goes invisible. This change makes them agree to use a software cursor. We should eventually move to just one place deciding which cursor to use, so they don't have to be kept in sync.
If mouse is grabbed on OS X, every time the mouse cursor icon changes the cursor is recentered. Workaround similar to Windows in video_set_cursor().
Prevent intermittent crashing when prefs contains empty lines or lines with no spaces.
Also close files when we're done with them.