Re: [hatari-devel] OS X SDL2 fixes

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


Thomas,

Here are my responses. I apologize in advance for the long post.

On Aug 21, 2014, at 4:00 AM, Thomas Huth <th.huth@xxxxxx> wrote:

> You are talking about the OS X dialog, not the SDL dialog, right?
> Is there maybe a shortcut key is listed for this dialog when you browse
> through the OS X menu? (i.e. could it be that the shortcut activates
> two menu items?)

Yes, I am talking about the OS X dialog. I did check the NIB file and I do not find any keyboard shortcut attached to this menu item. However, I am sure there is a place in the code where the OS X Hatari shortcuts exist, but I have not been able to find them.

> 
>> 2. I could stop the OS from intercepting keys like Cmd-M and Cmd-F
>> simply by removing the keyboard shortcuts in the NIB file. 

> Sounds good. Alternatively, I think we could also map the Hatari
> shortcuts to other keys on OS X ?

In theory, changing the shortcut keys sounds great. However, the last time I suggested that on this list, the reaction was less than enthusiastic from the OS X users here. People have gotten used to the current shortcuts. If we can make them work, I think that will satisfy people.

In my latest build, I have noticed that the Preferences window is disabled. I am not sure why that happened. It has happened to me before. I will try downloading the source code fresh tomorrow and see if the Preferences menu works again. If so, I will add one piece at a time and see when the Preferences menu breaks.

On a similar note, if you select an OS X menu while music is playing in Hatari (in-game music), you get the nastiest sound depending on the current music. As soon as you leave the menu, everything returns to normal. This is different than SDL1. I assume it is simply a difference in the OS X version between SDL1 and SDL2.

> 
>> 3. Most times, when entering full screen mode, Hatari will only
>> occupy the upper left corner of the screen until I move the mouse.
>> Then, Hatari takes up the entire window.
> 
> That's certainly a bug in the SDL library. Could you maybe report the
> problem at the libsdl.org project?

Unfortunately, without the ability to create a test case myself, it will have to be left to some other project to report the problem. As with Hatari, they will want a very small and simple code sample that shows the bug. Simply showing them Hatari will do no good.

Also, I should mention this has only happened to me when I am at the desktop. If I start a game first and then switch to fullscreen mode, the screen is the proper size.

> You can go back to the old behaviour with the resolution change by
> replacing SDL_WINDOW_FULLSCREEN_DESKTOP with SDL_WINDOW_FULLSCREEN
> in screen.c.

I did try this and the desktop looked much better in fullscreen. Unfortunately, when I exited fullscreen, I ended up with a black screen. I could not Cmd-Tab to any other program and my OS X keys did not work to force quit Hatari since I was still in Hatari. Thankfully, I could still use the right option key + Q, hit Return and exit Hatari.

> 
> 
> SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
> 
> Instead of "linear" you can also try "best".
> 
> 
I think the “best” hint looked as good as the old behavior so I would suggest using the hint and staying with the new fullscreen behavior. It looks more like other OS X fullscreen modes with the wipe effect.

>> 5. Sometimes, but not always, the host (OS X) mouse pointer will stay
>> on the screen in fullscreen mode along with the Atari mouse pointer.
>> The OS X mouse pointer won’t move and only the Atari mouse pointer
>> works in fullscreen. 
> 
> That sounds like another SDL bug, so you should maybe report it on
> libsdl.org, too. Can you determine a pattern when it stays enabled?
> E.g. does it make a difference whether the host mouse pointer was in the
> Hatari window before you changed to fullscreen or not?
> 
> Another thing to try: When you enable the SDL GUI in fullscreen (F12)
> and leave it again, is the host mouse pointer gone?

This very much depends on where the host mouse pointer is located on the screen when I enter fullscreen mode. When I was not trying to make the problem occur, it seemed to happen every 3rd time I entered fullscreen mode. When I had to make it happen, it was not as easy to reproduce as I thought it would be. I needed to have the host mouse pointer off the left edge of the Hatari window.

I should have tried entering the SDL GUI. Yes, the host mouse pointer disappears if I press F12 and simply click Ok.

> 
>> At this point, actually playing a game appears to work without a
>> problem.
> 
> So is Hatari running smoother/faster with SDL2 on OS X or is still SDL1
> the better choice?

If I simply wanted to pick up a game and use Hatari, SDL1 is the better choice currently. However, the SDL project has made it clear that SDL 1’s days are numbered. Therefore, I really want to get Hatari working correctly in SDL2. In addition, there are many bug fixes in SDL2. For instance, I can minimize and restore Hatari’s window without the colors getting all messed up.


Bob C


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