fix: move trophy pngs to src/images (#2519)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

* fix: move trophy pngs to src/images

* Fix pointers to trophy files

---------

Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
This commit is contained in:
jarred wilson 2025-02-24 14:39:27 -06:00 committed by GitHub
parent eac1daa5f7
commit 15d10e47ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 18 deletions

View file

@ -954,12 +954,6 @@ set(QT_GUI src/qt_gui/about_dialog.cpp
)
endif()
set(RESOURCEFOLDER Resources/bronze.png
Resources/gold.png
Resources/platinum.png
Resources/silver.png
)
if (ENABLE_QT_GUI)
qt_add_executable(shadps4
${AUDIO_CORE}
@ -971,7 +965,6 @@ if (ENABLE_QT_GUI)
${SHADER_RECOMPILER}
${VIDEO_CORE}
${EMULATOR}
${RESOURCEFOLDER}
src/images/shadPS4.icns
)
else()
@ -984,7 +977,6 @@ else()
${SHADER_RECOMPILER}
${VIDEO_CORE}
${EMULATOR}
${RESOURCEFOLDER}
src/main.cpp
src/emulator.cpp
src/emulator.h
@ -1117,7 +1109,10 @@ include(CMakeRC)
cmrc_add_resource_library(embedded-resources
ALIAS res::embedded
NAMESPACE res
${RESOURCEFOLDER})
src/images/bronze.png
src/images/gold.png
src/images/platinum.png
src/images/silver.png)
target_link_libraries(shadps4 PRIVATE res::embedded)

View file

@ -19,11 +19,11 @@ path = [
"documents/Screenshots/*",
"documents/Screenshots/Linux/*",
"externals/MoltenVK/MoltenVK_icd.json",
"Resources/bronze.png",
"Resources/gold.png",
"Resources/platinum.png",
"Resources/silver.png",
"scripts/ps4_names.txt",
"src/images/bronze.png",
"src/images/gold.png",
"src/images/platinum.png",
"src/images/silver.png",
"src/images/about_icon.png",
"src/images/controller_icon.png",
"src/images/discord.png",

View file

@ -33,13 +33,13 @@ TrophyUI::TrophyUI(const std::filesystem::path& trophyIconPath, const std::strin
std::string pathString;
if (trophy_type == "P") {
pathString = "Resources/platinum.png";
pathString = "src/images/platinum.png";
} else if (trophy_type == "G") {
pathString = "Resources/gold.png";
pathString = "src/images/gold.png";
} else if (trophy_type == "S") {
pathString = "Resources/silver.png";
pathString = "src/images/silver.png";
} else if (trophy_type == "B") {
pathString = "Resources/bronze.png";
pathString = "src/images/bronze.png";
}
auto resource = cmrc::res::get_filesystem();

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -123,7 +123,7 @@ void TrophyViewer::PopulateTrophyWidget(QString title) {
QTableWidgetItem* typeitem = new QTableWidgetItem();
auto resource = cmrc::res::get_filesystem();
std::string resourceString = "Resources/" + filename;
std::string resourceString = "src/images/" + filename;
auto file = resource.open(resourceString);
std::vector<char> imgdata(file.begin(), file.end());
QImage type_icon = QImage::fromData(imgdata).scaled(QSize(64, 64), Qt::KeepAspectRatio,