mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 22:15:17 -04:00
cs: implement TakeScreenShot command
This commit is contained in:
parent
8acf0a4fa9
commit
0ec23e74b5
6 changed files with 152 additions and 1 deletions
|
@ -25,6 +25,10 @@ namespace ams::capsrv {
|
|||
Result InitializeScreenShotControl();
|
||||
void FinalizeScreenShotControl();
|
||||
|
||||
Result OpenRawScreenShotReadStreamForDevelop(size_t *out_data_size, s32 *out_width, s32 *out_height, vi::LayerStack layer_stack, TimeSpan timeout);
|
||||
Result ReadRawScreenShotReadStreamForDevelop(size_t *out_read_size, void *dst, size_t dst_size, std::ptrdiff_t offset);
|
||||
void CloseRawScreenShotReadStreamForDevelop();
|
||||
|
||||
Result CaptureJpegScreenshot(u64 *out_size, void *dst, size_t dst_size, vi::LayerStack layer_stack, TimeSpan timeout);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#pragma once
|
||||
#include <vapours.hpp>
|
||||
#include <stratosphere/scs/scs_command_processor.hpp>
|
||||
#include <stratosphere/vi/vi_layer_stack.hpp>
|
||||
|
||||
namespace ams::cs {
|
||||
|
||||
|
@ -25,6 +26,8 @@ namespace ams::cs {
|
|||
class CommandProcessor : public scs::CommandProcessor {
|
||||
public:
|
||||
virtual bool ProcessCommand(const CommandHeader &header, const u8 *body, s32 socket) override;
|
||||
private:
|
||||
void TakeScreenShot(const CommandHeader &header, s32 socket, vi::LayerStack layer_stack);
|
||||
private:
|
||||
static void SendFirmwareVersion(s32 socket, const CommandHeader &header);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue