blob: 21912e95f6f94795b023559e5fa57b08f52a03f5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "core/hle/service/service.h"
namespace Core {
class System;
}
namespace Service::Capture {
enum class AlbumReportOption : s32;
class AlbumManager;
class IScreenShotApplicationService final : public ServiceFramework<IScreenShotApplicationService> {
public:
explicit IScreenShotApplicationService(Core::System& system_,
std::shared_ptr<AlbumManager> album_manager);
~IScreenShotApplicationService() override;
void CaptureAndSaveScreenshot(AlbumReportOption report_option);
private:
static constexpr std::size_t screenshot_width = 1280;
static constexpr std::size_t screenshot_height = 720;
static constexpr std::size_t bytes_per_pixel = 4;
void SetShimLibraryVersion(HLERequestContext& ctx);
void SaveScreenShotEx0(HLERequestContext& ctx);
void SaveScreenShotEx1(HLERequestContext& ctx);
std::array<u8, screenshot_width * screenshot_height * bytes_per_pixel> image_data;
std::shared_ptr<AlbumManager> manager;
};
} // namespace Service::Capture
|