summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2016-05-27 20:50:22 -0400
committerGravatar bunnei2016-05-27 20:50:22 -0400
commita2c84d5779a80c61adbf07cfce6c37b0952fea84 (patch)
treef827a9867b44520907142600321c115d9e0cbe0f /src/common
parentMerge pull request #1568 from JayFoxRox/fix-printf (diff)
parentcommon_funcs: Provide rotr and rotl for MSVC (diff)
downloadyuzu-a2c84d5779a80c61adbf07cfce6c37b0952fea84.tar.gz
yuzu-a2c84d5779a80c61adbf07cfce6c37b0952fea84.tar.xz
yuzu-a2c84d5779a80c61adbf07cfce6c37b0952fea84.zip
Merge pull request #1857 from MerryMage/rotr-rotl
common_funcs: Provide rotr and rotl for MSVC
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common_funcs.h30
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); 84extern "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.