Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[texture_cache] Fix WIN32 #ifdef for texture_cache (#2823)

unknown199bc6a17048
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 5b52e88727..136a11f78d 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1377,7 +1377,9 @@ void TextureCacheRuntime::CopyImage(Image& dst, Image& src,
// As per the size-compatible formats section of vulkan, copy manually via ReinterpretImage
// these images that aren't size-compatible
if (BytesPerBlock(src.info.format) != BytesPerBlock(dst.info.format)) {
-#ifdef __WIN32__
+#ifdef _WIN32
+ // On Windows, linear images cause device loss when used in image copies.
+ // Tested with TitleID: 0x010067300059A00 (Mario + Rabbids Kingdom Battle)
if (src.info.type == ImageType::Linear || dst.info.type == ImageType::Linear) {
return;
}