mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	common/cpu_detect: Remove Common::CPUVendor
It's only used by telemetry, where the information it provides can be gained from the brand string.
This commit is contained in:
		
							parent
							
								
									bc5ad137c0
								
							
						
					
					
						commit
						9a45d32a5f
					
				
					 3 changed files with 0 additions and 30 deletions
				
			
		|  | @ -66,12 +66,6 @@ static CPUCaps Detect() { | ||||||
|     __cpuid(cpu_id, 0x80000000); |     __cpuid(cpu_id, 0x80000000); | ||||||
| 
 | 
 | ||||||
|     u32 max_ex_fn = cpu_id[0]; |     u32 max_ex_fn = cpu_id[0]; | ||||||
|     if (!strcmp(caps.brand_string, "GenuineIntel")) |  | ||||||
|         caps.vendor = CPUVendor::INTEL; |  | ||||||
|     else if (!strcmp(caps.brand_string, "AuthenticAMD")) |  | ||||||
|         caps.vendor = CPUVendor::AMD; |  | ||||||
|     else |  | ||||||
|         caps.vendor = CPUVendor::OTHER; |  | ||||||
| 
 | 
 | ||||||
|     // Set reasonable default brand string even if brand string not available
 |     // Set reasonable default brand string even if brand string not available
 | ||||||
|     strcpy(caps.cpu_string, caps.brand_string); |     strcpy(caps.cpu_string, caps.brand_string); | ||||||
|  |  | ||||||
|  | @ -6,16 +6,8 @@ | ||||||
| 
 | 
 | ||||||
| namespace Common { | namespace Common { | ||||||
| 
 | 
 | ||||||
| /// x86/x64 CPU vendors that may be detected by this module
 |  | ||||||
| enum class CPUVendor { |  | ||||||
|     INTEL, |  | ||||||
|     AMD, |  | ||||||
|     OTHER, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| /// x86/x64 CPU capabilities that may be detected by this module
 | /// x86/x64 CPU capabilities that may be detected by this module
 | ||||||
| struct CPUCaps { | struct CPUCaps { | ||||||
|     CPUVendor vendor; |  | ||||||
|     char cpu_string[0x21]; |     char cpu_string[0x21]; | ||||||
|     char brand_string[0x41]; |     char brand_string[0x41]; | ||||||
|     bool sse; |     bool sse; | ||||||
|  |  | ||||||
|  | @ -23,20 +23,6 @@ | ||||||
| 
 | 
 | ||||||
| namespace Core { | namespace Core { | ||||||
| 
 | 
 | ||||||
| #ifdef ARCHITECTURE_x86_64 |  | ||||||
| static const char* CpuVendorToStr(Common::CPUVendor vendor) { |  | ||||||
|     switch (vendor) { |  | ||||||
|     case Common::CPUVendor::INTEL: |  | ||||||
|         return "Intel"; |  | ||||||
|     case Common::CPUVendor::AMD: |  | ||||||
|         return "Amd"; |  | ||||||
|     case Common::CPUVendor::OTHER: |  | ||||||
|         return "Other"; |  | ||||||
|     } |  | ||||||
|     UNREACHABLE(); |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| static u64 GenerateTelemetryId() { | static u64 GenerateTelemetryId() { | ||||||
|     u64 telemetry_id{}; |     u64 telemetry_id{}; | ||||||
|     CryptoPP::AutoSeededRandomPool rng; |     CryptoPP::AutoSeededRandomPool rng; | ||||||
|  | @ -143,8 +129,6 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string); |     AddField(Telemetry::FieldType::UserSystem, "CPU_Model", Common::GetCPUCaps().cpu_string); | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString", |     AddField(Telemetry::FieldType::UserSystem, "CPU_BrandString", | ||||||
|              Common::GetCPUCaps().brand_string); |              Common::GetCPUCaps().brand_string); | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_Vendor", |  | ||||||
|              CpuVendorToStr(Common::GetCPUCaps().vendor)); |  | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AES", Common::GetCPUCaps().aes); |     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AES", Common::GetCPUCaps().aes); | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AVX", Common::GetCPUCaps().avx); |     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AVX", Common::GetCPUCaps().avx); | ||||||
|     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AVX2", Common::GetCPUCaps().avx2); |     AddField(Telemetry::FieldType::UserSystem, "CPU_Extension_x64_AVX2", Common::GetCPUCaps().avx2); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue