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>
|
|
|
|
#include <float.h>
|
|
|
|
#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
|
2013-10-17 04:06:34 +00:00
|
|
|
#include <iomanip>
|
|
|
|
#include <iostream>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <limits>
|
|
|
|
#include <list>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <map>
|
|
|
|
#include <math.h>
|
|
|
|
#include <memory.h>
|
|
|
|
#include <memory>
|
|
|
|
#include <mutex>
|
|
|
|
#include <numeric>
|
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>
|
|
|
|
#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>
|
|
|
|
#include <vector>
|
2014-02-18 11:09:38 +00:00
|
|
|
|
2014-08-15 06:51:13 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
#if _MSC_FULL_VER < 180030723
|
|
|
|
#error Please update your build environment to VS2013 with Update 3 or later!
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// This numeral indicates the "minimum system required" to run the resulting
|
|
|
|
// program. Dolphin targets Vista+, so it should be 0x0600. However in practice,
|
|
|
|
// _WIN32_WINNT just removes up-level API declarations from headers. This is a
|
2015-01-11 05:17:29 +00:00
|
|
|
// problem for XAudio2 and XInput, where Dolphin expects to compile against the
|
2014-08-15 06:51:13 +00:00
|
|
|
// Win8+ versions of their headers. So while we really need Vista+ level of
|
|
|
|
// support, we declare Win8+ here globally. If this becomes a problem, the
|
|
|
|
// higher declaration can be contained to just the XAudio2/XInput related code.
|
|
|
|
#define _WIN32_WINNT 0x0602
|
|
|
|
|
|
|
|
// Exclude rarely-used stuff from Windows headers
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2015-01-11 05:17:29 +00:00
|
|
|
// Don't include Windows min/max definitions. They would conflict with the STL.
|
2014-08-15 06:51:13 +00:00
|
|
|
#define NOMINMAX
|
|
|
|
#include <Windows.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-02-18 11:09:38 +00:00
|
|
|
#include "Common/Common.h"
|
|
|
|
#include "Common/Thread.h"
|