ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/SDL/video_sdl.cpp
Revision 1.46 - (view) (annotate) - [select for diffs]
2012-01-14T15:45:18Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
CVS Tags: HEAD
Changes since 1.45: +5 -5 lines
Diff to previous 1.45
fix some unused declaration warnings

Revision 1.45 - (view) (annotate) - [select for diffs]
2012-01-04T22:52:05Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.44: +0 -9 lines
Diff to previous 1.44
autorelease fix has landed upstream to SDL, remove our version of it

Revision 1.44 - (view) (annotate) - [select for diffs]
2011-12-30T15:11:08Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43
enable hardware cursor on SDL 1.2.15+

Revision 1.43 - (view) (annotate) - [select for diffs]
2011-12-29T07:38:34Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.42: +4 -6 lines
Diff to previous 1.42
move NSAutoReleasePool_wrap() into its own file

Revision 1.42 - (view) (annotate) - [select for diffs]
2011-12-28T22:15:10Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.41: +10 -0 lines
Diff to previous 1.41
fix SDL leak by wrapping video_refresh() call with an NSAutoReleasePool

Revision 1.41 - (view) (annotate) - [select for diffs]
2011-12-28T21:44:53Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.40: +2 -3 lines
Diff to previous 1.40
revert r1.39 - SDL 1.2.14 doesn't fix the hardware cursor :\

Revision 1.40 - (view) (annotate) - [select for diffs]
2011-12-28T21:35:42Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.39: +3 -2 lines
Diff to previous 1.39
re-enable hardware cursor switching for SDL 1.2.14+, since the bug appears
to have been fixed

Revision 1.39 - (view) (annotate) - [select for diffs]
2011-12-28T20:22:25Z (12 years, 10 months ago) by asvitkine
Branch: MAIN
Changes since 1.38: +1 -1 lines
Diff to previous 1.38
fix some unused var/function warnings

