2015-05-23 22:32:32 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2020-08-17 14:10:21 -06:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
#define STRINGIFY_HELPER(x) #x
|
|
|
|
#define STRINGIFY(x) STRINGIFY_HELPER(x)
|
|
|
|
|
|
|
|
#if defined _MSC_FULL_VER && _MSC_FULL_VER < 192729111
|
|
|
|
#pragma message("Current _MSC_FULL_VER: " STRINGIFY(_MSC_FULL_VER))
|
|
|
|
#error Please update your build environment to the latest Visual Studio 2019!
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <sdkddkver.h>
|
|
|
|
#ifndef NTDDI_WIN10_VB
|
|
|
|
#pragma message("Current WDK_NTDDI_VERSION: " STRINGIFY(WDK_NTDDI_VERSION))
|
|
|
|
#error Windows 10.0.19041 SDK or later is required
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef STRINGIFY
|
|
|
|
#undef STRINGIFY_HELPER
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2013-10-16 22:06:34 -06: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 00:51:13 -06:00
|
|
|
#if !defined ANDROID && !defined _WIN32
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <execinfo.h>
|
2013-10-21 08:36:40 -06:00
|
|
|
#endif
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <fcntl.h>
|
2020-09-17 00:49:56 -06:00
|
|
|
#include <filesystem>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <float.h>
|
2020-09-17 00:49:56 -06:00
|
|
|
#include <fmt/format.h>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <fstream>
|
|
|
|
#include <functional>
|
2014-08-15 00:51:13 -06:00
|
|
|
#ifndef _WIN32
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <getopt.h>
|
2014-08-15 00:51:13 -06:00
|
|
|
#endif
|
2020-09-17 00:49:56 -06:00
|
|
|
#if defined _WIN32 && defined _M_X86_64
|
|
|
|
#include <intrin.h>
|
|
|
|
#endif
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <iomanip>
|
|
|
|
#include <iostream>
|
2015-03-01 06:52:09 -07:00
|
|
|
#include <limits.h>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <limits>
|
|
|
|
#include <list>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <map>
|
|
|
|
#include <math.h>
|
2015-03-01 06:52:09 -07:00
|
|
|
#include <memory.h>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <memory>
|
|
|
|
#include <mutex>
|
|
|
|
#include <numeric>
|
2020-09-17 00:49:56 -06:00
|
|
|
#include <optional>
|
2014-08-15 00:51:13 -06:00
|
|
|
#ifndef _WIN32
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <pthread.h>
|
2014-08-15 00:51:13 -06:00
|
|
|
#endif
|
2013-10-16 22:06:34 -06: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 00:49:56 -06:00
|
|
|
#include <string_view>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <thread>
|
|
|
|
#include <time.h>
|
|
|
|
#include <type_traits>
|
2014-08-15 00:51:13 -06:00
|
|
|
#ifndef _WIN32
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <unistd.h>
|
2014-08-15 00:51:13 -06:00
|
|
|
#endif
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <utility>
|
2020-09-17 00:49:56 -06:00
|
|
|
#include <variant>
|
2013-10-16 22:06:34 -06:00
|
|
|
#include <vector>
|
2014-02-18 04:09:38 -07:00
|
|
|
|
2014-08-15 00:51:13 -06:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <Windows.h>
|
|
|
|
#endif
|
|
|
|
|
2014-02-18 04:09:38 -07:00
|
|
|
#include "Common/Common.h"
|
|
|
|
#include "Common/Thread.h"
|