Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services/APT: Implemented the GetCaptureInfo function. #5194

Merged
merged 1 commit into from Apr 18, 2020

Conversation

Subv
Copy link
Member

@Subv Subv commented Apr 11, 2020

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 change is Reviewable

@@ -671,6 +671,18 @@ void Module::APTInterface::ReceiveCaptureBufferInfo(Kernel::HLERequestContext& c
rb.PushStaticBuffer(std::move(apt->screen_capture_buffer), 0);
}

void Module::APTInterface::GetCaptureInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4A, 1, 0); // 0x004A0040
u32 size = rp.Pop<u32>();
Copy link
Member

@lioncash lioncash Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be marked as const.

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
@Subv Subv force-pushed the apt_get_capture_buffer branch from 0aec60e to c1c9137 Compare Apr 17, 2020
@Subv
Copy link
Member Author

Subv commented Apr 17, 2020

Addressed @lioncash comments

B3n30
B3n30 approved these changes Apr 18, 2020
void Module::APTInterface::GetCaptureInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x4A, 1, 0); // 0x004A0040
const u32 size = rp.Pop<u32>();
ASSERT(size == 0x20);
Copy link
Contributor

@B3n30 B3n30 Apr 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should crash here, since on real HW it probably wouldn't crash either. Also magic number. But since all the other ScreenCapture function have it identical: LGTM

@B3n30 B3n30 merged commit 75c9784 into citra-emu:master Apr 18, 2020
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants