From 27b793f0e8213db00ae69a6e3e631056b750f53b Mon Sep 17 00:00:00 2001 From: Marat Idrisov Date: Thu, 21 Nov 2024 20:02:30 +0300 Subject: [PATCH] [MacOS] Enable game mode when switching to full screen mode (#1541) * GH-1515: enable game mode when switching to full screen mode * GH-1515: minor fix * GH-1515: add MacOSBundleInfo.plist.in to REUSE.toml --- .gitignore | 3 +++ CMakeLists.txt | 5 +++- REUSE.toml | 1 + dist/MacOSBundleInfo.plist.in | 46 +++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 dist/MacOSBundleInfo.plist.in diff --git a/.gitignore b/.gitignore index 61d9e32e..c331f9e7 100644 --- a/.gitignore +++ b/.gitignore @@ -414,3 +414,6 @@ FodyWeavers.xsd # for macOS **/.DS_Store + +# JetBrains +.idea diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cfd859..35fc35f2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -921,7 +921,10 @@ if (ENABLE_QT_GUI) set_target_properties(shadps4 PROPERTIES # WIN32_EXECUTABLE ON MACOSX_BUNDLE ON - MACOSX_BUNDLE_ICON_FILE shadPS4.icns) + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/dist/MacOSBundleInfo.plist.in" + MACOSX_BUNDLE_ICON_FILE "shadPS4.icns" + MACOSX_BUNDLE_SHORT_VERSION_STRING "0.4.1" + ) set_source_files_properties(src/images/shadPS4.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) diff --git a/REUSE.toml b/REUSE.toml index 40515623..7b2862e5 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -7,6 +7,7 @@ path = [ ".github/FUNDING.yml", ".github/shadps4.png", ".gitmodules", + "dist/MacOSBundleInfo.plist.in", "dist/net.shadps4.shadPS4.desktop", "dist/net.shadps4.shadPS4_metadata.pot", "dist/net.shadps4.shadPS4.metainfo.xml", diff --git a/dist/MacOSBundleInfo.plist.in b/dist/MacOSBundleInfo.plist.in new file mode 100644 index 00000000..70cbfb4a --- /dev/null +++ b/dist/MacOSBundleInfo.plist.in @@ -0,0 +1,46 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + + CFBundleName + shadps4 + CFBundleIdentifier + com.shadps4-emu.shadps4 + CFBundleExecutable + shadps4 + + CFBundleVersion + 1.0.0 + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} + + LSMinimumSystemVersion + ${CMAKE_OSX_DEPLOYMENT_TARGET} + LSApplicationCategoryType + public.app-category.games + GCSupportsGameMode + + + NSHumanReadableCopyright + + + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + + CFBundleDevelopmentRegion + en + CFBundleAllowMixedLocalizations + + + NSPrincipalClass + NSApplication + + NSSupportsAutomaticGraphicsSwitching + + +