From 7d5fa8bd8ab1b9c6e545521d6f2d64ce3e0b7030 Mon Sep 17 00:00:00 2001 From: xfangfang <2553041586@qq.com> Date: Tue, 22 Oct 2024 18:30:56 +0800 Subject: [PATCH] PSV: Force to use hardware decoding --- wiliwili/source/activity/setting_activity.cpp | 2 +- wiliwili/source/utils/config_helper.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wiliwili/source/activity/setting_activity.cpp b/wiliwili/source/activity/setting_activity.cpp index 5e41f3b5..cce21685 100644 --- a/wiliwili/source/activity/setting_activity.cpp +++ b/wiliwili/source/activity/setting_activity.cpp @@ -637,7 +637,7 @@ void SettingActivity::onContentAvailable() { "wiliwili/setting/app/network/proxy_hint"_i18n, "wiliwili/setting/app/network/proxy_hint"_i18n, 64); /// Hardware decode -#ifdef PS4 +#if defined(PS4) || defined(__PSV__) btnHWDEC->setVisibility(brls::Visibility::GONE); #else btnHWDEC->init("wiliwili/setting/app/playback/hwdec"_i18n, conf.getBoolOption(SettingItem::PLAYER_HWDEC), diff --git a/wiliwili/source/utils/config_helper.cpp b/wiliwili/source/utils/config_helper.cpp index 179a8d13..8fb73166 100644 --- a/wiliwili/source/utils/config_helper.cpp +++ b/wiliwili/source/utils/config_helper.cpp @@ -554,7 +554,11 @@ void ProgramConfig::load() { VideoView::HIGHLIGHT_PROGRESS_BAR = getBoolOption(SettingItem::PLAYER_HIGHLIGHT_BAR); // 初始化是否使用硬件加速 +#ifdef __PSV__ + MPVCore::HARDWARE_DEC = true; +#else MPVCore::HARDWARE_DEC = getBoolOption(SettingItem::PLAYER_HWDEC); +#endif // 初始化自定义的硬件加速方案 MPVCore::PLAYER_HWDEC_METHOD = getSettingItem(SettingItem::PLAYER_HWDEC_CUSTOM, MPVCore::PLAYER_HWDEC_METHOD);