mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
CMake, Big Cleanup, CI Build and 3rd_Party
This commit is contained in:
parent
ede77f4c3f
commit
548b99e2e3
161 changed files with 681 additions and 663 deletions
36
WIP/fs/fssystem/fssystem_compression_configuration.cpp
Normal file
36
WIP/fs/fssystem/fssystem_compression_configuration.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/lz4_compression.h"
|
||||
#include "core/file_sys/fssystem/fssystem_compression_configuration.h"
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
namespace {
|
||||
|
||||
Result DecompressLz4(void* dst, size_t dst_size, const void* src, size_t src_size) {
|
||||
auto result = Common::Compression::DecompressDataLZ4(dst, dst_size, src, src_size);
|
||||
R_UNLESS(static_cast<size_t>(result) == dst_size, ResultUnexpectedInCompressedStorageC);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
constexpr DecompressorFunction GetNcaDecompressorFunction(CompressionType type) {
|
||||
switch (type) {
|
||||
case CompressionType::Lz4:
|
||||
return DecompressLz4;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
const NcaCompressionConfiguration& GetNcaCompressionConfiguration() {
|
||||
static const NcaCompressionConfiguration configuration = {
|
||||
.get_decompressor = GetNcaDecompressorFunction,
|
||||
};
|
||||
|
||||
return configuration;
|
||||
}
|
||||
|
||||
} // namespace FileSys
|
||||
Loading…
Add table
Add a link
Reference in a new issue