[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I've been playing a bit trying to add display switching support to the BeOS
fullscreen driver; I want it to support all Allegro switch modes, but I have
some problems.
On switch outs, I need to change all the video bitmaps (including screen), so
that their line pointers actually point to some system memory, and also their
line switching functions are changed to reflect the new data position (we
don't need them if acting on a memory bitmap).
This is not a problem with the screen bitmap, as it is directly accessible
and I can change it on the fly, but I didn't know how to find the possible
screen sub bitmaps (video bitmaps on BeOS are created as screen sub bitmaps).
So I searched Allegro itself for some helpful function, and I found some cool
looking functions in src/dispsw.c.
It looks like I'd only need to call _save_switch_state() and
_restore_switch_state() to toggle all video bitmaps, but guess what? It
doesn't work. If I do a _save_switch_state() on switch out requests, the
programs crash with a read fault on blit() (for example) when switching out
from them, and this means the line pointers weren't pointing to a new
temporary memory bitmap. Am I right?
I'm sure I'm missing something... Can you enlighten me up a bit?
--
Angelo Mottola
a.mottola@xxxxxxxxxx
ICQ UIN #66972680