Re: [hatari-devel] Hatari's SDL2-port screen update bug

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Thu, 8 Sep 2016 21:54:39 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On 09/08/2016 10:45 AM, Thomas Huth wrote:
> >> As result, e.g. Hatari dialogs aren't in some cases shown
> >> with SDL2 until user blindly interacts with them first.  
> >
> > I've never seen that behavior so far, can you give an example
> > how to reproduce this issue?  
> 
> Invoke debugger and use "savestate" command few times.
> 
> When the file already exists, a query dialog is popped
> up.  With SDL2, Hatari screen isn't refreshed, unlike
> with SDL1.

Actually, it seems to me that this is not a screen refresh problem, but
it rather seems like SDL2 generates a keyboard event for the RETURN key
that you use to finish the "savestate" command in the debugger. Thus
Hatari opens the dialog and immediately closes it again because it
thinks that the user hit RETURN to choose the OK button.
Not sure why SDL2 generates a keyboard event in this case, since the
focus should be in the debugger terminal window. Sounds like a SDL2 bug
to me.
We could maybe somehow work around this problem by flushing the event
queue ... but I currently rather wonder whether it's a good idea to
call the memory snapshot functions with bConfirm=true. If the users
are working in the debugger terminal, I think they do not really
expect a dialog to pop up in the main window. So maybe that dialog
should rather be avoided and you should prompt for yes/no in the
terminal window? Or simply do not ask the user at all and always
overwrite the destination file (aka. you should know what you're doing
when using the debugger)?
What do you think?

 Thomas




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