forked from eden-emu/eden
		
	general: preliminary support for hbl
This commit is contained in:
		
							parent
							
								
									133a68ee9b
								
							
						
					
					
						commit
						6bcd676b61
					
				
					 6 changed files with 124 additions and 6 deletions
				
			
		|  | @ -15,7 +15,7 @@ TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} { | |||
|         {0, nullptr, "GetTemperatureRange"}, | ||||
|         {1, &TS::GetTemperature, "GetTemperature"}, | ||||
|         {2, nullptr, "SetMeasurementMode"}, | ||||
|         {3, nullptr, "GetTemperatureMilliC"}, | ||||
|         {3, &TS::GetTemperatureMilliC, "GetTemperatureMilliC"}, | ||||
|         {4, nullptr, "OpenSession"}, | ||||
|     }; | ||||
|     // clang-format on
 | ||||
|  | @ -29,8 +29,6 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestParser rp{ctx}; | ||||
|     const auto location{rp.PopEnum<Location>()}; | ||||
| 
 | ||||
|     LOG_WARNING(Service_HID, "(STUBBED) called. location={}", location); | ||||
| 
 | ||||
|     const s32 temperature = location == Location::Internal ? 35 : 20; | ||||
| 
 | ||||
|     IPC::ResponseBuilder rb{ctx, 3}; | ||||
|  | @ -38,4 +36,15 @@ void TS::GetTemperature(Kernel::HLERequestContext& ctx) { | |||
|     rb.Push(temperature); | ||||
| } | ||||
| 
 | ||||
| void TS::GetTemperatureMilliC(Kernel::HLERequestContext& ctx) { | ||||
|     IPC::RequestParser rp{ctx}; | ||||
|     const auto location{rp.PopEnum<Location>()}; | ||||
| 
 | ||||
|     const s32 temperature = location == Location::Internal ? 35000 : 20000; | ||||
| 
 | ||||
|     IPC::ResponseBuilder rb{ctx, 3}; | ||||
|     rb.Push(ResultSuccess); | ||||
|     rb.Push(temperature); | ||||
| } | ||||
| 
 | ||||
| } // namespace Service::PTM
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liam
						Liam