diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.cpp b/rpcs3/Emu/Cell/Modules/cellAudio.cpp index 1d9280a01a..27be00081e 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAudio.cpp @@ -5,7 +5,6 @@ #include "Emu/Cell/lv2/sys_process.h" #include "Emu/Cell/lv2/sys_event.h" #include "cellAudio.h" -#include #include LOG_CHANNEL(cellAudio); diff --git a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp index 8f57d205a5..c0cd5caeb7 100644 --- a/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGcmSys.cpp @@ -11,7 +11,6 @@ #include "sysPrxForUser.h" #include -#include LOG_CHANNEL(cellGcmSys); diff --git a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp index ec76e0a477..31d5a82172 100644 --- a/rpcs3/Emu/Cell/Modules/cellSpurs.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSpurs.cpp @@ -15,8 +15,6 @@ #include "sysPrxForUser.h" #include "cellSpurs.h" -#include - LOG_CHANNEL(cellSpurs); template <> diff --git a/rpcs3/Emu/Cell/Modules/cellSync.cpp b/rpcs3/Emu/Cell/Modules/cellSync.cpp index 132e473e7b..3f987770c0 100644 --- a/rpcs3/Emu/Cell/Modules/cellSync.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSync.cpp @@ -4,8 +4,6 @@ #include "Emu/Cell/lv2/sys_process.h" #include "cellSync.h" -#include - LOG_CHANNEL(cellSync); template<> diff --git a/rpcs3/Emu/Cell/Modules/sceNp.h b/rpcs3/Emu/Cell/Modules/sceNp.h index eb149022ce..a10dbad770 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.h +++ b/rpcs3/Emu/Cell/Modules/sceNp.h @@ -4,8 +4,6 @@ #include "Utilities/BEType.h" -#include - error_code sceNpInit(u32 poolsize, vm::ptr poolptr); error_code sceNpTerm(); diff --git a/rpcs3/Emu/Cell/Modules/sceNp2.h b/rpcs3/Emu/Cell/Modules/sceNp2.h index b38132ba52..c016213ab1 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp2.h +++ b/rpcs3/Emu/Cell/Modules/sceNp2.h @@ -4,8 +4,6 @@ #include "Emu/Memory/vm_ptr.h" -#include - // Error codes enum SceNpMatching2Error : u32 { diff --git a/rpcs3/Emu/Cell/Modules/sceNpClans.h b/rpcs3/Emu/Cell/Modules/sceNpClans.h index 849a3de939..02ad1f693e 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpClans.h +++ b/rpcs3/Emu/Cell/Modules/sceNpClans.h @@ -4,8 +4,6 @@ #include "Utilities/BEType.h" -#include - // Return codes enum SceNpClansError : u32 { @@ -261,5 +259,5 @@ struct SceNpClansBlacklistEntry struct sce_np_clans_manager { - std::atomic is_initialized = false; + atomic_t is_initialized = false; }; diff --git a/rpcs3/Emu/Cell/Modules/sceNpSns.h b/rpcs3/Emu/Cell/Modules/sceNpSns.h index 85d21dcb0b..cba77db26a 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpSns.h +++ b/rpcs3/Emu/Cell/Modules/sceNpSns.h @@ -2,8 +2,6 @@ #include "Emu/Memory/vm_ptr.h" -#include - // Return codes enum sceNpSnsError : u32 { @@ -81,5 +79,5 @@ struct SceNpSnsFbLongAccessTokenResult struct sce_np_sns_manager { - std::atomic is_initialized = false; + atomic_t is_initialized = false; }; diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp index 26a27439bb..159db88c69 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.cpp @@ -50,7 +50,7 @@ struct trophy_handle_t struct sce_np_trophy_manager { shared_mutex mtx; - std::atomic is_initialized = false; + atomic_t is_initialized = false; // Get context + check handle given static std::pair get_context_ex(u32 context, u32 handle) diff --git a/rpcs3/Emu/Cell/Modules/sceNpTrophy.h b/rpcs3/Emu/Cell/Modules/sceNpTrophy.h index 3a37d9a87a..9733ba1d38 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTrophy.h +++ b/rpcs3/Emu/Cell/Modules/sceNpTrophy.h @@ -2,7 +2,6 @@ #include "stdafx.h" #include "Emu/Memory/vm_ptr.h" -#include // Error codes enum SceNpTrophyError : u32 diff --git a/rpcs3/Emu/Cell/Modules/sceNpTus.h b/rpcs3/Emu/Cell/Modules/sceNpTus.h index 04f1410650..67ca89babf 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpTus.h +++ b/rpcs3/Emu/Cell/Modules/sceNpTus.h @@ -5,7 +5,6 @@ #include "cellRtc.h" #include "sceNp.h" -#include #include // Constants for TUS functions and structures @@ -136,7 +135,7 @@ private: public: std::mutex mtx; - std::atomic is_initialized = false; + atomic_t is_initialized = false; s32 add_title_context(); bool check_title_context_id(s32 titleCtxId); diff --git a/rpcs3/Emu/Cell/Modules/sceNpUtil.h b/rpcs3/Emu/Cell/Modules/sceNpUtil.h index 9f86143ffb..b81ab5d7ac 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpUtil.h +++ b/rpcs3/Emu/Cell/Modules/sceNpUtil.h @@ -1,7 +1,5 @@ #pragma once -#include - enum { SCE_NP_UTIL_BANDWIDTH_TEST_STATUS_NONE = 0, @@ -20,5 +18,5 @@ struct SceNpUtilBandwidthTestResult struct sce_np_util_manager { - std::atomic is_initialized = false; + atomic_t is_initialized = false; }; diff --git a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp index 30ea41c563..1b7bef4458 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp @@ -6,8 +6,6 @@ #include "Emu/Cell/lv2/sys_mutex.h" #include "sysPrxForUser.h" -#include - LOG_CHANNEL(sysPrxForUser); error_code sys_lwmutex_create(ppu_thread& ppu, vm::ptr lwmutex, vm::ptr attr) diff --git a/rpcs3/Emu/Cell/PPUInterpreter.cpp b/rpcs3/Emu/Cell/PPUInterpreter.cpp index 72ef7d48e4..6002b49cd9 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.cpp +++ b/rpcs3/Emu/Cell/PPUInterpreter.cpp @@ -7,7 +7,6 @@ #include "Utilities/sysinfo.h" #include "Emu/Cell/Common.h" -#include #include #include diff --git a/rpcs3/Emu/Cell/RawSPUThread.cpp b/rpcs3/Emu/Cell/RawSPUThread.cpp index 148e022477..c78fb3f8c8 100644 --- a/rpcs3/Emu/Cell/RawSPUThread.cpp +++ b/rpcs3/Emu/Cell/RawSPUThread.cpp @@ -4,8 +4,6 @@ #include "Emu/Cell/RawSPUThread.h" -#include - inline void try_start(spu_thread& spu) { reader_lock lock(spu.run_ctrl_mtx); diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index f98adf7d46..fc8a4e712d 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include "util/vm.hpp" @@ -298,14 +297,14 @@ namespace spu { namespace scheduler { - std::array, 65536> atomic_instruction_table = {}; + std::array, 65536> atomic_instruction_table = {}; constexpr u32 native_jiffy_duration_us = 1500; //About 1ms resolution with a half offset void acquire_pc_address(spu_thread& spu, u32 pc, u32 timeout_ms, u32 max_concurrent_instructions) { const u32 pc_offset = pc >> 2; - if (atomic_instruction_table[pc_offset].load(std::memory_order_consume) >= max_concurrent_instructions) + if (atomic_instruction_table[pc_offset].observe() >= max_concurrent_instructions) { spu.state += cpu_flag::wait + cpu_flag::temp; @@ -315,7 +314,7 @@ namespace spu const u64 start = get_system_time(); auto remaining = timeout; - while (atomic_instruction_table[pc_offset].load(std::memory_order_consume) >= max_concurrent_instructions) + while (atomic_instruction_table[pc_offset].observe() >= max_concurrent_instructions) { if (remaining >= native_jiffy_duration_us) std::this_thread::sleep_for(1ms); @@ -332,7 +331,7 @@ namespace spu else { //Slight pause if function is overburdened - const auto count = atomic_instruction_table[pc_offset].load(std::memory_order_consume) * 100ull; + const auto count = atomic_instruction_table[pc_offset].observe() * 100ull; busy_wait(count); } diff --git a/rpcs3/Emu/Io/interception.cpp b/rpcs3/Emu/Io/interception.cpp index cd213ec592..8a7fd12e13 100644 --- a/rpcs3/Emu/Io/interception.cpp +++ b/rpcs3/Emu/Io/interception.cpp @@ -7,7 +7,7 @@ namespace input { - std::atomic g_intercepted{false}; + atomic_t g_intercepted{false}; void SetIntercepted(bool intercepted) { diff --git a/rpcs3/Emu/Io/interception.h b/rpcs3/Emu/Io/interception.h index df10ff4235..d72f34b56c 100644 --- a/rpcs3/Emu/Io/interception.h +++ b/rpcs3/Emu/Io/interception.h @@ -1,10 +1,8 @@ #pragma once -#include - namespace input { - extern std::atomic g_intercepted; + extern atomic_t g_intercepted; void SetIntercepted(bool intercepted); } diff --git a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp index e9fa572a6e..dd8c77a86b 100644 --- a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp +++ b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp @@ -7,7 +7,6 @@ #include "Emu/RSX/RSXThread.h" #include -#include namespace rsx { diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index a43075aca8..043baa3b15 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -3,8 +3,6 @@ #include "texture_cache_predictor.h" #include "texture_cache_helpers.h" -#include - extern u64 get_system_time(); #define RSX_GCM_FORMAT_IGNORED 0 @@ -279,7 +277,7 @@ namespace rsx std::vector m_uncached_subresources; predictor_type m_predictor; - std::atomic m_cache_update_tag = {0}; + atomic_t m_cache_update_tag = {0}; address_range read_only_range; address_range no_access_range; @@ -298,10 +296,10 @@ namespace rsx const u32 m_max_zombie_objects = 64; //Limit on how many texture objects to keep around for reuse after they are invalidated //Other statistics - std::atomic m_flushes_this_frame = { 0 }; - std::atomic m_misses_this_frame = { 0 }; - std::atomic m_speculations_this_frame = { 0 }; - std::atomic m_unavoidable_hard_faults_this_frame = { 0 }; + atomic_t m_flushes_this_frame = { 0 }; + atomic_t m_misses_this_frame = { 0 }; + atomic_t m_speculations_this_frame = { 0 }; + atomic_t m_unavoidable_hard_faults_this_frame = { 0 }; static const u32 m_predict_max_flushes_per_frame = 50; // Above this number the predictions are disabled // Invalidation @@ -621,7 +619,7 @@ namespace rsx } // Return a set containing all sections that should be flushed/unprotected/reprotected - std::atomic m_last_section_cache_tag = 0; + atomic_t m_last_section_cache_tag = 0; intersecting_set get_intersecting_set(const address_range &fault_range) { AUDIT(fault_range.is_page_range()); @@ -876,7 +874,7 @@ namespace rsx { // There is something to flush, but we've been asked to defer it result.num_flushable = static_cast(result.sections_to_flush.size()); - result.cache_tag = m_cache_update_tag.load(std::memory_order_consume); + result.cache_tag = m_cache_update_tag.load(); return result; } else if (has_flushables || has_unprotectables) @@ -1275,7 +1273,7 @@ namespace rsx AUDIT(data.cause.deferred_flush()); AUDIT(!data.flushed); - if (m_cache_update_tag.load(std::memory_order_consume) == data.cache_tag) + if (m_cache_update_tag.load() == data.cache_tag) { //1. Write memory to cpu side flush_set(cmd, data, std::forward(extras)...); @@ -2836,7 +2834,7 @@ namespace rsx { if (!m_flush_always_cache.empty()) { - if (m_cache_update_tag.load(std::memory_order_consume) != m_flush_always_update_timestamp) + if (m_cache_update_tag.load() != m_flush_always_update_timestamp) { std::lock_guard lock(m_cache_mutex); bool update_tag = false; @@ -2856,7 +2854,7 @@ namespace rsx } if (update_tag) update_cache_tag(); - m_flush_always_update_timestamp = m_cache_update_tag.load(std::memory_order_consume); + m_flush_always_update_timestamp = m_cache_update_tag.load(); #ifdef TEXTURE_CACHE_DEBUG // Check that the cache has the correct protections diff --git a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h index 4b18645df1..6fc2d71f60 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h @@ -3,8 +3,6 @@ #include "../rsx_cache.h" #include "../rsx_utils.h" #include "TextureUtils.h" -#include - namespace rsx { @@ -339,7 +337,7 @@ namespace rsx public: // Per-frame statistics - std::atomic m_mispredictions_this_frame = {0}; + atomic_t m_mispredictions_this_frame = {0}; // Constructors texture_cache_predictor(texture_cache_type* tex_cache) diff --git a/rpcs3/Emu/RSX/Common/texture_cache_utils.h b/rpcs3/Emu/RSX/Common/texture_cache_utils.h index 33486a47bd..40be9c6006 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_utils.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_utils.h @@ -6,8 +6,6 @@ #include #include -#include - namespace rsx { @@ -324,9 +322,9 @@ namespace rsx address_range range = {}; block_container_type sections = {}; unowned_container_type unowned; // pointers to sections from other blocks that overlap this block - std::atomic exists_count = 0; - std::atomic locked_count = 0; - std::atomic unreleased_count = 0; + atomic_t exists_count = 0; + atomic_t locked_count = 0; + atomic_t unreleased_count = 0; ranged_storage_type *m_storage = nullptr; inline void add_owned_section_overlaps(section_storage_type §ion) @@ -567,8 +565,8 @@ namespace rsx bool m_purging = false; public: - std::atomic m_unreleased_texture_objects = { 0 }; //Number of invalidated objects not yet freed from memory - std::atomic m_texture_memory_in_use = { 0 }; + atomic_t m_unreleased_texture_objects = { 0 }; //Number of invalidated objects not yet freed from memory + atomic_t m_texture_memory_in_use = { 0 }; // Constructor ranged_storage(texture_cache_type *tex_cache) : diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h index b2160898f4..dad3560a7e 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -133,7 +133,7 @@ private: shared_mutex m_sampler_mutex; u64 surface_store_tag = 0; - std::atomic_bool m_samplers_dirty = {true}; + atomic_t m_samplers_dirty = {true}; std::array, rsx::limits::fragment_textures_count> fs_sampler_state = {}; std::array, rsx::limits::vertex_textures_count> vs_sampler_state = {}; std::unordered_map> m_null_textures; diff --git a/rpcs3/Emu/RSX/GSFrameBase.h b/rpcs3/Emu/RSX/GSFrameBase.h index 19f31305be..d2b3882b05 100644 --- a/rpcs3/Emu/RSX/GSFrameBase.h +++ b/rpcs3/Emu/RSX/GSFrameBase.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include "display.h" @@ -27,6 +26,6 @@ public: virtual display_handle_t handle() const = 0; - std::atomic screenshot_toggle = false; + atomic_t screenshot_toggle = false; virtual void take_screenshot(const std::vector sshot_data, const u32 sshot_width, const u32 sshot_height, bool is_bgra) = 0; }; diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 520898c641..232f18fc3d 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -29,7 +29,7 @@ class GSRender; #define CMD_DEBUG 0 -std::atomic g_user_asked_for_frame_capture = false; +atomic_t g_user_asked_for_frame_capture = false; rsx::frame_trace_data frame_debug; rsx::frame_capture_data frame_capture; diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index cb0ec16873..2dee9c0abf 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -4,7 +4,6 @@ #include #include #include -#include #include "GCM.h" #include "rsx_cache.h" @@ -29,7 +28,7 @@ extern u64 get_guest_system_time(); extern u64 get_system_time(); -extern std::atomic g_user_asked_for_frame_capture; +extern atomic_t g_user_asked_for_frame_capture; extern rsx::frame_trace_data frame_debug; extern rsx::frame_capture_data frame_capture; diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.h b/rpcs3/Emu/RSX/VK/VKGSRender.h index 3e8d0b939f..3752252fb5 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.h +++ b/rpcs3/Emu/RSX/VK/VKGSRender.h @@ -13,7 +13,6 @@ #include "../GCM.h" #include -#include #include namespace vk @@ -59,7 +58,7 @@ namespace vk vk::fence* submit_fence = nullptr; VkDevice m_device = VK_NULL_HANDLE; - std::atomic_bool pending = { false }; + atomic_t pending = { false }; u64 eid_tag = 0; u64 reset_id = 0; shared_mutex guard_mutex; @@ -373,7 +372,7 @@ private: shared_mutex m_sampler_mutex; u64 surface_store_tag = 0; - std::atomic_bool m_samplers_dirty = { true }; + atomic_t m_samplers_dirty = { true }; std::unique_ptr m_stencil_mirror_sampler; std::array, rsx::limits::fragment_textures_count> fs_sampler_state = {}; std::array, rsx::limits::vertex_textures_count> vs_sampler_state = {}; diff --git a/rpcs3/Emu/RSX/VK/VKTextureCache.h b/rpcs3/Emu/RSX/VK/VKTextureCache.h index 62d5ef26ff..efbb4f6932 100644 --- a/rpcs3/Emu/RSX/VK/VKTextureCache.h +++ b/rpcs3/Emu/RSX/VK/VKTextureCache.h @@ -557,7 +557,7 @@ namespace vk //Stuff that has been dereferenced goes into these std::list m_temporary_storage; - std::atomic m_temporary_memory_size = { 0 }; + atomic_t m_temporary_memory_size = { 0 }; void clear() { diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index 9188c10049..6420fefa64 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -8,7 +8,6 @@ #include "Emu/RSX/Common/BufferUtils.h" #include -#include namespace rsx { diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index cbe43bf674..fa3faf5236 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -25,7 +25,6 @@ #include #include #include -#include constexpr auto qstr = QString::fromStdString; diff --git a/rpcs3/rpcs3qt/downloader.h b/rpcs3/rpcs3qt/downloader.h index b87c8c77ba..8cbcf1e5a2 100644 --- a/rpcs3/rpcs3qt/downloader.h +++ b/rpcs3/rpcs3qt/downloader.h @@ -1,8 +1,7 @@ #pragma once #include - -#include +#include "util/atomic.hpp" class curl_handle; class progress_dialog; @@ -37,11 +36,11 @@ private: curl_handle* m_curl = nullptr; QByteArray m_curl_buf; - std::atomic m_curl_abort = false; - std::atomic m_curl_success = false; + atomic_t m_curl_abort = false; + atomic_t m_curl_success = false; double m_actual_download_size = -1.0; progress_dialog* m_progress_dialog = nullptr; - std::atomic m_keep_progress_dialog_open = false; + atomic_t m_keep_progress_dialog_open = false; QString m_progress_dialog_title; }; diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index d3b4d0ac0c..66553e5502 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -41,7 +41,7 @@ LOG_CHANNEL(screenshot); -extern std::atomic g_user_asked_for_frame_capture; +extern atomic_t g_user_asked_for_frame_capture; constexpr auto qstr = QString::fromStdString; diff --git a/rpcs3/rpcs3qt/gs_frame.h b/rpcs3/rpcs3qt/gs_frame.h index 3fae660d99..b1cc91e466 100644 --- a/rpcs3/rpcs3qt/gs_frame.h +++ b/rpcs3/rpcs3qt/gs_frame.h @@ -34,7 +34,7 @@ private: u64 m_frames = 0; QString m_window_title; - std::atomic m_show_mouse = true; + atomic_t m_show_mouse = true; bool m_disable_mouse = false; bool m_disable_kb_hotkeys = false; bool m_mouse_hide_and_lock = false; diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 44fee2e1d1..1b7943ae20 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -52,7 +52,7 @@ LOG_CHANNEL(gui_log, "GUI"); -extern std::atomic g_user_asked_for_frame_capture; +extern atomic_t g_user_asked_for_frame_capture; inline std::string sstr(const QString& _in) { return _in.toStdString(); } diff --git a/rpcs3/rpcs3qt/render_creator.cpp b/rpcs3/rpcs3qt/render_creator.cpp index debe0e1324..2aafc17627 100644 --- a/rpcs3/rpcs3qt/render_creator.cpp +++ b/rpcs3/rpcs3qt/render_creator.cpp @@ -8,7 +8,6 @@ #include "Emu/RSX/VK/VKHelpers.h" #endif -#include #include #include #include @@ -25,7 +24,7 @@ render_creator::render_creator(QObject *parent) : QObject(parent) // plugged in. This whole contraption is for showing an error message in case that happens, so that user has // some idea about why the emulator window isn't showing up. - static std::atomic was_called = false; + static atomic_t was_called = false; if (was_called.exchange(true)) fmt::throw_exception("Render_Creator cannot be created more than once" HERE);