Quickplay integration for MacOS
This commit is contained in:
parent
acd925ffaa
commit
5304f8026e
|
@ -1,4 +1,5 @@
|
|||
#import <AppKit/AppKit.h>
|
||||
#include <QString>
|
||||
|
||||
void MacOSSetDarkAppearance()
|
||||
{
|
||||
|
@ -7,3 +8,11 @@ void MacOSSetDarkAppearance()
|
|||
[NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]];
|
||||
#endif
|
||||
}
|
||||
|
||||
QString MacOSPathToDolphinBinary()
|
||||
{
|
||||
if (id path = [[NSWorkspace sharedWorkspace]
|
||||
absolutePathForAppBundleWithIdentifier:@"org.dolphin-emu.dolphin"])
|
||||
return QString::fromNSString(path) + QStringLiteral("/Contents/MacOS/Dolphin");
|
||||
return QString();
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
#undef MoveFile
|
||||
#undef DeleteFile
|
||||
|
||||
#if defined(__APPLE__)
|
||||
QString MacOSPathToDolphinBinary();
|
||||
#endif
|
||||
|
||||
namespace NDolphinIntegration
|
||||
{
|
||||
|
||||
|
@ -319,6 +323,12 @@ QString GetDolphinPath()
|
|||
{
|
||||
gDolphinPath = Path;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
gDolphinPath = MacOSPathToDolphinBinary();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return Path;
|
||||
|
|
Loading…
Reference in New Issue