mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew. This function is used by the Home Menu
This commit is contained in:
		
							parent
							
								
									c8a503b10f
								
							
						
					
					
						commit
						75c9784239
					
				
					 4 changed files with 28 additions and 2 deletions
				
			
		|  | @ -722,6 +722,18 @@ void Module::APTInterface::ReceiveCaptureBufferInfo(Kernel::HLERequestContext& c | ||||||
|     rb.PushStaticBuffer(std::move(apt->screen_capture_buffer), 0); |     rb.PushStaticBuffer(std::move(apt->screen_capture_buffer), 0); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void Module::APTInterface::GetCaptureInfo(Kernel::HLERequestContext& ctx) { | ||||||
|  |     IPC::RequestParser rp(ctx, 0x4A, 1, 0); // 0x004A0040
 | ||||||
|  |     const u32 size = rp.Pop<u32>(); | ||||||
|  |     ASSERT(size == 0x20); | ||||||
|  | 
 | ||||||
|  |     IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); | ||||||
|  |     rb.Push(RESULT_SUCCESS); | ||||||
|  |     rb.Push(static_cast<u32>(apt->screen_capture_buffer.size())); | ||||||
|  |     // This service function does not clear the capture buffer.
 | ||||||
|  |     rb.PushStaticBuffer(apt->screen_capture_buffer, 0); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void Module::APTInterface::SetScreenCapPostPermission(Kernel::HLERequestContext& ctx) { | void Module::APTInterface::SetScreenCapPostPermission(Kernel::HLERequestContext& ctx) { | ||||||
|     IPC::RequestParser rp(ctx, 0x55, 1, 0); // 0x00550040
 |     IPC::RequestParser rp(ctx, 0x55, 1, 0); // 0x00550040
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -576,6 +576,20 @@ public: | ||||||
|          */ |          */ | ||||||
|         void ReceiveCaptureBufferInfo(Kernel::HLERequestContext& ctx); |         void ReceiveCaptureBufferInfo(Kernel::HLERequestContext& ctx); | ||||||
| 
 | 
 | ||||||
|  |         /**
 | ||||||
|  |          * APT::GetCaptureInfo service function | ||||||
|  |          *  Inputs: | ||||||
|  |          *      0 : Command header [0x004A0040] | ||||||
|  |          *      1 : Size | ||||||
|  |          *      64 : Size << 14 | 2 | ||||||
|  |          *      65 : void*, CaptureBufferInfo | ||||||
|  |          *  Outputs: | ||||||
|  |          *      0 : Header code | ||||||
|  |          *      1 : Result code | ||||||
|  |          *      2 : Actual Size | ||||||
|  |          */ | ||||||
|  |         void GetCaptureInfo(Kernel::HLERequestContext& ctx); | ||||||
|  | 
 | ||||||
|         /**
 |         /**
 | ||||||
|          * APT::GetStartupArgument service function |          * APT::GetStartupArgument service function | ||||||
|          *  Inputs: |          *  Inputs: | ||||||
|  |  | ||||||
|  | @ -83,7 +83,7 @@ APT_S::APT_S(std::shared_ptr<Module> apt) | ||||||
|         {0x00470104, &APT_S::Unwrap, "Unwrap"}, |         {0x00470104, &APT_S::Unwrap, "Unwrap"}, | ||||||
|         {0x00480100, nullptr, "GetProgramInfo"}, |         {0x00480100, nullptr, "GetProgramInfo"}, | ||||||
|         {0x00490180, nullptr, "Reboot"}, |         {0x00490180, nullptr, "Reboot"}, | ||||||
|         {0x004A0040, nullptr, "GetCaptureInfo"}, |         {0x004A0040, &APT_S::GetCaptureInfo, "GetCaptureInfo"}, | ||||||
|         {0x004B00C2, &APT_S::AppletUtility, "AppletUtility"}, |         {0x004B00C2, &APT_S::AppletUtility, "AppletUtility"}, | ||||||
|         {0x004C0000, nullptr, "SetFatalErrDispMode"}, |         {0x004C0000, nullptr, "SetFatalErrDispMode"}, | ||||||
|         {0x004D0080, nullptr, "GetAppletProgramInfo"}, |         {0x004D0080, nullptr, "GetAppletProgramInfo"}, | ||||||
|  |  | ||||||
|  | @ -83,7 +83,7 @@ APT_U::APT_U(std::shared_ptr<Module> apt) | ||||||
|         {0x00470104, &APT_U::Unwrap, "Unwrap"}, |         {0x00470104, &APT_U::Unwrap, "Unwrap"}, | ||||||
|         {0x00480100, nullptr, "GetProgramInfo"}, |         {0x00480100, nullptr, "GetProgramInfo"}, | ||||||
|         {0x00490180, nullptr, "Reboot"}, |         {0x00490180, nullptr, "Reboot"}, | ||||||
|         {0x004A0040, nullptr, "GetCaptureInfo"}, |         {0x004A0040, &APT_U::GetCaptureInfo, "GetCaptureInfo"}, | ||||||
|         {0x004B00C2, &APT_U::AppletUtility, "AppletUtility"}, |         {0x004B00C2, &APT_U::AppletUtility, "AppletUtility"}, | ||||||
|         {0x004C0000, nullptr, "SetFatalErrDispMode"}, |         {0x004C0000, nullptr, "SetFatalErrDispMode"}, | ||||||
|         {0x004D0080, nullptr, "GetAppletProgramInfo"}, |         {0x004D0080, nullptr, "GetAppletProgramInfo"}, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue