Re: [AD] stretch_blit problems on WinXP SP2

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


> It looks mostly okay to me. Although I'm not sure how costly 
> VirtualProtect is. If it's fairly costly, you may want to add a check to 
> make sure the memory pointer changed or the size grew:
[...]
> However, it's possible a call to VirtualProtect is negligible and you'd 
> waste more time checking than with the actual function call.

Hmm... guess we'll need to do some benchmarks then. I didn't get the 
impression from the MSDN docs that it'd be especially slow, but I may have 
missed it.

> Also, old_protect's type really should be DWORD instead of int, in case 
> MS decides to be funny and make DWORD bigger than an int sometime in the 
> future.

I think it's more likely that int will be larger than DWORD at some point, 
personally. Regardless, I'll make the change.

Evert





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