[hatari-devel] New FileSelector

Eero Tamminen eerot at users.berlios.de
Thu Sep 23 23:30:46 CEST 2010


On Thursday 23 September 2010, Eero Tamminen wrote:
> Attached is a patch making sdl-gui const correct, but unfortunately only
> way to do that without getting any warnings is a bit ugly (instead of
> using a string static buffer, I need to do double malloc for it).  I'm
> not really happy with that, but as editable text fields are used only in
> the file selector, that might be bearable...

It was buggy & bad (one should never post any code quickly written while
tired without waiting to next day).   Attached is a more reasonable
version, which uses internal static buffer for text edit editing that
the caller (file selector) needs to copy.

Any objections on me commiting it?

> Btw. While testing this, I found a bug in Hatari:
> - In floppy dialog, invoke "Create blank disk"
> - Select "Create"
> - Select "Okay"
>   -> image created
> - Select "Create"
> - Select "Cancel"
> - Select "Back"
>   -> asks whether I want to insert the previously created disk
> - Select "Drive A:"
>   -> BOOM
> This happens also in a version before our changes
> (and in v1.4 release I assume).

That's now fixed in repo.

	- Eero
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdl-gui-const2.diff
Type: text/x-diff
Size: 5274 bytes
Desc: not available
URL: <https://lists.berlios.de/pipermail/hatari-devel/attachments/20100924/9c8320d2/attachment.diff>

More information about the hatari-devel mailing list