diff options
| author | 2016-05-27 10:40:01 +0100 | |
|---|---|---|
| committer | 2016-05-27 10:42:06 +0100 | |
| commit | 8e1768cf1dc6aeb827018a652a218f6da2f4a3c3 (patch) | |
| tree | 563440d7327e1ff58010929bd7d805d937e3c182 /src | |
| parent | Merge pull request #1564 from MerryMage/this-is-only-a-test (diff) | |
| download | yuzu-8e1768cf1dc6aeb827018a652a218f6da2f4a3c3.tar.gz yuzu-8e1768cf1dc6aeb827018a652a218f6da2f4a3c3.tar.xz yuzu-8e1768cf1dc6aeb827018a652a218f6da2f4a3c3.zip | |
common_funcs: Provide rotr and rotl for MSVC
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/common_funcs.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index ab3515683..4633897ce 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h | |||
| @@ -72,18 +72,24 @@ inline u64 _rotr64(u64 x, unsigned int shift){ | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | #else // _MSC_VER | 74 | #else // _MSC_VER |
| 75 | #if (_MSC_VER < 1900) | 75 | |
| 76 | // Function Cross-Compatibility | 76 | #if (_MSC_VER < 1900) |
| 77 | #define snprintf _snprintf | 77 | // Function Cross-Compatibility |
| 78 | #endif | 78 | #define snprintf _snprintf |
| 79 | 79 | #endif | |
| 80 | // Locale Cross-Compatibility | 80 | |
| 81 | #define locale_t _locale_t | 81 | // Locale Cross-Compatibility |
| 82 | 82 | #define locale_t _locale_t | |
| 83 | extern "C" { | 83 | |
| 84 | __declspec(dllimport) void __stdcall DebugBreak(void); | 84 | extern "C" { |
| 85 | } | 85 | __declspec(dllimport) void __stdcall DebugBreak(void); |
| 86 | #define Crash() {DebugBreak();} | 86 | } |
| 87 | #define Crash() {DebugBreak();} | ||
| 88 | |||
| 89 | // cstdlib provides these on MSVC | ||
| 90 | #define rotr _rotr | ||
| 91 | #define rotl _rotl | ||
| 92 | |||
| 87 | #endif // _MSC_VER ndef | 93 | #endif // _MSC_VER ndef |
| 88 | 94 | ||
| 89 | // Generic function to get last error message. | 95 | // Generic function to get last error message. |