Skip to content

Commit

Permalink
[MacOS] Enable game mode when switching to full screen mode (shadps4-…
Browse files Browse the repository at this point in the history
…emu#1541)

* shadps4-emuGH-1515: enable game mode when switching to full screen mode

* shadps4-emuGH-1515: minor fix

* shadps4-emuGH-1515: add MacOSBundleInfo.plist.in to REUSE.toml
  • Loading branch information
alphavector authored Nov 21, 2024
1 parent 5054827 commit 2a06294
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,6 @@ FodyWeavers.xsd

# for macOS
**/.DS_Store

# JetBrains
.idea
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
46 changes: 46 additions & 0 deletions dist/MacOSBundleInfo.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>

<key>CFBundleName</key>
<string>shadps4</string>
<key>CFBundleIdentifier</key>
<string>com.shadps4-emu.shadps4</string>
<key>CFBundleExecutable</key>
<string>shadps4</string>

<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>

<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>GCSupportsGameMode</key>
<true/>

<key>NSHumanReadableCopyright</key>
<string></string>

<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>

<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>

<key>NSPrincipalClass</key>
<string>NSApplication</string>

<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>

0 comments on commit 2a06294

Please sign in to comment.