Re: [AD] [latest CVS][WIN] bug while trying DIRECTX_WIN

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Yes, color_depth( 15) has a bug in Directx_win
> I'am studing the problem, this is a temporaly patch.
> The problem are in threads, at shutdown allegro close the threads
> too slow. This patch solve the threads shutdown problem.

Hmm... I haven't got any bug on my own system but you're right, the problem
is thread-related.
Your machines run simply too fast ! The thread responsible for events
management gets a WM_MOVE event just after the windowed driver has begun to
set up and before it shuts down.

The bug originates in my cleanup patch; I tried to remove several hooks but
I didn't go to the last. I've attached a fix (very similar to yours).

> But, why directx_win don't support 15bit colordepth conversion????

It actually supports color conversion to 15-bit (it runs on a 15-bit Windows
desktop), but not from 15-bit (you can't use 15-bit as color depth if your
desktop doesn't run in 15-bit). That's consistent with the behaviour of the
fullscreen drivers: only one color depth among 15-bit and 16-bit is
supported on most graphic cards, so that you have to be prepared to the
failure of set_gfx_mode() (like in Javier's code).

set_color_depth(15);
if (set_gfx_mode(...) != 0) {
   set_color_depth(16);
   set_gfx_mode(...);
}

But you're welcome to code the missing functions (in asm, see update.s):
_update_15_to_16, _update_15_to_24, _update_15_to_32  ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: wddwin_fix.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/