mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #1857 from MerryMage/rotr-rotl
common_funcs: Provide rotr and rotl for MSVC
This commit is contained in:
		
						commit
						a2c84d5779
					
				
					 1 changed files with 16 additions and 10 deletions
				
			
		|  | @ -72,18 +72,24 @@ inline u64 _rotr64(u64 x, unsigned int shift){ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #else // _MSC_VER
 | #else // _MSC_VER
 | ||||||
|     #if (_MSC_VER < 1900) |  | ||||||
|         // Function Cross-Compatibility
 |  | ||||||
|         #define snprintf _snprintf |  | ||||||
|     #endif |  | ||||||
| 
 | 
 | ||||||
|     // Locale Cross-Compatibility
 | #if (_MSC_VER < 1900) | ||||||
|     #define locale_t _locale_t |     // Function Cross-Compatibility
 | ||||||
|  |     #define snprintf _snprintf | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
|  | // Locale Cross-Compatibility
 | ||||||
|  | #define locale_t _locale_t | ||||||
|  | 
 | ||||||
|  | extern "C" { | ||||||
|  |     __declspec(dllimport) void __stdcall DebugBreak(void); | ||||||
|  | } | ||||||
|  | #define Crash() {DebugBreak();} | ||||||
|  | 
 | ||||||
|  | // cstdlib provides these on MSVC
 | ||||||
|  | #define rotr _rotr | ||||||
|  | #define rotl _rotl | ||||||
| 
 | 
 | ||||||
|     extern "C" { |  | ||||||
|         __declspec(dllimport) void __stdcall DebugBreak(void); |  | ||||||
|     } |  | ||||||
|     #define Crash() {DebugBreak();} |  | ||||||
| #endif // _MSC_VER ndef
 | #endif // _MSC_VER ndef
 | ||||||
| 
 | 
 | ||||||
| // Generic function to get last error message.
 | // Generic function to get last error message.
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue