Re: [AD] Menus not honoring gui screen |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2005-08-21 at 13:48 -0700, Chris wrote:
> On Sunday 21 August 2005 11:23 am, Elias Pschernig wrote:
> > It simply would mean, the parameter to show_mouse is an on/off
> > parameter. Pass screen to show it, NULL to hide it. Other bitmaps are
> > disallowed.
>
> What about other video bitmaps? If you're using page flipping, with no
> hardware cursor, and a GUI pops up on a non-main-screen page, you'll want to
> show it on that video bitmap.
And that actually works?
> I believe it would be better to have the docs say that using it on non-video
> bitmaps is dangerous and deprecated (due to the async drawing and that
Well, showing it on video bitmaps is just as dangerous :)
> there's no mutex's in place), and showing it on a non-visible buffer is just
> wasteful.
Well, not just wasteful, but impossible right now to do properly since
there's no scare_mouse. I attached a patch which allows it.
--
Elias Pschernig
Index: src/mouse.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/mouse.c,v
retrieving revision 1.37
diff -u -p -r1.37 mouse.c
--- src/mouse.c 11 Jun 2005 17:14:36 -0000 1.37
+++ src/mouse.c 21 Aug 2005 21:21:02 -0000
@@ -662,16 +662,14 @@ void show_mouse(BITMAP *bmp)
/* scare_mouse:
* Removes the mouse pointer prior to a drawing operation, if that is
- * required (ie. noop if the mouse is on a memory bitmap, or a hardware
- * cursor is in use). This operation can later be reversed by calling
- * unscare_mouse().
+ * required (ie. noop if the mouse is a hardware cursor). This operation
+ * can later be reversed by calling unscare_mouse().
*/
void scare_mouse(void)
{
- if (!mouse_driver)
- return;
+ if (!mouse_driver) return;
- if ((is_same_bitmap(screen, _mouse_screen)) && (!(gfx_capabilities & GFX_HW_CURSOR))) {
+ if (!(gfx_capabilities & GFX_HW_CURSOR)) {
if (scared_size < SCARED_SIZE) {
scared_screen[scared_size] = _mouse_screen;
scared_freeze[scared_size] = FALSE;
@@ -692,10 +690,10 @@ void scare_mouse(void)
/* scare_mouse_area:
* Removes the mouse pointer prior to a drawing operation, if that is
- * required (ie. noop if the mouse is on a memory bitmap, or a hardware
- * cursor is in use, or the mouse lies outside of the specified bounds
- * (in this last case, the mouse is frozen)). This operation can later
- * be reversed by calling unscare_mouse().
+ * required (ie. noop if the mouse is a hardware cursor, or the mouse lies
+ * outside of the specified bounds (in this last case, the mouse is
+ * frozen)). This operation can later be reversed by calling
+ * unscare_mouse().
*/
void scare_mouse_area(int x, int y, int w, int h)
{
@@ -704,7 +702,7 @@ void scare_mouse_area(int x, int y, int
if (!mouse_driver)
return;
- if ((is_same_bitmap(screen, _mouse_screen)) && (!(gfx_capabilities & GFX_HW_CURSOR))) {
+ if (!(gfx_capabilities & GFX_HW_CURSOR)) {
was_frozen = freeze_mouse_flag;
freeze_mouse_flag = TRUE;