Small steps

Spare time is still an issue, but at least there were a few commits by me.

I am trying to get the pointers in sync on non-Picasso96 screens. For P96 screens this is rather trivial, as I know, where the upper left corner of the amigaOS screen in compared to my AROS mouse coordinates.

It all comes down to coordinates conversion from AROS to amigaOS.

WinUAE does this different, it just hides the windows pointer and so the amigaOS mouse is the only one existing.

Somehow I don't like this. I take the AROS mouse coordinates and try to move the amigaOS mouse exactly below the AROS mouse. For P96 this works perfectly.

For OCS/ECS/AGA screens, there is some kind of border around the screen, which (for me) is hard to calculate. But I seem to be getting there.

But as life goes, I triggered quite a bug in the Gtk GUI. It uses arrays to store the widget pointers, for example an array, which hold all sound option widgets (One widget for "mono" and so on).

Those arrays were not NULL terminated, so it was hard to say, how many elements were in there. And there were quite some code parts like that:

while(array[i++]) {

Which of course terminates not really on the end of the array. So I ended up, NULL terminating all arrays. Still some crashes. So I ended up recounting all possible elements of those arrays and correcting the size of them. Boring work, but now it stopped crashing.

Bad thing is, that I also found a too small array in code written by me ;).

So what is the lesson for today: C arrays are evil. Sometimes.