mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-25 00:40:32 +00:00
[video_core, hle] remove redundant parent references in system structs (#3908)
reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
@@ -27,22 +27,22 @@ void Host1x::StartDevice(s32 fd, ChannelType type, u32 syncpt) {
|
||||
#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);
|
||||
devices[fd].emplace<Tegra::Host1x::Nvdec>(*this, fd, syncpt);
|
||||
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);
|
||||
devices[fd].emplace<Tegra::Host1x::Vic>(*this, fd, syncpt);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(HW_GPU, "Unimplemented host1x device {}", static_cast<u32>(type));
|
||||
LOG_ERROR(HW_GPU, "Unimplemented host1x device {}", u32(type));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Host1x::StopDevice(s32 fd, ChannelType type) {
|
||||
devices.erase(fd);
|
||||
devices[fd].emplace<std::monostate>();
|
||||
}
|
||||
|
||||
} // namespace Tegra::Host1x
|
||||
|
||||
Reference in New Issue
Block a user