[hatari-devel] New FileSelector

Laurent Sallafranque laurent.sallafranque at free.fr
Tue Sep 21 23:02:33 CEST 2010


Hello,

>  Btw. Why the sdlgui.h struct w&  h members needed to be converted
>  to floats?  No other objects need floats and I don't see why scrollbar
>  would need those to be floats either as the SDL drawing co-ordinates are
>  all integers.


You're right. I've thought about it today. I know how to restore int 
without breaking the code.
I send the patch as soon as possible.

For the wrong casts, I'm not the best one.
I suggest you correct the wrong casts after I've returned to int.
Do you agree ?

Regards

Laurent



Le 20/09/2010 23:53, Eero Tamminen a écrit :
> Hi,
>
> Btw. Why the sdlgui.h struct w&  h members needed to be converted
> to floats?  No other objects need floats and I don't see why scrollbar
> would need those to be floats either as the SDL drawing co-ordinates are
> all integers.
>
> If floats are needed for calculations, I think it should be possible to just
> have exact float variables internal to the file selector which are just set
> to the (integer) scrollbar object variables before scrollbar is drawn...?
>
> (The patches seemed to have quite a lot of "unnecessary" explicit casts too.
> AFAIK variable assignment always does an implicit cast to target type and
> operations on different types implicitly upcasts values that have smaller
> scope.)
>
>
> 	- Eero
>
> PS. Making gui-sdl const correct is easy, see attached patch.  It leaves one
> warning though:
> /home/eero/work/hatari/src/gui-sdl/sdlgui.c: In function 'SDLGui_EditField':
> /home/eero/work/hatari/src/gui-sdl/sdlgui.c:482: warning: cast discards
> qualifiers from pointer target type
>
> PPS. The othe patch fixes GCC flag changing for uae-cpu + disables only
> the needed unused checks, not all the unused checks.
>    
>
>
> _______________________________________________
> hatari-devel mailing list
> hatari-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/hatari-devel
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.berlios.de/pipermail/hatari-devel/attachments/20100921/e479e3cc/attachment.html>


More information about the hatari-devel mailing list