appimage fixes, rpc, some more
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 24m56s
eden-build / windows (msvc) (pull_request) Has been cancelled
eden-build / android (pull_request) Has been cancelled
eden-license / license-header (pull_request_target) Has been cancelled

- add back discord rpc
- remove getcradlefwversion stub
- add "Don't Show Again" option for desktop pre alpha banner
- add citron warning on android
- add polaris warning on desktop

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-05-11 19:09:22 -04:00
parent 83a602a8af
commit 317cba3685
Signed by: crueter
GPG key ID: A5A7629F109C8FD1
14 changed files with 87 additions and 68 deletions

View file

@ -61,7 +61,6 @@ cmake .. -G Ninja \
-DYUZU_USE_QT_WEB_ENGINE=OFF \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=OFF \
-DBUNDLE_SPEEX=ON \
-DYUZU_USE_FASTER_LD=OFF \
-DYUZU_ENABLE_LTO=ON \
-DCMAKE_LINKER=/usr/bin/mold \

View file

@ -28,21 +28,22 @@ VERSION="$(echo "$EDEN_TAG")"
mkdir -p ./AppDir
cd ./AppDir
cat > org.eden_emu.eden.desktop << EOL
cat > eden.desktop << EOL
[Desktop Entry]
Type=Application
Name=Eden
Icon=org.eden_emu.eden
Icon=eden
StartupWMClass=eden
Exec=eden
Categories=Game;Emulator;
EOL
cp ../dist/eden.svg ./org.eden_emu.eden.svg
cp ../dist/eden.svg ./eden.svg
ln -sf ./org.eden_emu.eden.svg.svg ./.DirIcon
ln -sf ./eden.svg ./.DirIcon
if [ "$DEVEL" = 'true' ]; then
sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop
sed -i 's|Name=Eden|Name=Eden Nightly|' ./eden.desktop
UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')"
fi

View file

