[Scummvm-tracker] [ScummVM :: Bugs] #11260: MAC OS X: App stalls when launched on OS X 10.5.8.
ScummVM :: Bugs
trac at scummvm.org
Fri Mar 20 08:18:38 UTC 2020
#11260: MAC OS X: App stalls when launched on OS X 10.5.8.
----------------------+----------------------------
Reporter: macca8 | Owner: (none)
Type: defect | Status: new
Priority: blocker | Component: Port: Mac OS X
Resolution: | Keywords:
Game: |
----------------------+----------------------------
Comment (by macca8):
Criezy, responding to your request in the Forums for feedback on the PPS
OSX v2.1.0 release build.
I’ve tested this version under Rosetta on my Intel iMac running both 10.5
& 10.6. I can confirm that the app performs perfectly on 10.6 (not that
that is of any value to a user with a PowerPC Mac), but on 10.5 it behaves
exactly as reported above for the Intel Mac daily builds, including the
macOS console report.
Out of curiosity, which version of SDL is included in the PPC OSX release
build?
May I humbly suggest that we focus on resolving the only bug reported by
the maOS console (the Help Menu error for the PPC OSX release & Intel Mac
daily builds), then see how the various builds respond.
According to developer.apple.com, and other online sources - including
another project that displayed the same selector error on macOS 10.5 -
[NSApplication setHelpMenu] is NOT available until macOS 10.6.
The solution offered by the other project was to restrict the Help Menu to
macOS 10.6 & later, and I believe that to be the appropriate course of
action here as well, given that the current implementation of the Help
Menu works perfectly with those later versions of macOS.
As such, there’s no need to change the current code, other than to place
restrictions on its use.
With that in mind, may I suggest the following:
- Define macOS 10.6 (in backends/platform/sdl/macosx/macosx-compat.h):
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
- Restrict the construction of the Help Menu to macOS 10.6 & later by
adding an appropriate conditional statement, for example:
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
targeted code goes here
#endif
Apply this statement as necessary in
backends/platform/sdl/macosx/appmenu_osx.mm.
Include each of these code segments within its own statement:
1. Everything relevant to the delegate variable, including:
- line 173
static ScummVMMenuHandler *delegate = nullptr;
- lines 176-177 (in releaseMenu())
[delegate release];
delegate = nullptr;
- lines 181-183 (in replaceApplicationMenuItems())
if (!delegate) {
delegate = [[ScummVMMenuHandler alloc] init];
}
2. Everything relevant to the helpMenu variable, including:
- lines 214-225 (in replaceApplicationMenuItems())
NSMenu *helpMenu = addMenu(_("Help"),…;
to
addMenuItem(_("BSD License"),…;
- line 230 (in replaceApplicationMenuItems())
[helpMenu release];
Please note that, as presented, only macosx-compat.h & appmenu_osx.mm need
these adjustments. Also, I’ve avoided consolidating any of the code
segments (in replaceApplicationMenuItems()) to preserve the existing flow
of events in macOS 10.6 & later.
I would appreciate your support with this, as I see no downside to making
this change. Since you can’t test the changes personally on 10.5, by
adding them to master I can at least give you feedback from the
developmental build.
Worst case scenario, we’ve eliminated at least one problem.
I’ve attached copies of both files to clarify the intended changes.
--
Ticket URL: <https://bugs.scummvm.org/ticket/11260#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list