mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	core/core_timing: Replace logging macros
This commit is contained in:
		
							parent
							
								
									f407917eb7
								
							
						
					
					
						commit
						bef6c6d174
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -53,11 +53,11 @@ inline s64 usToCycles(int us) { | ||||||
| 
 | 
 | ||||||
| inline s64 usToCycles(s64 us) { | inline s64 usToCycles(s64 us) { | ||||||
|     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (us > MAX_VALUE_TO_MULTIPLY) { |     if (us > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * (us / 1000000); |         return BASE_CLOCK_RATE_ARM11 * (us / 1000000); | ||||||
|     } |     } | ||||||
|     return (BASE_CLOCK_RATE_ARM11 * us) / 1000000; |     return (BASE_CLOCK_RATE_ARM11 * us) / 1000000; | ||||||
|  | @ -65,11 +65,11 @@ inline s64 usToCycles(s64 us) { | ||||||
| 
 | 
 | ||||||
| inline s64 usToCycles(u64 us) { | inline s64 usToCycles(u64 us) { | ||||||
|     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |     if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (us > MAX_VALUE_TO_MULTIPLY) { |     if (us > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us / 1000000); |         return BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us / 1000000); | ||||||
|     } |     } | ||||||
|     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us)) / 1000000; |     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(us)) / 1000000; | ||||||
|  | @ -85,11 +85,11 @@ inline s64 nsToCycles(int ns) { | ||||||
| 
 | 
 | ||||||
| inline s64 nsToCycles(s64 ns) { | inline s64 nsToCycles(s64 ns) { | ||||||
|     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (ns > MAX_VALUE_TO_MULTIPLY) { |     if (ns > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * (ns / 1000000000); |         return BASE_CLOCK_RATE_ARM11 * (ns / 1000000000); | ||||||
|     } |     } | ||||||
|     return (BASE_CLOCK_RATE_ARM11 * ns) / 1000000000; |     return (BASE_CLOCK_RATE_ARM11 * ns) / 1000000000; | ||||||
|  | @ -97,11 +97,11 @@ inline s64 nsToCycles(s64 ns) { | ||||||
| 
 | 
 | ||||||
| inline s64 nsToCycles(u64 ns) { | inline s64 nsToCycles(u64 ns) { | ||||||
|     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |     if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |         NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | ||||||
|         return std::numeric_limits<s64>::max(); |         return std::numeric_limits<s64>::max(); | ||||||
|     } |     } | ||||||
|     if (ns > MAX_VALUE_TO_MULTIPLY) { |     if (ns > MAX_VALUE_TO_MULTIPLY) { | ||||||
|         LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |         NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | ||||||
|         return BASE_CLOCK_RATE_ARM11 * (static_cast<s64>(ns) / 1000000000); |         return BASE_CLOCK_RATE_ARM11 * (static_cast<s64>(ns) / 1000000000); | ||||||
|     } |     } | ||||||
|     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(ns)) / 1000000000; |     return (BASE_CLOCK_RATE_ARM11 * static_cast<s64>(ns)) / 1000000000; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue