2015-05-24 04:32:32 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2015-05-24 04:32:32 +00:00
|
|
|
|
2020-08-17 20:10:21 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
#define STRINGIFY_HELPER(x) #x
|
|
|
|
#define STRINGIFY(x) STRINGIFY_HELPER(x)
|
|
|
|
|
2023-05-17 03:21:36 +00:00
|
|
|
#if defined _MSC_FULL_VER && _MSC_FULL_VER < 193632532
|
2020-08-17 20:10:21 +00:00
|
|
|
#pragma message("Current _MSC_FULL_VER: " STRINGIFY(_MSC_FULL_VER))
|
2021-11-11 09:44:40 +00:00
|
|
|
#error Please update your build environment to the latest Visual Studio 2022!
|
2020-08-17 20:10:21 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <sdkddkver.h>
|
2022-06-02 22:53:29 +00:00
|
|
|
#ifndef NTDDI_WIN10_NI
|
2020-08-17 20:10:21 +00:00
|
|
|
#pragma message("Current WDK_NTDDI_VERSION: " STRINGIFY(WDK_NTDDI_VERSION))
|
2022-06-02 22:53:29 +00:00
|
|
|
#error Windows 10.0.22621 SDK or later is required
|
2020-08-17 20:10:21 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef STRINGIFY
|
|
|
|
#undef STRINGIFY_HELPER
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <algorithm>
|
|
|
|
#include <array>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <bitset>
|
|
|
|
#include <cassert>
|
|
|
|
#include <cctype>
|
|
|
|
#include <cerrno>
|
|
|
|
#include <cmath>
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstddef>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
#include <ctime>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <deque>
|
|
|
|
#include <errno.h>
|
2014-08-15 06:51:13 +00:00
|
|
|
#if !defined ANDROID && !defined _WIN32
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <execinfo.h>
|
2013-10-21 14:36:40 +00:00
|
|
|
#endif
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <fcntl.h>
|
2020-09-17 06:49:56 +00:00
|
|
|
#include <filesystem>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <float.h>
|
2020-09-17 06:49:56 +00:00
|
|
|
#include <fmt/format.h>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <fstream>
|
|
|
|
#include <functional>
|
2014-08-15 06:51:13 +00:00
|
|
|
#ifndef _WIN32
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <getopt.h>
|
2014-08-15 06:51:13 +00:00
|
|
|
#endif
|
2020-09-17 06:49:56 +00:00
|
|
|
#if defined _WIN32 && defined _M_X86_64
|
|
|
|
#include <intrin.h>
|
|
|
|
#endif
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <iomanip>
|
|
|
|
#include <iostream>
|
2015-03-01 13:52:09 +00:00
|
|
|
#include <limits.h>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <limits>
|
|
|
|
#include <list>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <map>
|
|
|
|
#include <math.h>
|
2015-03-01 13:52:09 +00:00
|
|
|
#include <memory.h>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <mutex>
|
|
|
|
#include <numeric>
|
2020-09-17 06:49:56 +00:00
|
|
|
#include <optional>
|
2014-08-15 06:51:13 +00:00
|
|
|
#ifndef _WIN32
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <pthread.h>
|
2014-08-15 06:51:13 +00:00
|
|
|
#endif
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <queue>
|
|
|
|
#include <set>
|
|
|
|
#include <sstream>
|
|
|
|
#include <stack>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2020-09-17 06:49:56 +00:00
|
|
|
#include <string_view>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <thread>
|
|
|
|
#include <time.h>
|
|
|
|
#include <type_traits>
|
2014-08-15 06:51:13 +00:00
|
|
|
#ifndef _WIN32
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <unistd.h>
|
2014-08-15 06:51:13 +00:00
|
|
|
#endif
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <utility>
|
2020-09-17 06:49:56 +00:00
|
|
|
#include <variant>
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <vector>
|
2014-02-18 11:09:38 +00:00
|
|
|
|
2014-08-15 06:51:13 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <Windows.h>
|
|
|
|
#endif
|
|
|
|
|
2014-02-18 11:09:38 +00:00
|
|
|
#include "Common/Common.h"
|
|
|
|
#include "Common/Thread.h"
|