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