summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 7cc11ae3b..9eafacea7 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2906,7 +2906,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
2906 2906
2907 const std::string game_file_name = std::filesystem::path(game_path).filename().string(); 2907 const std::string game_file_name = std::filesystem::path(game_path).filename().string();
2908 // Determine full paths for icon and shortcut 2908 // Determine full paths for icon and shortcut
2909#if defined(__linux__) || defined(__FreeBSD__) 2909#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
2910 const char* home = std::getenv("HOME"); 2910 const char* home = std::getenv("HOME");
2911 const std::filesystem::path home_path = (home == nullptr ? "~" : home); 2911 const std::filesystem::path home_path = (home == nullptr ? "~" : home);
2912 const char* xdg_data_home = std::getenv("XDG_DATA_HOME"); 2912 const char* xdg_data_home = std::getenv("XDG_DATA_HOME");
@@ -2963,7 +2963,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
2963 2963
2964 QImage icon_data = 2964 QImage icon_data =
2965 QImage::fromData(icon_image_file.data(), static_cast<int>(icon_image_file.size())); 2965 QImage::fromData(icon_image_file.data(), static_cast<int>(icon_image_file.size()));
2966#if defined(__linux__) || defined(__FreeBSD__) 2966#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
2967 // Convert and write the icon as a PNG 2967 // Convert and write the icon as a PNG
2968 if (!icon_data.save(QString::fromStdString(icon_path.string()))) { 2968 if (!icon_data.save(QString::fromStdString(icon_path.string()))) {
2969 LOG_ERROR(Frontend, "Could not write icon as PNG to file"); 2969 LOG_ERROR(Frontend, "Could not write icon as PNG to file");
@@ -4002,7 +4002,7 @@ bool GMainWindow::CreateShortcut(const std::string& shortcut_path, const std::st
4002 const std::string& comment, const std::string& icon_path, 4002 const std::string& comment, const std::string& icon_path,
4003 const std::string& command, const std::string& arguments, 4003 const std::string& command, const std::string& arguments,
4004 const std::string& categories, const std::string& keywords) { 4004 const std::string& categories, const std::string& keywords) {
4005#if defined(__linux__) || defined(__FreeBSD__) 4005#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
4006 // This desktop file template was writing referencing 4006 // This desktop file template was writing referencing
4007 // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html 4007 // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html
4008 std::string shortcut_contents{}; 4008 std::string shortcut_contents{};