Compare commits
58 Commits
android-26
...
android-26
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1367d9323a | ||
|
|
7428f977c2 | ||
|
|
ea9fd436cf | ||
|
|
3bdaf0dc00 | ||
|
|
4368dc14c8 | ||
|
|
13059b300f | ||
|
|
55065f3972 | ||
|
|
975d6f1ec4 | ||
|
|
7c9e2255be | ||
|
|
9f6818a6e5 | ||
|
|
f1c16b487a | ||
|
|
6512f39061 | ||
|
|
22b91afa69 | ||
|
|
77107ba124 | ||
|
|
fa4dec9fe9 | ||
|
|
215e887be0 | ||
|
|
0da6704fc2 | ||
|
|
812754edec | ||
|
|
964e19ab56 | ||
|
|
9dc624f5dc | ||
|
|
dad9ea3e07 | ||
|
|
2c00599a53 | ||
|
|
864b046500 | ||
|
|
c04567fad4 | ||
|
|
89c2fd3d28 | ||
|
|
5ab49c833d | ||
|
|
0e74204aad | ||
|
|
a37bd0b9a7 | ||
|
|
01d89acd13 | ||
|
|
e85466c1ae | ||
|
|
352297d361 | ||
|
|
6c2d6cff19 | ||
|
|
e540757279 | ||
|
|
a8bca24292 | ||
|
|
5f3c03d6a8 | ||
|
|
6b956a6951 | ||
|
|
8689370830 | ||
|
|
8ffa27b311 | ||
|
|
6334616b44 | ||
|
|
2e4a6b7f92 | ||
|
|
5f90bd88da | ||
|
|
c575a85233 | ||
|
|
ea4703cb31 | ||
|
|
0471e54e5a | ||
|
|
6012c9fe3a | ||
|
|
f65539504f | ||
|
|
62083fcafd | ||
|
|
2e5a9cf119 | ||
|
|
a45b8bc9bc | ||
|
|
a05bd3c47e | ||
|
|
2a2c92f181 | ||
|
|
f54277364c | ||
|
|
b5a17b501b | ||
|
|
2b18957365 | ||
|
|
4c71bf3d90 | ||
|
|
fdf4a5bc90 | ||
|
|
b7d9eba72b | ||
|
|
380475af32 |
3
.github/workflows/verify.yml
vendored
3
.github/workflows/verify.yml
vendored
@@ -81,8 +81,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# workaround for https://github.com/actions/setup-python/issues/577
|
||||
brew install autoconf automake boost@1.83 ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd || brew link --overwrite python@3.12
|
||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|----|----|----|----|----|
|
||||
| [12461](https://github.com/yuzu-emu/yuzu//pull/12461) | [`2831f5dc6`](https://github.com/yuzu-emu/yuzu//pull/12461/files) | Rework Nvdec and VIC to fix out-of-order videos, and speed up decoding. | [Kelebek1](https://github.com/Kelebek1/) | Yes |
|
||||
| [12749](https://github.com/yuzu-emu/yuzu//pull/12749) | [`aad4b0d6f`](https://github.com/yuzu-emu/yuzu//pull/12749/files) | general: workarounds for SMMU syncing issues | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13073](https://github.com/yuzu-emu/yuzu//pull/13073) | [`b5a17b501`](https://github.com/yuzu-emu/yuzu//pull/13073/files) | fsp: Migrate remaining interfaces to cmif serialization | [FearlessTobi](https://github.com/FearlessTobi/) | Yes |
|
||||
| [13081](https://github.com/yuzu-emu/yuzu//pull/13081) | [`197c4d325`](https://github.com/yuzu-emu/yuzu//pull/13081/files) | aoc: Migrate to use cmif serialization | [FearlessTobi](https://github.com/FearlessTobi/) | Yes |
|
||||
| [13081](https://github.com/yuzu-emu/yuzu//pull/13081) | [`2786d34dd`](https://github.com/yuzu-emu/yuzu//pull/13081/files) | aoc: Migrate to use cmif serialization | [FearlessTobi](https://github.com/FearlessTobi/) | Yes |
|
||||
| [13096](https://github.com/yuzu-emu/yuzu//pull/13096) | [`0a8759057`](https://github.com/yuzu-emu/yuzu//pull/13096/files) | texture_cache: use two-pass collection for costly load resources | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13100](https://github.com/yuzu-emu/yuzu//pull/13100) | [`c04567fad`](https://github.com/yuzu-emu/yuzu//pull/13100/files) | audio: move to new ipc | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13115](https://github.com/yuzu-emu/yuzu//pull/13115) | [`89c2fd3d2`](https://github.com/yuzu-emu/yuzu//pull/13115/files) | olsc, pctl: move to new ipc | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13116](https://github.com/yuzu-emu/yuzu//pull/13116) | [`54ed837ad`](https://github.com/yuzu-emu/yuzu//pull/13116/files) | android: Flip AB/XY for 8Bitdo controllers | [t895](https://github.com/t895/) | Yes |
|
||||
| [13117](https://github.com/yuzu-emu/yuzu//pull/13117) | [`e85466c1a`](https://github.com/yuzu-emu/yuzu//pull/13117/files) | psc: stub overlay notification channel | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
| [13122](https://github.com/yuzu-emu/yuzu//pull/13122) | [`505b3e4a7`](https://github.com/yuzu-emu/yuzu//pull/13122/files) | vk_rasterizer: flip scissor y on lower left origin mode | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||
|
||||
|
||||
End of merge log. You can find the original README.md below the break.
|
||||
|
||||
@@ -146,11 +146,15 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (released < tags.size()) {
|
||||
tags[released] = tag;
|
||||
}
|
||||
|
||||
released++;
|
||||
|
||||
if (released >= tags.size()) {
|
||||
break;
|
||||
}
|
||||
|
||||
tags[released++] = tag;
|
||||
}
|
||||
|
||||
return released;
|
||||
|
||||
@@ -67,9 +67,13 @@ public:
|
||||
oboe::AudioStreamBuilder builder;
|
||||
|
||||
const auto result = ConfigureBuilder(builder, direction)->openStream(temp_stream);
|
||||
ASSERT(result == oboe::Result::OK);
|
||||
if (result == oboe::Result::OK) {
|
||||
return temp_stream->getChannelCount() >= 6 ? 6 : 2;
|
||||
}
|
||||
|
||||
return temp_stream->getChannelCount() >= 6 ? 6 : 2;
|
||||
LOG_ERROR(Audio_Sink, "Failed to open {} stream. Using default channel count 2",
|
||||
direction == oboe::Direction::Output ? "output" : "input");
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -625,6 +625,8 @@ add_library(core STATIC
|
||||
hle/service/filesystem/fsp/fsp_srv.cpp
|
||||
hle/service/filesystem/fsp/fsp_srv.h
|
||||
hle/service/filesystem/fsp/fsp_types.h
|
||||
hle/service/filesystem/fsp/save_data_transfer_prohibiter.cpp
|
||||
hle/service/filesystem/fsp/save_data_transfer_prohibiter.h
|
||||
hle/service/filesystem/romfs_controller.cpp
|
||||
hle/service/filesystem/romfs_controller.h
|
||||
hle/service/filesystem/save_data_controller.cpp
|
||||
|
||||
@@ -164,6 +164,19 @@ static_assert(sizeof(SaveDataExtraData) == 0x200, "SaveDataExtraData has invalid
|
||||
static_assert(std::is_trivially_copyable_v<SaveDataExtraData>,
|
||||
"Data type must be trivially copyable.");
|
||||
|
||||
struct SaveDataFilter {
|
||||
bool use_program_id;
|
||||
bool use_save_data_type;
|
||||
bool use_user_id;
|
||||
bool use_save_data_id;
|
||||
bool use_index;
|
||||
SaveDataRank rank;
|
||||
SaveDataAttribute attribute;
|
||||
};
|
||||
static_assert(sizeof(SaveDataFilter) == 0x48, "SaveDataFilter has invalid size.");
|
||||
static_assert(std::is_trivially_copyable_v<SaveDataFilter>,
|
||||
"Data type must be trivially copyable.");
|
||||
|
||||
struct HashSalt {
|
||||
static constexpr size_t Size = 32;
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ Result IAddOnContentManager::ListAddOnContent(Out<u32> out_count,
|
||||
*out_count = static_cast<u32>(std::min<size_t>(out.size() - offset, count));
|
||||
std::rotate(out.begin(), out.begin() + offset, out.end());
|
||||
|
||||
std::memcpy(out_addons.data(), out.data(), *out_count);
|
||||
std::memcpy(out_addons.data(), out.data(), *out_count * sizeof(u32));
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h"
|
||||
#include "core/hle/service/filesystem/fsp/fs_i_storage.h"
|
||||
#include "core/hle/service/filesystem/fsp/fsp_srv.h"
|
||||
#include "core/hle/service/filesystem/fsp/save_data_transfer_prohibiter.h"
|
||||
#include "core/hle/service/filesystem/romfs_controller.h"
|
||||
#include "core/hle/service/filesystem/save_data_controller.h"
|
||||
#include "core/hle/service/hle_ipc.h"
|
||||
@@ -87,7 +88,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
||||
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
||||
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
||||
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
||||
{67, nullptr, "FindSaveDataWithFilter"},
|
||||
{67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"},
|
||||
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
||||
{69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||
{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||
@@ -95,7 +96,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
||||
{80, nullptr, "OpenSaveDataMetaFile"},
|
||||
{81, nullptr, "OpenSaveDataTransferManager"},
|
||||
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
||||
{83, nullptr, "OpenSaveDataTransferProhibiterForCloudBackUp"},
|
||||
{83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"},
|
||||
{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
|
||||
{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
|
||||
{86, nullptr, "OpenSaveDataMover"},
|
||||
@@ -235,7 +236,7 @@ Result FSP_SRV::CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_crea
|
||||
}
|
||||
|
||||
Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(
|
||||
FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct) {
|
||||
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct) {
|
||||
LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo());
|
||||
|
||||
FileSys::VirtualDir save_data_dir{};
|
||||
@@ -308,6 +309,14 @@ Result FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage(
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result FSP_SRV::FindSaveDataWithFilter(Out<s64> out_count,
|
||||
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||
FileSys::SaveDataSpaceId space_id,
|
||||
FileSys::SaveDataFilter filter) {
|
||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||
R_THROW(FileSys::ResultTargetNotFound);
|
||||
}
|
||||
|
||||
Result FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute() {
|
||||
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
||||
|
||||
@@ -332,6 +341,13 @@ Result FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result FSP_SRV::OpenSaveDataTransferProhibiter(
|
||||
OutInterface<ISaveDataTransferProhibiter> out_prohibiter, u64 id) {
|
||||
LOG_WARNING(Service_FS, "(STUBBED) called, id={:016X}", id);
|
||||
*out_prohibiter = std::make_shared<ISaveDataTransferProhibiter>(system);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result FSP_SRV::OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface) {
|
||||
LOG_DEBUG(Service_FS, "called");
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class SaveDataController;
|
||||
|
||||
class IFileSystem;
|
||||
class ISaveDataInfoReader;
|
||||
class ISaveDataTransferProhibiter;
|
||||
class IStorage;
|
||||
class IMultiCommitManager;
|
||||
|
||||
@@ -53,7 +54,7 @@ private:
|
||||
Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct,
|
||||
FileSys::SaveDataAttribute save_struct, u128 uid);
|
||||
Result CreateSaveDataFileSystemBySystemSaveDataId(
|
||||
FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct);
|
||||
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct);
|
||||
Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
|
||||
FileSys::SaveDataSpaceId space_id,
|
||||
FileSys::SaveDataAttribute attribute);
|
||||
@@ -66,11 +67,16 @@ private:
|
||||
Result OpenSaveDataInfoReaderBySaveDataSpaceId(OutInterface<ISaveDataInfoReader> out_interface,
|
||||
FileSys::SaveDataSpaceId space);
|
||||
Result OpenSaveDataInfoReaderOnlyCacheStorage(OutInterface<ISaveDataInfoReader> out_interface);
|
||||
Result FindSaveDataWithFilter(Out<s64> out_count, OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||
FileSys::SaveDataSpaceId space_id,
|
||||
FileSys::SaveDataFilter filter);
|
||||
Result WriteSaveDataFileSystemExtraDataBySaveDataAttribute();
|
||||
Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||
FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute,
|
||||
InBuffer<BufferAttr_HipcMapAlias> mask_buffer,
|
||||
OutBuffer<BufferAttr_HipcMapAlias> out_buffer);
|
||||
Result OpenSaveDataTransferProhibiter(OutInterface<ISaveDataTransferProhibiter> out_prohibiter,
|
||||
u64 id);
|
||||
Result OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface);
|
||||
Result OpenDataStorageByDataId(OutInterface<IStorage> out_interface,
|
||||
FileSys::StorageId storage_id, u32 unknown, u64 title_id);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/hle/service/filesystem/fsp/save_data_transfer_prohibiter.h"
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
ISaveDataTransferProhibiter::ISaveDataTransferProhibiter(Core::System& system_)
|
||||
: ServiceFramework{system_, "ISaveDataTransferProhibiter"} {}
|
||||
|
||||
ISaveDataTransferProhibiter::~ISaveDataTransferProhibiter() = default;
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
@@ -0,0 +1,16 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
class ISaveDataTransferProhibiter : public ServiceFramework<ISaveDataTransferProhibiter> {
|
||||
public:
|
||||
explicit ISaveDataTransferProhibiter(Core::System& system_);
|
||||
~ISaveDataTransferProhibiter() override;
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "common/polyfill_thread.h"
|
||||
#include "common/thread.h"
|
||||
|
||||
#include "core/hle/service/vi/vsync_manager.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
@@ -26,7 +28,6 @@ namespace Service::VI {
|
||||
|
||||
class Container;
|
||||
class DisplayList;
|
||||
class VsyncManager;
|
||||
|
||||
class Conductor {
|
||||
public:
|
||||
|
||||
@@ -125,9 +125,11 @@ VkRect2D GetScissorState(const Maxwell& regs, size_t index, u32 up_scale = 1, u3
|
||||
return value < 0 ? std::min<s32>(converted_value - acumm, -1)
|
||||
: std::max<s32>(converted_value + acumm, 1);
|
||||
};
|
||||
const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
|
||||
const s32 y_adj = lower_left ? scale_up(regs.surface_clip.height - (src.max_y - src.min_y)) : 0;
|
||||
if (src.enable) {
|
||||
scissor.offset.x = scale_up(static_cast<s32>(src.min_x));
|
||||
scissor.offset.y = scale_up(static_cast<s32>(src.min_y));
|
||||
scissor.offset.y = scale_up(static_cast<s32>(src.min_y)) + y_adj;
|
||||
scissor.extent.width = scale_up(src.max_x - src.min_x);
|
||||
scissor.extent.height = scale_up(src.max_y - src.min_y);
|
||||
} else {
|
||||
|
||||
@@ -3010,9 +3010,6 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
|
||||
|
||||
void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path,
|
||||
GameListShortcutTarget target) {
|
||||
std::string game_title;
|
||||
QString qt_game_title;
|
||||
std::filesystem::path out_icon_path;
|
||||
// Get path to yuzu executable
|
||||
const QStringList args = QApplication::arguments();
|
||||
std::filesystem::path yuzu_command = args[0].toStdString();
|
||||
@@ -3029,48 +3026,51 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
|
||||
shortcut_path =
|
||||
QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString();
|
||||
}
|
||||
// Icon path and title
|
||||
if (std::filesystem::exists(shortcut_path)) {
|
||||
// Get title from game file
|
||||
const FileSys::PatchManager pm{program_id, system->GetFileSystemController(),
|
||||
system->GetContentProvider()};
|
||||
const auto control = pm.GetControlMetadata();
|
||||
const auto loader =
|
||||
Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::OpenMode::Read));
|
||||
game_title = fmt::format("{:016X}", program_id);
|
||||
if (control.first != nullptr) {
|
||||
game_title = control.first->GetApplicationName();
|
||||
} else {
|
||||
loader->ReadTitle(game_title);
|
||||
}
|
||||
// Delete illegal characters from title
|
||||
const std::string illegal_chars = "<>:\"/\\|?*.";
|
||||
for (auto it = game_title.rbegin(); it != game_title.rend(); ++it) {
|
||||
if (illegal_chars.find(*it) != std::string::npos) {
|
||||
game_title.erase(it.base() - 1);
|
||||
}
|
||||
}
|
||||
qt_game_title = QString::fromStdString(game_title);
|
||||
// Get icon from game file
|
||||
std::vector<u8> icon_image_file{};
|
||||
if (control.second != nullptr) {
|
||||
icon_image_file = control.second->ReadAllBytes();
|
||||
} else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) {
|
||||
LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path);
|
||||
}
|
||||
QImage icon_data =
|
||||
QImage::fromData(icon_image_file.data(), static_cast<int>(icon_image_file.size()));
|
||||
if (GMainWindow::MakeShortcutIcoPath(program_id, game_title, out_icon_path)) {
|
||||
if (!SaveIconToFile(out_icon_path, icon_data)) {
|
||||
LOG_ERROR(Frontend, "Could not write icon to file");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR,
|
||||
qt_game_title);
|
||||
LOG_ERROR(Frontend, "Invalid shortcut target");
|
||||
|
||||
if (!std::filesystem::exists(shortcut_path)) {
|
||||
GMainWindow::CreateShortcutMessagesGUI(
|
||||
this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR,
|
||||
QString::fromStdString(shortcut_path.generic_string()));
|
||||
LOG_ERROR(Frontend, "Invalid shortcut target {}", shortcut_path.generic_string());
|
||||
return;
|
||||
}
|
||||
|
||||
// Get title from game file
|
||||
const FileSys::PatchManager pm{program_id, system->GetFileSystemController(),
|
||||
system->GetContentProvider()};
|
||||
const auto control = pm.GetControlMetadata();
|
||||
const auto loader =
|
||||
Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::OpenMode::Read));
|
||||
std::string game_title = fmt::format("{:016X}", program_id);
|
||||
if (control.first != nullptr) {
|
||||
game_title = control.first->GetApplicationName();
|
||||
} else {
|
||||
loader->ReadTitle(game_title);
|
||||
}
|
||||
// Delete illegal characters from title
|
||||
const std::string illegal_chars = "<>:\"/\\|?*.";
|
||||
for (auto it = game_title.rbegin(); it != game_title.rend(); ++it) {
|
||||
if (illegal_chars.find(*it) != std::string::npos) {
|
||||
game_title.erase(it.base() - 1);
|
||||
}
|
||||
}
|
||||
const QString qt_game_title = QString::fromStdString(game_title);
|
||||
// Get icon from game file
|
||||
std::vector<u8> icon_image_file{};
|
||||
if (control.second != nullptr) {
|
||||
icon_image_file = control.second->ReadAllBytes();
|
||||
} else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) {
|
||||
LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path);
|
||||
}
|
||||
QImage icon_data =
|
||||
QImage::fromData(icon_image_file.data(), static_cast<int>(icon_image_file.size()));
|
||||
std::filesystem::path out_icon_path;
|
||||
if (GMainWindow::MakeShortcutIcoPath(program_id, game_title, out_icon_path)) {
|
||||
if (!SaveIconToFile(out_icon_path, icon_data)) {
|
||||
LOG_ERROR(Frontend, "Could not write icon to file");
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
// Special case for AppImages
|
||||
// Warn once if we are making a shortcut to a volatile AppImage
|
||||
|
||||
Reference in New Issue
Block a user