Re: [hatari-devel] macOS version check

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


Good work spotting this.

It looks like the MacOS version is used to determine whether Hatari was launched from Finder (I guess as opposed to being launched from the command line) which only has a couple of minor effects:
- Causes document open requests to be handled as though they were command line arguments
- Causes the working directory to be set to the directory that contains Hatari.app - which would usually be /Applications

The consequence of the bug is that if you launch Hatari from Finder on MacOS >= 11 then the above two things don't happen. (I confess I hadn't noticed it myself, perhaps because I most commonly launch Hatari from the command line these days).

Attached is a patch that fixes the version detection logic. I can confirm that the working directory is now set as expected if I launch Hatari from Finder on my Mac (running MacOS 12.6).

Cheers,
Chris


On Fri, 30 Sept 2022 at 14:21, Thorsten Otto <admin@xxxxxxxxxxx> wrote:

Just stumbled upon this line:

 

https://git.tuxfamily.org/hatari/hatari.git/tree/src/gui-osx/SDLMain.m#n471

 

That condition will fail for OSVersion >= 11 (Big Sur)

 

 

Attachment: 0001-Handle-MacOS-versions-11.patch
Description: Binary data



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