@ -102,7 +102,7 @@ jobs:
uses: forgejo/upload-artifact@v4
with:
name: linux.zip
path: ./*.AppImage
path: ./*.AppImage*
android:
runs-on: android
@ -177,6 +177,7 @@ jobs:
mkdir -p dist
cp linux.zip/Eden-*.AppImage dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage
cp linux.zip/Eden-*.AppImage.zsync dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage.zsync
cp msvc.zip/eden-windows-msvc*.zip dist/Eden-Windows-MSVC-${{ env.VERSION }}-amd64.zip
cp android.zip/eden-android*.apk dist/Eden-Android-${{ env.VERSION }}.apk
cp android.zip/eden-android*.aab dist/Eden-Android-${{ env.VERSION }}.aab

View file

@ -105,13 +105,13 @@ if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
"${vvl_zip_file}" SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
endif()
# Copy the arm64 binary to src/android/app/main/jniLibs
set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
DESTINATION "${vvl_lib_path}")
DESTINATION "${vvl_lib_path}")
endif()
if (ANDROID)
@ -209,7 +209,7 @@ function(check_submodules_present)
string(REGEX REPLACE "path *= *" "" module ${module})
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git")
message(FATAL_ERROR "Git submodule ${module} not found. "
"Please run: \ngit submodule update --init --recursive")
"Please run: \ngit submodule update --init --recursive")
endif()
endforeach()
endfunction()
@ -218,12 +218,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND YUZU_CHECK_SUBMODULES)
check_submodules_present()
endif()
configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
COPYONLY)
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
COPYONLY)
if (EXISTS ${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json)
configure_file("${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json"
"${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json"
COPYONLY)
"${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json"
COPYONLY)
endif()
if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json)
message(STATUS "Downloading compatibility list for yuzu...")
@ -431,34 +431,34 @@ if (ENABLE_QT)
endif()
function(set_yuzu_qt_components)
# Best practice is to ask for all components at once, so they are from the same version
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND YUZU_QT_COMPONENTS2 DBus)
endif()
if (YUZU_USE_QT_MULTIMEDIA)
list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
# Best practice is to ask for all components at once, so they are from the same version
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND YUZU_QT_COMPONENTS2 DBus)
endif()
if (YUZU_USE_QT_MULTIMEDIA)
list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
endif()
if (YUZU_USE_QT_WEB_ENGINE)
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
endif()
if (ENABLE_QT_TRANSLATION)
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
endif()
if (USE_DISCORD_PRESENCE)
list(APPEND YUZU_QT_COMPONENTS2 Network)
list(APPEND YUZU_QT_COMPONENTS2 Network)
endif()
set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE)
endfunction(set_yuzu_qt_components)
endfunction(set_yuzu_qt_components)
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
avcodec
avfilter
avutil
swscale)
if (UNIX AND NOT APPLE AND NOT ANDROID)
if (UNIX AND NOT APPLE AND NOT ANDROID)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBVA libva)
endif()
@ -468,12 +468,12 @@ if (NOT YUZU_USE_BUNDLED_FFMPEG)
endif()
if(ENABLE_QT)
set_yuzu_qt_components()
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
set(QT_MAJOR_VERSION 6)
# Qt6 sets cxx_std_17 and we need to undo that
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
endif()
set_yuzu_qt_components()
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
set(QT_MAJOR_VERSION 6)
# Qt6 sets cxx_std_17 and we need to undo that
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
endif()
if (WIN32 AND YUZU_CRASH_DUMPS)
set(BREAKPAD_VER "breakpad-c89f9dd")
@ -517,7 +517,7 @@ endif()
set(CLANG_FORMAT_POSTFIX "-15")
find_program(CLANG_FORMAT
NAMES clang-format${CLANG_FORMAT_POSTFIX}
clang-format
clang-format
PATHS ${PROJECT_BINARY_DIR}/externals)
# if find_program doesn't find it, try to download from externals
if (NOT CLANG_FORMAT)
@ -642,12 +642,12 @@ endif()
# https://www.freedesktop.org/software/appstream/docs/
if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.yuzu_emu.yuzu.desktop"
DESTINATION "share/applications")
DESTINATION "share/applications")
install(FILES "dist/eden.svg"
DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "org.yuzu_emu.eden.svg")
DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "org.yuzu_emu.eden.svg")
install(FILES "dist/org.yuzu_emu.yuzu.xml"
DESTINATION "share/mime/packages")
DESTINATION "share/mime/packages")
install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
DESTINATION "share/metainfo")
DESTINATION "share/metainfo")
endif()

View file

@ -168,7 +168,6 @@ android {
"-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
"-DBUNDLE_SPEEX=ON",
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
"-DYUZU_USE_BUNDLED_VCPKG=ON",
"-DYUZU_USE_BUNDLED_FFMPEG=ON",

View file

@ -329,7 +329,7 @@
<string name="licenses_description">Projects that make eden for Android possible</string>
<string name="build">Build</string>
<string name="user_data">User data</string>
<string name="user_data_description">Import/export all app data.\n\nWhen importing user data, all existing user data will be deleted!</string>
<string name="user_data_description">Import/export all app data.\n\nWhen importing user data, all existing user data will be deleted!\n\nImporting data from Citron may cause issues. It\'s recommended to manually import all needed data.</string>
<string name="exporting_user_data">Exporting user data…</string>
<string name="importing_user_data">Importing user data…</string>
<string name="import_user_data">Import user data</string>

View file

@ -640,6 +640,10 @@ struct Values {
Setting<bool> log_flush_lines{linkage, false, "flush_lines", Category::Miscellaneous};
Setting<bool> use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous};
Setting<bool> first_launch{linkage, true, "first_launch", Category::Miscellaneous};
Setting<bool> hide_pre_alpha_warning{linkage,
false,
"hide_pre_alpha_warning",
Category::Miscellaneous};
// Network
Setting<std::string> network_interface{linkage, std::string(), "network_interface",

View file

@ -38,7 +38,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
{30, nullptr, "GetHomeButtonReaderLockAccessor"},
{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"},
{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"},
{40, D<&ICommonStateGetter::GetCradleFwVersion>, "GetCradleFwVersion"},
{40, nullptr, "GetCradleFwVersion"},
{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"},
{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"},
{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"},
@ -172,17 +172,6 @@ Result ICommonStateGetter::GetBootMode(Out<PM::SystemBootMode> out_boot_mode) {
R_SUCCEED();
}
Result ICommonStateGetter::GetCradleFwVersion(OutArray<uint32_t, 4> out_version) {
LOG_DEBUG(Service_AM, "(STUBBED) called");
out_version[0] = 0;
out_version[1] = 0;
out_version[2] = 0;
out_version[3] = 0;
R_SUCCEED();
}
Result ICommonStateGetter::IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled) {
LOG_DEBUG(Service_AM, "called");

View file

@ -39,7 +39,6 @@ private:
Result GetHdcpAuthenticationStateChangeEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetOperationMode(Out<OperationMode> out_operation_mode);
Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode);
Result GetCradleFwVersion(OutArray<uint32_t, 4> out_version);
Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode);
Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled);
Result SetVrModeEnabled(bool is_vr_mode_enabled);

View file

@ -55,7 +55,8 @@ AVPixelFormat GetGpuFormat(AVCodecContext* codec_context, const AVPixelFormat* p
return codec_context->pix_fmt;
}
std::string AVError(int errnum) {
std::string AVError(int errnum)
{
char errbuf[AV_ERROR_MAX_STRING_SIZE] = {};
av_make_error_string(errbuf, sizeof(errbuf) - 1, errnum);
return errbuf;
@ -395,8 +396,10 @@ bool DecoderContext::SendPacket(const Packet& packet) {
if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) {
m_decode_order = true;
auto* codec{ffcodec(m_decoder.GetCodec())};
if (const int ret = codec->cb.decode(m_codec_context, m_temp_frame->GetFrame(),
&m_got_frame, packet.GetPacket());
if (const int ret = codec->cb.decode(m_codec_context,
m_temp_frame->GetFrame(),
&m_got_frame,
packet.GetPacket());
ret < 0) {
LOG_DEBUG(Service_NVDRV, "avcodec_send_packet error {}", AVError(ret));
return false;
@ -416,6 +419,7 @@ bool DecoderContext::SendPacket(const Packet& packet) {
std::shared_ptr<Frame> DecoderContext::ReceiveFrame() {
// Android can randomly crash when calling decode directly, so skip.
// TODO update ffmpeg and hope that fixes it.
// TODO: This is causing issues on linux, need to bisect
#ifndef ANDROID
if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) {
m_decode_order = true;

View file

@ -29,7 +29,7 @@
<widget class="QLabel" name="label">
<property name="text">
<string>While it's recommended to use state 3, some games may perform better on lower states. Setting to 0 (disabled) may also break games.
If your device doesn't support the selected state, the renderer will automatically disable the unsupported states.</string>
If your GPU is older (i.e. RX570/580 or older), it may not support these features. If this is the case, set the slider to 0 and uncheck all boxes.</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View file

@ -16,7 +16,6 @@
#include "core/core.h"
#include "core/loader/loader.h"
#include "yuzu/discord_impl.h"
#include "yuzu/uisettings.h"
namespace DiscordRPC {
@ -24,7 +23,7 @@ DiscordImpl::DiscordImpl(Core::System& system_) : system{system_} {
DiscordEventHandlers handlers{};
// The number is the client ID for yuzu, it's used for images and the
// application name
Discord_Initialize("712465656758665259", &handlers, 1, nullptr);
Discord_Initialize("1371246384434380841", &handlers, 1, nullptr);
}
DiscordImpl::~DiscordImpl() {
@ -62,8 +61,9 @@ std::string DiscordImpl::GetGameString(const std::string& title) {
}
void DiscordImpl::UpdateGameStatus(bool use_default) {
const std::string default_text = "yuzu is an emulator for the Nintendo Switch";
const std::string default_image = "yuzu_logo";
const std::string default_text = "eden is an emulator for the Nintendo Switch";
const std::string default_image = "https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/"
"dist/qt_themes/default/icons/256x256/eden_named.png";
const std::string url = use_default ? default_image : game_url;
s64 start_time = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
@ -81,15 +81,18 @@ void DiscordImpl::UpdateGameStatus(bool use_default) {
}
void DiscordImpl::Update() {
const std::string default_text = "yuzu is an emulator for the Nintendo Switch";
const std::string default_image = "yuzu_logo";
const std::string default_text = "eden is an emulator for the Nintendo Switch";
const std::string default_image = "https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/"
"dist/qt_themes/default/icons/256x256/eden_named.png";
if (system.IsPoweredOn()) {
system.GetAppLoader().ReadTitle(game_title);
// Used to format Icon URL for yuzu website game compatibility page
std::string icon_name = GetGameString(game_title);
game_url = fmt::format("https://yuzu-emu.org/images/game/boxart/{}.png", icon_name);
game_url = fmt::format(
"https://raw.githubusercontent.com/eden-emulator/boxart/refs/heads/master/img/{}.png",
icon_name);
QNetworkAccessManager manager;
QNetworkRequest request;
@ -100,6 +103,7 @@ void DiscordImpl::Update() {
QObject::connect(reply, &QNetworkReply::finished, &request_event_loop, &QEventLoop::quit);
request_event_loop.exec();
UpdateGameStatus(reply->error());
return;
}

View file

@ -381,13 +381,29 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid
pre_alpha_warning->setStyleSheet(
QString::fromStdString("color: black; font-weight: bold;"));
warning_layout->addWidget(pre_alpha_warning);
warning_dont_show_again = new QPushButton(this);
warning_dont_show_again->setStyleSheet(
QString::fromStdString("color: #DFDFDF; background-color: #383838;"));
warning_dont_show_again->setText(tr("Don't Show Again"));
connect(warning_dont_show_again, &QPushButton::clicked, this, [=, this] {
Settings::values.hide_pre_alpha_warning.SetValue(true);
layout->removeWidget(warning_widget);
warning_widget->hide();
});
warning_layout->addWidget(pre_alpha_warning, 1);
warning_layout->addWidget(warning_dont_show_again);
warning_layout->setContentsMargins(3, 3, 3, 3);
warning_widget = new QWidget;
warning_widget->setStyleSheet(QString::fromStdString("background-color: khaki;"));
warning_widget->setLayout(warning_layout);
layout->addWidget(warning_widget);
if (!Settings::values.hide_pre_alpha_warning.GetValue()) {
layout->addWidget(warning_widget);
} else {
warning_widget->hide();
}
layout->addWidget(tree_view);
layout->addWidget(search_field);

View file

@ -7,6 +7,7 @@
#include <QLabel>
#include <QLineEdit>
#include <QList>
#include <QPushButton>
#include <QStandardItemModel>
#include <QString>
#include <QTreeView>
@ -172,8 +173,10 @@ private:
QFileSystemWatcher* watcher = nullptr;
ControllerNavigation* controller_navigation = nullptr;
CompatibilityList compatibility_list;
QHBoxLayout* warning_layout = nullptr;
QWidget* warning_widget = nullptr;
QPushButton* warning_dont_show_again = nullptr;
QLabel* pre_alpha_warning = nullptr;
friend class GameListSearchField;