VERY experimental Nintendo Switch 2 emulator
C++
[host1x] FreeBSD: Fix random crashes due to CUDA/VAAPI check sideeffects (#64)
SDK-Chana8564a09b7b2
diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.cpp b/src/video_core/host1x/ffmpeg/ffmpeg.cppindex 9b718f2591..5321c8c98c 100644--- a/src/video_core/host1x/ffmpeg/ffmpeg.cpp+++ b/src/video_core/host1x/ffmpeg/ffmpeg.cpp@@ -26,13 +26,14 @@ namespace {constexpr AVPixelFormat PreferredGpuFormat = AV_PIX_FMT_NV12;constexpr AVPixelFormat PreferredCpuFormat = AV_PIX_FMT_YUV420P;constexpr std::array PreferredGpuDecoders = {- AV_HWDEVICE_TYPE_CUDA,#ifdef _WIN32+ AV_HWDEVICE_TYPE_CUDA,AV_HWDEVICE_TYPE_D3D11VA,AV_HWDEVICE_TYPE_DXVA2,+#elif defined(__FreeBSD__)+ AV_HWDEVICE_TYPE_VDPAU,#elif defined(__unix__)AV_HWDEVICE_TYPE_VAAPI,- AV_HWDEVICE_TYPE_VDPAU,#endifAV_HWDEVICE_TYPE_VULKAN,};