aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x
diff options
context:
space:
mode:
authorBix <bix@bixed.xyz>2025-10-05 05:41:20 +0200
committercrueter <crueter@eden-emu.dev>2025-10-05 05:41:20 +0200
commit191dd892e57abad3c56f939e83514ab16dec64ed (patch)
treec1494c49a2735f11b6bc7d7f0095a5d24df0c561 /src/video_core/host1x
parent9f385bf627e40e2b7d5b06cd83cab0a4e9f98f99 (diff)
[android] Legacy build flavor (#51)
This adds a "legacy" build flavor, similar to the genshinSpoof flavor. The legacy flavor uses a white icon bg, alongside building with `YUZU_LEGACY=ON`, which applies the previously-made SD865 patches iff that value is truthy. Co-authored-by: Bixthefin <114880614+Bixthefin@users.noreply.github.com> Co-authored-by: Calchan <denis.dupeyron@gmail.com> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/51 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Bix <bix@bixed.xyz> Co-committed-by: Bix <bix@bixed.xyz>
Diffstat (limited to 'src/video_core/host1x')
-rw-r--r--src/video_core/host1x/host1x.cpp9
-rw-r--r--src/video_core/host1x/host1x.h7
2 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/host1x/host1x.cpp b/src/video_core/host1x/host1x.cpp
index 293bca6d79..cec5104144 100644
--- a/src/video_core/host1x/host1x.cpp
+++ b/src/video_core/host1x/host1x.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -18,9 +21,15 @@ Host1x::~Host1x() = default;
void Host1x::StartDevice(s32 fd, ChannelType type, u32 syncpt) {
switch (type) {
case ChannelType::NvDec:
+#ifdef YUZU_LEGACY
+ std::call_once(nvdec_first_init, []() {std::this_thread::sleep_for(std::chrono::milliseconds{500});}); // HACK: For Astroneer
+#endif
devices[fd] = std::make_unique<Tegra::Host1x::Nvdec>(*this, fd, syncpt, frame_queue);
break;
case ChannelType::VIC:
+#ifdef YUZU_LEGACY
+ std::call_once(vic_first_init, []() {std::this_thread::sleep_for(std::chrono::milliseconds{500});}); // HACK: For Astroneer
+#endif
devices[fd] = std::make_unique<Tegra::Host1x::Vic>(*this, fd, syncpt, frame_queue);
break;
default:
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h
index 8debac93dd..4eea214ec6 100644
--- a/src/video_core/host1x/host1x.h
+++ b/src/video_core/host1x/host1x.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -201,6 +204,10 @@ private:
std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator;
FrameQueue frame_queue;
std::unordered_map<s32, std::unique_ptr<CDmaPusher>> devices;
+#ifdef YUZU_LEGACY
+ std::once_flag nvdec_first_init;
+ std::once_flag vic_first_init;
+#endif
};
} // namespace Tegra::Host1x