fix some unused declaration warnings
autorelease fix has landed upstream to SDL, remove our version of it
enable hardware cursor on SDL 1.2.15+
move NSAutoReleasePool_wrap() into its own file
fix SDL leak by wrapping video_refresh() call with an NSAutoReleasePool
revert r1.39 - SDL 1.2.14 doesn't fix the hardware cursor :\
re-enable hardware cursor switching for SDL 1.2.14+, since the bug appears to have been fixed
fix some unused var/function warnings
[patch by Dave Vasilevsky] Fix for bug: SheepShaver compiled with VOSF off will not display fullscreen on OS X. The VM boots, but the display is entirely black. This was expected, I suppose, since video_refresh_dga() didn't actually attempt to draw anything! The patch fixes this. Notes: * video_refresh_window() now takes an argument of type driver_base, since nothing specific to driver_window was used * video_refresh_dga() can now call video_refresh_window_static() * update_display_static_bbox() now respects the destination having a different bytes-per-row from the source * fullscreen modes are now created for all depths
[patch from Kelvin Delbarre] This fixes the mapping of SDL mouse-button numbers to MacOS/ADB mouse-button numbers, to correct the reversal of the middle and right buttons. Most useful in conjunction with a multi-button mouse enabler such as TheMouse2B: http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cfg/themouse-2b-11.hqx ... which can turn a right-click into a control-click.
[patch from Kelvin Delbarre] Software cursor mode is now supported, although currently the existing hardware cursor mode is used whenever possible. (Software mode will be used if you are running with a recent version of SDL's Quartz video driver, since a bug in SDL 1.2.11 and later prevents the hardware cursor from working properly with that driver.) In hardware cursor mode, the hot-spot is now determined heuristically. Formerly it could not be determined and was always (1,1), an annoyance for many cursors other than the arrow. In hardware cursor mode, the cursor will now be hidden when requested by the emulated OS (such as when you are typing in a text field). In hardware cursor mode, some cursor image formats that the code does not handle correctly will now be rejected, causing the emulated OS to revert temporarily to software cursor mode. Formerly you would just end up with random garbage for a cursor. This typically happened for grayscale or color cursors; rejecting images with rowBytes != 2 eliminates the worst cases.
[patch from Kelvin Delbarre] If you move the mouse cursor in and out of the SheepShaver window a number of times (somewhere around 30 or 40 times will do it), SheepShaver appears to lock up. This occurs because SDL posts application activate/deactivate events to its event queue when the mouse moves in/out of the SheepShaver window, but these events are never consumed, and as a result, the event queue fills up. Thereafter, no new events can be posted, and user inputs are ignored. The fix is to consume SDL_ACTIVEEVENT in handle_events().
Happy New Year!
Workaround video mode switch problems. IOW, make sure to always allocate the frame buffer at the same base address.
Ok, now this works properly (Fix resolution switching without affecting audio).
back out my previous change, it breaks audio
Fix for resolution switching corruption under SDL (Mac OS X).
Windows apparently needs an extra mouse event to make the new cursor image visible.
Fix build on Windows (<malloc.h> for alloca())
Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard.
NQD dirty boxes, SDL backend. This reduces the number of Screen_fault_handler() calls by 80%. i.e. VOSF is now viable on this turtle MacOS X. Besides, since there is no buffer comparison, idle sleep can really be effective. SheepShaver in idle mode on my PBG4 now goes below 8% of CPU resources instead of 70-80% with bounding boxes based video refreshes. Caveat: if your program doesn't use standard MacOS routines that call NQD, then you can expect slower (visual) performance. However, I do think the new default behavior (VOSF+NQD) is the most common.
Introduce a new video refresh function that uses smaller bounding boxes. This does not improve graphics performance but helps CPU because it reduces the number of bytes transfered to actual screen. I saw an improvement by up to 26% in frameskip 4 800x600x16 but also a hit by 3% with frameskip 0. The next step is to use NQD bounding boxes to help detecting dirty areas. So far, this is the best I can do without VOSF working (MacOS X performance bugs -- pitifully slow Mach syscalls)
SDL Video updates: - Properly handle migration from "screenmodes" and "windowmodes" to "screen" - Fix has_mode() logic to really test for actual mode availability. i.e. no longer start in large screen mode if user specified a max size.
Fix pollmedia on Windows, it's no longer necessary to boot with a CD-ROM in the drive to use it. Side effect: media can be changed without problems now
Protect the SDL events queue when changing the cursor map in SheepShaver, aka fix "Xlib: unexpected async reply" messages in SDL/x11 builds.
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.
Support USE_CPU_EMUL_SERVICES in SDL/video driver. Only trigger ethernet interrupt in one_tick() if no pthreads at all are used, i.e. ether_dummy is effective in that case. Otherwise, don't trigger ethernet again if pthreads are available (and ether_unix) and cpu emul services are active.
Add experimental fullscreen SDL video graphics. Map Windows keys to Option.
more sdl key conversions
SDL_ListModes() sometimes does not return a sorted list from largest to smallest screen dimensions (e.g. on windows)
Default to BasiliskII_keycodes file on Windows if user wants keycodes but no keycodefile is specified
Happy New Year!
fix parsing of the keycode table
Always use vm_acquire* to allocate frame buffers, so that cygwin/x86 version can have a chance in case VOSF is not profitable (on video mode switches) Improve video mode switches in SheepShaver/SDL, aka avoid crashes on win32 as there is apparently no thread canceleation algorithm used in SDL/win32.
Try to fix 16 bpp over 32 bpp on MacOS X.
NQD moved to SheepShaver src/gfxaccel.cpp
Don't try to make a cast value an lvalue (Brian Johnson). Add some explicit casts to (int) in order to avaoid this warning: warning: comparison between `const enum video_depth' and `enum <anonymous>'
Force processing of modifier keys through SDL keysyms. Fix mapping of Option & Command keys on MacOS X. Fix scroll lock on MacOS X too.
Fix video_vosf_init() for BasiliskII/SDL
Add heuristic to deitermine run-time effect of VOSF acceleration, and disable it if it turns out to not be profitable
Enable hardware cursor acceleration in SheepShaver/SDL version too.
Try to get maximum display width by assuming that would match maximum possible resolution for fullscreen+hwsurface. Fix, termination of VModes[]. Really handle "windowmodes" prefs item, but this needs code factoring.
Initial SDL support for SheepShaver, though it seems to slow down the emulator somehow. Also use better timing in redraw_func().
SDL_WaitThread() works better when the thread arg is valid. ;-)
Fix events processing on MacOS X, though mouse motion is still not smooth enough.
Initial SDL support.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.