Re: [AD] Menus not honoring gui screen |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, 2005-08-13 at 22:54 -0700, Chris wrote:
> Despite having a way to change the bitmap the GUI draws to, the menus still
> draw directly to the screen. I made this patch to fix the problem. Someone
> may want to comb over it though, to make sure I didn't miss something or mess
> it up somehow.
Sorry for the delay. This was a quite serious bug of course - applied
it, except I renamed your gui_screen variables to gui_bmp, as does the
rest of the code, and which I think otherwise would get confusing with
the global gui_screen.
I just noticed, there are still a lot of calls to scare_mouse though.
Those calls are only needed if the mouse is actually drawn to the
gui_screen - so there probably should be checks for this everywhere.
Things get even worse though, namely if gui_screen is the same as
_mouse_screen, but both are not screen, then scare_mouse does nothing,
because of this in scare_mouse:
if ((is_same_bitmap(screen, _mouse_screen)) && (!(gfx_capabilities & GFX_HW_CURSOR))) {
if (scared_size < SCARED_SIZE) {
scared_screen[scared_size] = _mouse_screen;
scared_freeze[scared_size] = FALSE;
}
show_mouse(NULL);
}
else {
if (scared_size < SCARED_SIZE) {
scared_screen[scared_size] = NULL;
scared_freeze[scared_size] = FALSE;
}
}
What is the idea behind this? If I draw the mouse to a memory bitmap,
then there is just as much reason to hide the cursor during drawing
operations as there is on the screen. But, before I make a patch to
remove that "if", I better ask here.. I feel there's something I'm
overlooking.
--
Elias Pschernig