Revision 1.38 - (view) (annotate) - [select for diffs]
2009-03-03T08:14:53Z (15 years, 8 months ago) by asvitkine
Branch: MAIN
Changes since 1.37: +15 -12 lines
Diff to previous 1.37
[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

Revision 1.37 - (view) (annotate) - [select for diffs]
2008-07-20T07:33:09Z (16 years, 3 months ago) by asvitkine
Branch: MAIN
Changes since 1.36: +12 -4 lines
Diff to previous 1.36
[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.

Revision 1.36 - (view) (annotate) - [select for diffs]
2008-06-25T02:52:52Z (16 years, 4 months ago) by asvitkine
Branch: MAIN
Changes since 1.35: +18 -1 lines
Diff to previous 1.35
[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.

Revision 1.35 - (view) (annotate) - [select for diffs]
2008-06-20T00:45:27Z (16 years, 4 months ago) by asvitkine
Branch: MAIN
Changes since 1.34: +5 -1 lines
Diff to previous 1.34
[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().

Revision 1.34 - (view) (annotate) - [select for diffs]
2008-01-01T09:40:32Z (16 years, 10 months ago) by gbeauche
Branch: MAIN
Changes since 1.33: +1 -1 lines
Diff to previous 1.33
Happy New Year!

Revision 1.33 - (view) (annotate) - [select for diffs]
2007-06-14T14:45:54Z (17 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.32: +15 -3 lines
Diff to previous 1.32
Workaround video mode switch problems. IOW, make sure to always allocate
the frame buffer at the same base address.

Revision 1.32 - (view) (annotate) - [select for diffs]
2007-01-22T00:36:32Z (17 years, 9 months ago) by asvitkine
Branch: MAIN
Changes since 1.31: +6 -7 lines
Diff to previous 1.31
Ok, now this works properly (Fix resolution switching without affecting audio).

Revision 1.31 - (view) (annotate) - [select for diffs]
2007-01-22T00:32:25Z (17 years, 9 months ago) by asvitkine
Branch: MAIN
Changes since 1.30: +3 -2 lines
Diff to previous 1.30
back out my previous change, it breaks audio

Revision 1.30 - (view) (annotate) - [select for diffs]
2007-01-21T19:33:13Z (17 years, 9 months ago) by asvitkine
Branch: MAIN
Changes since 1.29: +14 -0 lines
Diff to previous 1.29
Fix for resolution switching corruption under SDL (Mac OS X).

Revision 1.29 - (view) (annotate) - [select for diffs]
2006-05-14T14:11:46Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
CVS Tags: nigel-build-19
Changes since 1.28: +13 -3 lines
Diff to previous 1.28
Windows apparently needs an extra mouse event to make the new cursor image
visible.

Revision 1.28 - (view) (annotate) - [select for diffs]
2006-05-14T13:49:53Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.27: +4 -0 lines
Diff to previous 1.27
Fix build on Windows (<malloc.h> for alloca())

Revision 1.27 - (view) (annotate) - [select for diffs]
2006-05-14T08:32:05Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.26: +1 -1 lines
Diff to previous 1.26
Fix NQD bounds checking -- don't overwrite the CLEAR Page Guard.

Revision 1.26 - (view) (annotate) - [select for diffs]
2006-05-13T16:58:44Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.25: +24 -0 lines
Diff to previous 1.25
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.

Revision 1.25 - (view) (annotate) - [select for diffs]
2006-05-11T07:51:32Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.24: +64 -1 lines
Diff to previous 1.24
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)

Revision 1.24 - (view) (annotate) - [select for diffs]
2006-05-09T21:41:02Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.23: +152 -168 lines
Diff to previous 1.23
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.

Revision 1.23 - (view) (annotate) - [select for diffs]
2006-03-28T07:01:19Z (18 years, 7 months ago) by gbeauche
Branch: MAIN
Changes since 1.22: +51 -0 lines
Diff to previous 1.22
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

Revision 1.22 - (view) (annotate) - [select for diffs]
2005-11-29T23:20:31Z (18 years, 11 months ago) by gbeauche
Branch: MAIN
CVS Tags: nigel-build-17
Changes since 1.21: +13 -0 lines
Diff to previous 1.21
Protect the SDL events queue when changing the cursor map in SheepShaver,
aka fix "Xlib: unexpected async reply" messages in SDL/x11 builds.

Revision 1.21 - (view) (annotate) - [select for diffs]
2005-11-21T23:38:46Z (18 years, 11 months ago) by gbeauche
Branch: MAIN
Changes since 1.20: +26 -9 lines
Diff to previous 1.20
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.

Revision 1.20 - (view) (annotate) - [select for diffs]
2005-06-14T22:35:42Z (19 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.19: +49 -19 lines
Diff to previous 1.19
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.

Revision 1.19 - (view) (annotate) - [select for diffs]
2005-06-06T21:20:28Z (19 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.18: +177 -28 lines
Diff to previous 1.18
Add experimental fullscreen SDL video graphics. Map Windows keys to Option.

Revision 1.18 - (view) (annotate) - [select for diffs]
2005-03-20T23:43:17Z (19 years, 7 months ago) by gbeauche
Branch: MAIN
Changes since 1.17: +7 -7 lines
Diff to previous 1.17
more sdl key conversions

Revision 1.17 - (view) (annotate) - [select for diffs]
2005-03-19T05:34:15Z (19 years, 8 months ago) by gbeauche
Branch: MAIN
Changes since 1.16: +10 -2 lines
Diff to previous 1.16
SDL_ListModes() sometimes does not return a sorted list from largest to
smallest screen dimensions (e.g. on windows)

Revision 1.16 - (view) (annotate) - [select for diffs]
2005-03-17T00:19:39Z (19 years, 8 months ago) by gbeauche
Branch: MAIN
Changes since 1.15: +4 -0 lines
Diff to previous 1.15
Default to BasiliskII_keycodes file on Windows if user wants keycodes but
no keycodefile is specified

Revision 1.15 - (view) (annotate) - [select for diffs]
2005-01-30T21:42:14Z (19 years, 9 months ago) by gbeauche
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14
Happy New Year!

Revision 1.14 - (view) (annotate) - [select for diffs]
2005-01-22T17:41:33Z (19 years, 9 months ago) by gbeauche
Branch: MAIN
Changes since 1.13: +7 -3 lines
Diff to previous 1.13
fix parsing of the keycode table

Revision 1.13 - (view) (annotate) - [select for diffs]
2004-11-28T19:31:11Z (19 years, 11 months ago) by gbeauche
Branch: MAIN
Changes since 1.12: +53 -21 lines
Diff to previous 1.12
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.

Revision 1.12 - (view) (annotate) - [select for diffs]
2004-07-27T21:40:52Z (20 years, 3 months ago) by gbeauche
Branch: MAIN
Changes since 1.11: +10 -4 lines
Diff to previous 1.11
Try to fix 16 bpp over 32 bpp on MacOS X.

Revision 1.11 - (view) (annotate) - [select for diffs]
2004-07-02T06:08:01Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.10: +0 -363 lines
Diff to previous 1.10
NQD moved to SheepShaver src/gfxaccel.cpp

Revision 1.10 - (view) (annotate) - [select for diffs]
2004-06-29T21:50:22Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.9: +5 -5 lines
Diff to previous 1.9
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>'

Revision 1.9 - (view) (annotate) - [select for diffs]
2004-06-27T17:31:21Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.8: +55 -11 lines
Diff to previous 1.8
Force processing of modifier keys through SDL keysyms. Fix mapping of
Option & Command keys on MacOS X. Fix scroll lock on MacOS X too.

Revision 1.8 - (view) (annotate) - [select for diffs]
2004-06-26T17:20:35Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.7: +1 -2 lines
Diff to previous 1.7
Fix video_vosf_init() for BasiliskII/SDL

Revision 1.7 - (view) (annotate) - [select for diffs]
2004-06-26T15:22:01Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.6: +39 -23 lines
Diff to previous 1.6
Add heuristic to deitermine run-time effect of VOSF acceleration, and
disable it if it turns out to not be profitable

Revision 1.6 - (view) (annotate) - [select for diffs]
2004-06-24T22:38:42Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.5: +29 -6 lines
Diff to previous 1.5
Enable hardware cursor acceleration in SheepShaver/SDL version too.

Revision 1.5 - (view) (annotate) - [select for diffs]
2004-06-24T21:46:55Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.4: +69 -16 lines
Diff to previous 1.4
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.

Revision 1.4 - (view) (annotate) - [select for diffs]
2004-06-24T15:25:57Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.3: +751 -76 lines
Diff to previous 1.3
Initial SDL support for SheepShaver, though it seems to slow down the
emulator somehow. Also use better timing in redraw_func().

Revision 1.3 - (view) (annotate) - [select for diffs]
2004-06-23T22:55:47Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.2: +2 -4 lines
Diff to previous 1.2
SDL_WaitThread() works better when the thread arg is valid. ;-)

Revision 1.2 - (view) (annotate) - [select for diffs]
2004-06-23T22:37:33Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Changes since 1.1: +16 -3 lines
Diff to previous 1.1
Fix events processing on MacOS X, though mouse motion is still not smooth
enough.

Revision 1.1 - (view) (annotate) - [select for diffs]
2004-06-23T13:47:20Z (20 years, 4 months ago) by gbeauche
Branch: MAIN
Initial SDL support.

Convenience Links

Links to HEAD: (view) (annotate) Links to MAIN: (view) (annotate)

Compare Revisions

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.

  Diffs between and
  Type of Diff should be a