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