Fix pointers to trophy files

This commit is contained in:
rainmakerv2 2025-02-24 21:19:48 +08:00 committed by jarred wilson
parent ba9d57b7b2
commit 7d503580bf
3 changed files with 9 additions and 7 deletions

View File

@ -977,7 +977,6 @@ else()
${SHADER_RECOMPILER} ${SHADER_RECOMPILER}
${VIDEO_CORE} ${VIDEO_CORE}
${EMULATOR} ${EMULATOR}
${RESOURCEFOLDER}
src/main.cpp src/main.cpp
src/emulator.cpp src/emulator.cpp
src/emulator.h src/emulator.h
@ -1110,7 +1109,10 @@ include(CMakeRC)
cmrc_add_resource_library(embedded-resources cmrc_add_resource_library(embedded-resources
ALIAS res::embedded ALIAS res::embedded
NAMESPACE res 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) target_link_libraries(shadps4 PRIVATE res::embedded)

View File

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

View File

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