Commit Graph

76 Commits

Author SHA1 Message Date
kanjitalk755
e42b6a50c3 revert SDL 2017-12-05 23:49:59 +09:00
kanjitalk755
056dc36070 revert BasiliskII, change only SheepShaver 2017-11-18 13:08:30 +09:00
kanjitalk755
5065fb9d95 64-bit build for 10.10+ 2017-11-17 21:43:36 +09:00
dmac
9f58eb96dc Use relative mouse values when grabbed in sdl. 2017-07-16 12:07:08 +01:00
Alexei Svitkine
1f211fb37b fix some warnings in Xcode8 build 2016-12-17 22:04:57 -05:00
Ricky Zhang
10e4bba941
Add customized color depth in SDL. To change color depth, add bit of color depth as displaycolordepth prefs in .basilisk_ii_prefs. 2016-08-15 07:38:25 -04:00
James Touton
f066f5a4fd video_sdl compiles cleanly in MSVC.
Resolved a bunch of type conversion warnings.
2015-08-06 01:12:43 -07:00
Alexei Svitkine
6c8d16ef3a Fix issue where unminimizing a SheepShaver window on Mac OS X
results in redraw artifacts.
2015-06-30 15:01:51 -04:00
Alexei Svitkine
d3cb3ca95f Fix some warnings when building Xcode project. 2015-06-29 11:50:50 -04:00
Dave Vasilevsky
26d5f6b7f2 SDL: Allow fullscreen toggle in BasiliskII 2013-04-24 04:13:14 -04:00
Dave Vasilevsky
eceafc6200 SDL: Allow toggling fullscreen/windowed mode 2013-04-24 04:13:07 -04:00
Dave Vasilevsky
efae88ea7c SDL: Let video driver know about cursor type change 2013-04-24 04:12:06 -04:00
Dave Vasilevsky
ff423fe7c9 SDL: Let driver_base be reused in a different video mode
Split init() into one-time initialization, and adaptation to a new video mode.
2013-04-24 04:09:47 -04:00
Dave Vasilevsky
e9c913c4ae SDL: Completely collapse fullscreen/window drivers 2013-04-24 03:30:52 -04:00
Dave Vasilevsky
9e807c884c SDL: Move init() method into base 2013-04-24 03:30:52 -04:00
Dave Vasilevsky
19529cacd4 SDL: Remove useless virtual qualifiers 2013-04-24 03:30:52 -04:00
Dave Vasilevsky
14e6e654f0 SDL: Move mouse movement to base 2013-04-24 03:30:52 -04:00
Dave Vasilevsky
d0648a7039 SDL: Make VOSF update functions apply to driver_base
They don't use anything special from fullscreen/windowed derived classes.
Also, get rid of unneeded friend declarations.
2013-04-24 03:30:51 -04:00
Dave Vasilevsky
2a5100e8d2 SDL: Move destruction into base 2013-04-24 03:30:51 -04:00
Dave Vasilevsky
fed95369d1 SDL: Move window title setting to base 2013-04-24 03:30:51 -04:00
Dave Vasilevsky
b2e5125868 SDL: Move cursor initialization to base
Also decide in just one place whether to use hardware or software cursor.
2013-04-24 03:29:53 -04:00
Dave Vasilevsky
6eb54dccbe SDL: Move more initialization to base
Including blitter, gray ramp, frame buffer initialization.
2013-04-24 00:07:50 -04:00
Dave Vasilevsky
053308e4f9 SDL: Move VOSF initialization to base 2013-04-24 00:07:50 -04:00
Dave Vasilevsky
0c2658f4d1 SDL: Prepare to collapse fullscreen/window drivers
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().
2013-04-24 00:07:49 -04:00
Dave Vasilevsky
82adeb988b SDL: Remove unused method and ivars
mouse_last_x, mouse_last_y and driver_window::mouse_moved() look like remnants
of X11 video, they're never really used.
2013-04-24 00:07:49 -04:00
Dave Vasilevsky
94ebea3509 SDL: Don't uselessly free the_host_buffer
It always points to a member of an SDL_Surface, which is freed by SDL.
2013-04-24 00:07:43 -04:00
Dave Vasilevsky
c0d7aa0004 SDL: Remove old hack, reduce flicker
The old SDL_QuitSubsystem workaround is probably obsolete, and causes
flicker on resolution changes.
2013-04-24 00:04:49 -04:00
Dave Vasilevsky
02d844c6a7 SDL: Make non-Mac fullscreen cursor visible
Issue: https://github.com/cebix/macemu/issues/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.
2013-04-22 02:06:15 -04:00
Dave Vasilevsky
2fb9487933 Mac: Fix mouse grabbing
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().
2013-04-20 19:02:33 -04:00
Alexei Svitkine
be28a8e5d4 [Amadeusz Sławiński]
Fix crashes with SDL on Linux due to delayed cursor setting.
2012-06-18 19:31:50 -04:00
asvitkine
93184352d4 fix some unused declaration warnings 2012-01-14 15:45:18 +00:00
asvitkine
e0c86f12f9 autorelease fix has landed upstream to SDL, remove our version of it 2012-01-04 22:52:05 +00:00
asvitkine
0604cce26b enable hardware cursor on SDL 1.2.15+ 2011-12-30 15:11:08 +00:00
asvitkine
dcf65b4d27 move NSAutoReleasePool_wrap() into its own file 2011-12-29 07:39:56 +00:00
asvitkine
45fbd1523f fix SDL leak by wrapping video_refresh() call with an NSAutoReleasePool 2011-12-28 22:15:11 +00:00
asvitkine
cb0d1a818d revert r1.39 - SDL 1.2.14 doesn't fix the hardware cursor :\ 2011-12-28 21:44:53 +00:00
asvitkine
67ce6f2bcf re-enable hardware cursor switching for SDL 1.2.14+, since the bug appears
to have been fixed
2011-12-28 21:35:42 +00:00
asvitkine
3d09f85dc9 fix some unused var/function warnings 2011-12-28 20:22:25 +00:00
asvitkine
b6f9f38f98 [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
2009-03-03 08:14:53 +00:00
asvitkine
6dcddb92e6 [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.
2008-07-20 07:33:09 +00:00
asvitkine
c23511080e [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.
2008-06-25 02:52:52 +00:00
asvitkine
150a577e4e [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().
2008-06-20 00:45:27 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
gbeauche
0a7fe2eaf8 Workaround video mode switch problems. IOW, make sure to always allocate
the frame buffer at the same base address.
2007-06-14 14:45:54 +00:00
asvitkine
48907db336 Ok, now this works properly (Fix resolution switching without affecting audio). 2007-01-22 00:36:32 +00:00
asvitkine
268af8086b back out my previous change, it breaks audio 2007-01-22 00:32:25 +00:00
asvitkine
473a3f2e22 Fix for resolution switching corruption under SDL (Mac OS X). 2007-01-21 19:33:13 +00:00
gbeauche
7660affe77 Windows apparently needs an extra mouse event to make the new cursor image
visible.
2006-05-14 14:11:46 +00:00
gbeauche
3aa9d912b7 Fix build on Windows (<malloc.h> for alloca()) 2006-05-14 13:49:53 +00:00
gbeauche
98675da523 Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard. 2006-05-14 08:32:05 +00:00