diff --git a/libretro-common/vfs/vfs_implementation_uwp.cpp b/libretro-common/vfs/vfs_implementation_uwp.cpp index 4a8b174c24..b65b83f2a9 100644 --- a/libretro-common/vfs/vfs_implementation_uwp.cpp +++ b/libretro-common/vfs/vfs_implementation_uwp.cpp @@ -65,9 +65,9 @@ namespace template T RunAsync(std::function()> func) { - bool finished = false; - Platform::Exception^ exception = nullptr; - T result; + volatile bool finished = false; + volatile Platform::Exception^ exception = nullptr; + volatile T result; func().then([&](concurrency::task t) { try {