diff --git a/library/borealis b/library/borealis index 92b6ffe1..07339bd7 160000 --- a/library/borealis +++ b/library/borealis @@ -1 +1 @@ -Subproject commit 92b6ffe180c7669081d2ec1fb7193616df6797cb +Subproject commit 07339bd78b3f1e9b1304ab05732457362a239750 diff --git a/scripts/psv/gxm.Dockerfile b/scripts/psv/gxm.Dockerfile index 432bb616..e1dacb7f 100644 --- a/scripts/psv/gxm.Dockerfile +++ b/scripts/psv/gxm.Dockerfile @@ -8,7 +8,7 @@ RUN apk update && \ # Install VDPM Dependencies ADD . /vdpm -RUN vdpm sdl2 mbedtls libass harfbuzz fribidi freetype libpng libwebp && \ +RUN vdpm mbedtls libass harfbuzz fribidi freetype libpng libwebp && \ adduser --gecos '' --disabled-password builder && \ echo 'builder ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/builder && \ chown -R builder:builder /vdpm && \ diff --git a/scripts/psv/mpv_gxm/VITABUILD b/scripts/psv/mpv_gxm/VITABUILD index f25c4a3a..409824a1 100644 --- a/scripts/psv/mpv_gxm/VITABUILD +++ b/scripts/psv/mpv_gxm/VITABUILD @@ -1,10 +1,10 @@ pkgname=mpv -pkgver=a6f4a7e6c4b38626cf80e18987dd3bcfca78a4b5 +pkgver=d0c1c749f54f225aeb304cf0534beb565a1b7270 pkgrel=3 url="https://mpv.io/" source=("${pkgname}-${pkgver}.tar.gz::https://github.com/xfangfang/mpv/archive/${pkgver}.tar.gz") sha256sums=('SKIP') -depends=('sdl2' 'libass' 'ffmpeg') +depends=('libass' 'ffmpeg') prepare() { cd $pkgname-$pkgver @@ -21,7 +21,7 @@ build() { -Dlibavdevice=disabled \ -Dmanpage-build=disabled \ -Dhtml-build=disabled \ - -Dsdl2=enabled \ + -Dsdl2=disabled \ -Dlibmpv=true \ -Dgxm=enabled \ -Dvitashark=disabled \ diff --git a/wiliwili/include/view/danmaku_core.hpp b/wiliwili/include/view/danmaku_core.hpp index ff68ce80..0e85ee5f 100644 --- a/wiliwili/include/view/danmaku_core.hpp +++ b/wiliwili/include/view/danmaku_core.hpp @@ -15,6 +15,10 @@ #include "utils/event_helper.hpp" +#if defined(BOREALIS_USE_D3D11) || defined(BOREALIS_USE_OPENGL) && !defined(__PSV__) || defined(BOREALIS_USE_GXM) +#define DRAW_DANMAKU_MASK +#endif + // 每个分片内的svg数据,一般 1/30 s 一帧 class MaskSvg { public: diff --git a/wiliwili/source/fragment/player_danmaku_setting.cpp b/wiliwili/source/fragment/player_danmaku_setting.cpp index ff685e7c..07d49081 100644 --- a/wiliwili/source/fragment/player_danmaku_setting.cpp +++ b/wiliwili/source/fragment/player_danmaku_setting.cpp @@ -36,7 +36,7 @@ PlayerDanmakuSetting::PlayerDanmakuSetting() { auto& conf = ProgramConfig::instance(); -#if defined(BOREALIS_USE_D3D11) || defined(BOREALIS_USE_OPENGL) && !defined(__PSV__) +#ifdef DRAW_DANMAKU_MASK this->cellMask->init("wiliwili/player/danmaku/filter/mask"_i18n, DanmakuCore::DANMAKU_SMART_MASK, [](bool data) { DanmakuCore::DANMAKU_SMART_MASK = data; DanmakuCore::save(); diff --git a/wiliwili/source/fragment/player_setting.cpp b/wiliwili/source/fragment/player_setting.cpp index f6549702..e2e12a55 100644 --- a/wiliwili/source/fragment/player_setting.cpp +++ b/wiliwili/source/fragment/player_setting.cpp @@ -59,8 +59,8 @@ brls::View* PlayerSetting::getDefaultFocus() { return this->settings->getDefault void PlayerSetting::setupCustomShaders() { // TODO Fix: shaders cannot work with deko3d and ps4 -#if !defined(_DEBUG) && (defined(BOREALIS_USE_DEKO3D) || defined(PS4)) - // hide shader setting: deko3d and ps4 +#if !defined(_DEBUG) && (defined(BOREALIS_USE_DEKO3D) || defined(PS4) || defined(__PSV__)) + // hide shader setting: deko3d, psv and ps4 auto* cell = new brls::RadioCell(); cell->title->setText("wiliwili/dialog/not_supported"_i18n); shaderBox->addView(cell); diff --git a/wiliwili/source/presenter/video_detail.cpp b/wiliwili/source/presenter/video_detail.cpp index aff6b2b3..78ac308c 100644 --- a/wiliwili/source/presenter/video_detail.cpp +++ b/wiliwili/source/presenter/video_detail.cpp @@ -521,7 +521,7 @@ void VideoDetail::requestVideoPageDetail(const std::string& bvid, uint64_t cid, BILI::get_page_detail( bvid, cid, [ASYNC_TOKEN, requestVideoHistory](const bilibili::VideoPageResult& result) { -#if defined(BOREALIS_USE_D3D11) || defined(BOREALIS_USE_OPENGL) && !defined(__PSV__) +#ifdef DRAW_DANMAKU_MASK if (!result.mask_url.empty()) { brls::Logger::debug("获取防遮挡数据: {}", result.mask_url); DanmakuCore::instance().loadMaskData(result.mask_url); diff --git a/wiliwili/source/utils/config_helper.cpp b/wiliwili/source/utils/config_helper.cpp index fb54fe97..90ff5a4c 100644 --- a/wiliwili/source/utils/config_helper.cpp +++ b/wiliwili/source/utils/config_helper.cpp @@ -51,6 +51,12 @@ extern in_addr_t secondary_dns; #include #include #include +extern "C" +{ +unsigned int _newlib_heap_size_user = 220 * 1024 * 1024; +unsigned int sceLibcHeapSize = 24 * 1024 * 1024; +unsigned int _pthread_stack_default_user = 2 * 1024 * 1024; +} #endif #ifdef _WIN32 diff --git a/wiliwili/source/view/danmaku_core.cpp b/wiliwili/source/view/danmaku_core.cpp index eebe631d..7c82af30 100644 --- a/wiliwili/source/view/danmaku_core.cpp +++ b/wiliwili/source/view/danmaku_core.cpp @@ -429,7 +429,7 @@ std::vector DanmakuCore::getDanmakuData() { } void DanmakuCore::drawMask(NVGcontext *vg, float x, float y, float width, float height) { -#if defined(BOREALIS_USE_OPENGL) || defined(BOREALIS_USE_D3D11) +#ifdef DRAW_DANMAKU_MASK if (!DANMAKU_SMART_MASK || !maskData.isLoaded()) return; double playbackTime = MPVCore::instance().playback_time; /// 1. 先根据时间选择分片 @@ -535,7 +535,8 @@ void DanmakuCore::drawMask(NVGcontext *vg, float x, float y, float width, float } void DanmakuCore::clearMask(NVGcontext *vg, float x, float y, float width, float height) { -#if !defined(DEBUG_MASK) && (defined(BOREALIS_USE_OPENGL) || defined(BOREALIS_USE_D3D11)) +#if !defined(DEBUG_MASK) && defined(DRAW_DANMAKU_MASK) + if (!DANMAKU_SMART_MASK || !maskData.isLoaded()) return; if (maskTex > 0) { nvgBeginPath(vg); nvgRect(vg, x, y, width, height); diff --git a/wiliwili/source/view/mpv_core.cpp b/wiliwili/source/view/mpv_core.cpp index 024e5d29..f450d345 100644 --- a/wiliwili/source/view/mpv_core.cpp +++ b/wiliwili/source/view/mpv_core.cpp @@ -439,6 +439,7 @@ void MPVCore::init() { .context = window->context, .shader_patcher = window->shader_patcher, .buffer_index = 0, + .msaa = SCE_GXM_MULTISAMPLE_4X, }; mpv_render_param params[] = {{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_GXM},