Compare commits
106 Commits
__refs_pul
...
__refs_pul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c243bc09d4 | ||
|
|
1470b85af9 | ||
|
|
2f0ff4d25b | ||
|
|
143525dcb9 | ||
|
|
46ba1bc40f | ||
|
|
6ac955a0b4 | ||
|
|
4c3bd33be2 | ||
|
|
3bac3051fc | ||
|
|
804115b2a4 | ||
|
|
d6e8e16a66 | ||
|
|
12445b476d | ||
|
|
d884e805c5 | ||
|
|
4bea6657ef | ||
|
|
ae0c95efcc | ||
|
|
c1b8cd9058 | ||
|
|
0cfb0bacb2 | ||
|
|
d2f788762a | ||
|
|
17f8059fea | ||
|
|
c560043581 | ||
|
|
4c0b1cc1ae | ||
|
|
035e6bd407 | ||
|
|
1c34498368 | ||
|
|
ac959799e4 | ||
|
|
49b15af054 | ||
|
|
f9e468d891 | ||
|
|
7ddd5b765d | ||
|
|
50c191439d | ||
|
|
3b8a0bc146 | ||
|
|
136040ee15 | ||
|
|
e58855c7a4 | ||
|
|
00131e752d | ||
|
|
223ddb2008 | ||
|
|
fcf81147e7 | ||
|
|
73a2d71f44 | ||
|
|
bd8065295c | ||
|
|
0acf9b351f | ||
|
|
073a21ac0b | ||
|
|
64e45b04e0 | ||
|
|
6d64ecf359 | ||
|
|
500e81429a | ||
|
|
5ff72a48a7 | ||
|
|
82a313a14c | ||
|
|
fdb199290b | ||
|
|
af074ee422 | ||
|
|
deff28d3c0 | ||
|
|
3d9776f36a | ||
|
|
a76f0d5d06 | ||
|
|
4048b54ef7 | ||
|
|
9cd79c25ed | ||
|
|
2515d2433b | ||
|
|
8b08cb925b | ||
|
|
975226e7ff | ||
|
|
a8974f0556 | ||
|
|
23ae7cf9db | ||
|
|
fdd5c97a14 | ||
|
|
f165a85398 | ||
|
|
0731383124 | ||
|
|
05f6f59ffb | ||
|
|
ce8291f6c5 | ||
|
|
9dccf7e1fa | ||
|
|
030676b95d | ||
|
|
a439f7b6e1 | ||
|
|
b56e5edafc | ||
|
|
460ebc8187 | ||
|
|
6ac1bd9f5d | ||
|
|
7e9b79955f | ||
|
|
564b7fdc9c | ||
|
|
c08c5d346a | ||
|
|
9382414b20 | ||
|
|
e3af341d5b | ||
|
|
3f17fe7133 | ||
|
|
a164b413fa | ||
|
|
9273c02427 | ||
|
|
b89dda2b98 | ||
|
|
9947c6ad59 | ||
|
|
9b50dca2bb | ||
|
|
009a2cc9cc | ||
|
|
6faf1b0972 | ||
|
|
820f646458 | ||
|
|
948f6c0738 | ||
|
|
ddcdbce067 | ||
|
|
8d685a29bc | ||
|
|
14230fe2af | ||
|
|
68296d9474 | ||
|
|
8f4e09ba07 | ||
|
|
56ab608044 | ||
|
|
54724fe918 | ||
|
|
b155b3ef81 | ||
|
|
a859a35ec8 | ||
|
|
fbaefc47a0 | ||
|
|
742f895f8b | ||
|
|
a781042700 | ||
|
|
77554ac773 | ||
|
|
6f09c5b128 | ||
|
|
e63b229f4a | ||
|
|
94f193af65 | ||
|
|
a6ae765410 | ||
|
|
aba988f71c | ||
|
|
7f15306f78 | ||
|
|
6bd6beee20 | ||
|
|
d3ad9469a1 | ||
|
|
c0b7ed8b58 | ||
|
|
527e362a83 | ||
|
|
50a806ea67 | ||
|
|
a1ef02c3e6 | ||
|
|
99a71580c4 |
3
externals/CMakeLists.txt
vendored
3
externals/CMakeLists.txt
vendored
@@ -43,6 +43,9 @@ target_include_directories(mbedtls PUBLIC ./mbedtls/include)
|
||||
add_library(microprofile INTERFACE)
|
||||
target_include_directories(microprofile INTERFACE ./microprofile)
|
||||
|
||||
# Open Source Archives
|
||||
add_subdirectory(open_source_archives EXCLUDE_FROM_ALL)
|
||||
|
||||
# Unicorn
|
||||
add_library(unicorn-headers INTERFACE)
|
||||
target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
|
||||
|
||||
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
Submodule externals/dynarmic updated: 0435ac2d80...959446573f
16
externals/open_source_archives/CMakeLists.txt
vendored
Normal file
16
externals/open_source_archives/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
add_library(open_source_archives
|
||||
src/FontChineseSimplified.cpp
|
||||
src/FontChineseTraditional.cpp
|
||||
src/FontExtendedChineseSimplified.cpp
|
||||
src/FontKorean.cpp
|
||||
src/FontNintendoExtended.cpp
|
||||
src/FontStandard.cpp
|
||||
include/FontChineseSimplified.h
|
||||
include/FontChineseTraditional.h
|
||||
include/FontExtendedChineseSimplified.h
|
||||
include/FontKorean.h
|
||||
include/FontNintendoExtended.h
|
||||
include/FontStandard.h
|
||||
)
|
||||
|
||||
target_include_directories(open_source_archives PUBLIC include)
|
||||
4
externals/open_source_archives/Readme.md
vendored
Normal file
4
externals/open_source_archives/Readme.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
These files were generated by https://github.com/FearlessTobi/yuzu_system_archives at git commit 0a24b0c9f38d71fb2c4bba5645a39029e539a5ec. To generate the files use the run.sh inside that repository.
|
||||
|
||||
The follwing system archives are currently included:
|
||||
- JPN/EUR/USA System Font
|
||||
6
externals/open_source_archives/include/FontChineseSimplified.h
vendored
Normal file
6
externals/open_source_archives/include/FontChineseSimplified.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 217276> FontChineseSimplified;
|
||||
|
||||
6
externals/open_source_archives/include/FontChineseTraditional.h
vendored
Normal file
6
externals/open_source_archives/include/FontChineseTraditional.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 222236> FontChineseTraditional;
|
||||
|
||||
6
externals/open_source_archives/include/FontExtendedChineseSimplified.h
vendored
Normal file
6
externals/open_source_archives/include/FontExtendedChineseSimplified.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 293516> FontExtendedChineseSimplified;
|
||||
|
||||
6
externals/open_source_archives/include/FontKorean.h
vendored
Normal file
6
externals/open_source_archives/include/FontKorean.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 217276> FontKorean;
|
||||
|
||||
6
externals/open_source_archives/include/FontNintendoExtended.h
vendored
Normal file
6
externals/open_source_archives/include/FontNintendoExtended.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 172064> FontNintendoExtended;
|
||||
|
||||
6
externals/open_source_archives/include/FontStandard.h
vendored
Normal file
6
externals/open_source_archives/include/FontStandard.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
extern const std::array<unsigned char, 217276> FontStandard;
|
||||
|
||||
18112
externals/open_source_archives/src/FontChineseSimplified.cpp
vendored
Normal file
18112
externals/open_source_archives/src/FontChineseSimplified.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18525
externals/open_source_archives/src/FontChineseTraditional.cpp
vendored
Normal file
18525
externals/open_source_archives/src/FontChineseTraditional.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24465
externals/open_source_archives/src/FontExtendedChineseSimplified.cpp
vendored
Normal file
24465
externals/open_source_archives/src/FontExtendedChineseSimplified.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18112
externals/open_source_archives/src/FontKorean.cpp
vendored
Normal file
18112
externals/open_source_archives/src/FontKorean.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
14344
externals/open_source_archives/src/FontNintendoExtended.cpp
vendored
Normal file
14344
externals/open_source_archives/src/FontNintendoExtended.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18112
externals/open_source_archives/src/FontStandard.cpp
vendored
Normal file
18112
externals/open_source_archives/src/FontStandard.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
externals/xbyak
vendored
2
externals/xbyak
vendored
Submodule externals/xbyak updated: 71b75f653f...1de435ed04
@@ -17,10 +17,10 @@ AudioRenderer::AudioRenderer(AudioRendererParameter params,
|
||||
Kernel::SharedPtr<Kernel::Event> buffer_event)
|
||||
: worker_params{params}, buffer_event{buffer_event}, voices(params.voice_count) {
|
||||
|
||||
audio_core = std::make_unique<AudioCore::AudioOut>();
|
||||
stream = audio_core->OpenStream(STREAM_SAMPLE_RATE, STREAM_NUM_CHANNELS, "AudioRenderer",
|
||||
[=]() { buffer_event->Signal(); });
|
||||
audio_core->StartStream(stream);
|
||||
audio_out = std::make_unique<AudioCore::AudioOut>();
|
||||
stream = audio_out->OpenStream(STREAM_SAMPLE_RATE, STREAM_NUM_CHANNELS, "AudioRenderer",
|
||||
[=]() { buffer_event->Signal(); });
|
||||
audio_out->StartStream(stream);
|
||||
|
||||
QueueMixedBuffer(0);
|
||||
QueueMixedBuffer(1);
|
||||
@@ -236,11 +236,11 @@ void AudioRenderer::QueueMixedBuffer(Buffer::Tag tag) {
|
||||
}
|
||||
}
|
||||
}
|
||||
audio_core->QueueBuffer(stream, tag, std::move(buffer));
|
||||
audio_out->QueueBuffer(stream, tag, std::move(buffer));
|
||||
}
|
||||
|
||||
void AudioRenderer::ReleaseAndQueueBuffers() {
|
||||
const auto released_buffers{audio_core->GetTagsAndReleaseBuffers(stream, 2)};
|
||||
const auto released_buffers{audio_out->GetTagsAndReleaseBuffers(stream, 2)};
|
||||
for (const auto& tag : released_buffers) {
|
||||
QueueMixedBuffer(tag);
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ private:
|
||||
AudioRendererParameter worker_params;
|
||||
Kernel::SharedPtr<Kernel::Event> buffer_event;
|
||||
std::vector<VoiceState> voices;
|
||||
std::unique_ptr<AudioCore::AudioOut> audio_core;
|
||||
std::unique_ptr<AudioCore::AudioOut> audio_out;
|
||||
AudioCore::StreamPtr stream;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
# Generate cpp with Git revision from template
|
||||
# Also if this is a CI build, add the build name (ie: Nightly, Bleeding Edge) to the scm_rev file as well
|
||||
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
||||
set(REPO_NAME "")
|
||||
set(BUILD_VERSION "0")
|
||||
if ($ENV{CI})
|
||||
if ($ENV{TRAVIS})
|
||||
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
||||
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
||||
elseif($ENV{APPVEYOR})
|
||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
||||
endif()
|
||||
# regex capture the string nightly or bleeding-edge into CMAKE_MATCH_1
|
||||
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
||||
string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY})
|
||||
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
||||
# capitalize the first letter of each word in the repo name.
|
||||
@@ -16,10 +19,21 @@ if ($ENV{CI})
|
||||
string(SUBSTRING ${WORD} 0 1 FIRST_LETTER)
|
||||
string(SUBSTRING ${WORD} 1 -1 REMAINDER)
|
||||
string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
|
||||
# this leaves a trailing space on the last word, but we actually want that
|
||||
# because of how it's styled in the title bar.
|
||||
set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER} ")
|
||||
set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER}")
|
||||
endforeach()
|
||||
if (BUILD_TAG)
|
||||
string(REGEX MATCH "${CMAKE_MATCH_1}-([0-9]+)" OUTVAR ${BUILD_TAG})
|
||||
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
||||
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if (BUILD_VERSION)
|
||||
# This leaves a trailing space on the last word, but we actually want that
|
||||
# because of how it's styled in the title bar.
|
||||
set(BUILD_FULLNAME "${REPO_NAME} #${BUILD_VERSION} ")
|
||||
else()
|
||||
set(BUILD_FULLNAME "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#define GIT_DESC "@GIT_DESC@"
|
||||
#define BUILD_NAME "@REPO_NAME@"
|
||||
#define BUILD_DATE "@BUILD_DATE@"
|
||||
#define BUILD_FULLNAME "@BUILD_FULLNAME@"
|
||||
#define BUILD_VERSION "@BUILD_VERSION@"
|
||||
|
||||
namespace Common {
|
||||
|
||||
@@ -17,6 +19,8 @@ const char g_scm_branch[] = GIT_BRANCH;
|
||||
const char g_scm_desc[] = GIT_DESC;
|
||||
const char g_build_name[] = BUILD_NAME;
|
||||
const char g_build_date[] = BUILD_DATE;
|
||||
const char g_build_fullname[] = BUILD_FULLNAME;
|
||||
const char g_build_version[] = BUILD_VERSION;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -11,5 +11,7 @@ extern const char g_scm_branch[];
|
||||
extern const char g_scm_desc[];
|
||||
extern const char g_build_name[];
|
||||
extern const char g_build_date[];
|
||||
extern const char g_build_fullname[];
|
||||
extern const char g_build_version[];
|
||||
|
||||
} // namespace Common
|
||||
|
||||
@@ -388,7 +388,7 @@ add_library(core STATIC
|
||||
create_target_directory_groups(core)
|
||||
|
||||
target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
|
||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn)
|
||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn open_source_archives)
|
||||
|
||||
if (ARCHITECTURE_x86_64)
|
||||
target_sources(core PRIVATE
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "core/hle/kernel/scheduler.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/sm/controller.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
#include "core/loader/loader.h"
|
||||
#include "core/perf_stats.h"
|
||||
@@ -137,7 +136,7 @@ struct System::Impl {
|
||||
if (virtual_filesystem == nullptr)
|
||||
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
|
||||
|
||||
current_process = Kernel::Process::Create(kernel, "main");
|
||||
kernel.MakeCurrentProcess(Kernel::Process::Create(kernel, "main"));
|
||||
|
||||
cpu_barrier = std::make_shared<CpuBarrier>();
|
||||
cpu_exclusive_monitor = Cpu::MakeExclusiveMonitor(cpu_cores.size());
|
||||
@@ -203,7 +202,7 @@ struct System::Impl {
|
||||
return init_result;
|
||||
}
|
||||
|
||||
const Loader::ResultStatus load_result{app_loader->Load(current_process)};
|
||||
const Loader::ResultStatus load_result{app_loader->Load(kernel.CurrentProcess())};
|
||||
if (load_result != Loader::ResultStatus::Success) {
|
||||
LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result));
|
||||
Shutdown();
|
||||
@@ -282,7 +281,6 @@ struct System::Impl {
|
||||
std::unique_ptr<VideoCore::RendererBase> renderer;
|
||||
std::unique_ptr<Tegra::GPU> gpu_core;
|
||||
std::shared_ptr<Tegra::DebugContext> debug_context;
|
||||
Kernel::SharedPtr<Kernel::Process> current_process;
|
||||
std::shared_ptr<ExclusiveMonitor> cpu_exclusive_monitor;
|
||||
std::shared_ptr<CpuBarrier> cpu_barrier;
|
||||
std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores;
|
||||
@@ -364,7 +362,11 @@ const std::shared_ptr<Kernel::Scheduler>& System::Scheduler(size_t core_index) {
|
||||
}
|
||||
|
||||
Kernel::SharedPtr<Kernel::Process>& System::CurrentProcess() {
|
||||
return impl->current_process;
|
||||
return impl->kernel.CurrentProcess();
|
||||
}
|
||||
|
||||
const Kernel::SharedPtr<Kernel::Process>& System::CurrentProcess() const {
|
||||
return impl->kernel.CurrentProcess();
|
||||
}
|
||||
|
||||
ARM_Interface& System::ArmInterface(size_t core_index) {
|
||||
|
||||
@@ -174,9 +174,12 @@ public:
|
||||
/// Gets the scheduler for the CPU core with the specified index
|
||||
const std::shared_ptr<Kernel::Scheduler>& Scheduler(size_t core_index);
|
||||
|
||||
/// Gets the current process
|
||||
/// Provides a reference to the current process
|
||||
Kernel::SharedPtr<Kernel::Process>& CurrentProcess();
|
||||
|
||||
/// Provides a constant reference to the current process.
|
||||
const Kernel::SharedPtr<Kernel::Process>& CurrentProcess() const;
|
||||
|
||||
/// Provides a reference to the kernel instance.
|
||||
Kernel::KernelCore& Kernel();
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "core/crypto/aes_util.h"
|
||||
#include "core/file_sys/nca_patch.h"
|
||||
@@ -13,9 +17,9 @@ BKTR::BKTR(VirtualFile base_romfs_, VirtualFile bktr_romfs_, RelocationBlock rel
|
||||
std::vector<SubsectionBucket> subsection_buckets_, bool is_encrypted_,
|
||||
Core::Crypto::Key128 key_, u64 base_offset_, u64 ivfc_offset_,
|
||||
std::array<u8, 8> section_ctr_)
|
||||
: base_romfs(std::move(base_romfs_)), bktr_romfs(std::move(bktr_romfs_)),
|
||||
relocation(relocation_), relocation_buckets(std::move(relocation_buckets_)),
|
||||
: relocation(relocation_), relocation_buckets(std::move(relocation_buckets_)),
|
||||
subsection(subsection_), subsection_buckets(std::move(subsection_buckets_)),
|
||||
base_romfs(std::move(base_romfs_)), bktr_romfs(std::move(bktr_romfs_)),
|
||||
encrypted(is_encrypted_), key(key_), base_offset(base_offset_), ivfc_offset(ivfc_offset_),
|
||||
section_ctr(section_ctr_) {
|
||||
for (size_t i = 0; i < relocation.number_buckets - 1; ++i) {
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <common/common_funcs.h>
|
||||
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/crypto/key_manager.h"
|
||||
#include "core/file_sys/romfs.h"
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/file_sys/content_archive.h"
|
||||
#include "core/file_sys/control_metadata.h"
|
||||
#include "core/file_sys/patch_manager.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common/common_types.h"
|
||||
#include "core/file_sys/nca_metadata.h"
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <string_view>
|
||||
|
||||
#include <fmt/ostream.h>
|
||||
#include "common/assert.h"
|
||||
|
||||
#include "common/hex_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/crypto/key_manager.h"
|
||||
#include "core/file_sys/content_archive.h"
|
||||
#include "core/file_sys/nca_metadata.h"
|
||||
#include "core/file_sys/partition_filesystem.h"
|
||||
@@ -13,8 +19,8 @@
|
||||
|
||||
namespace FileSys {
|
||||
NSP::NSP(VirtualFile file_)
|
||||
: file(std::move(file_)),
|
||||
pfs(std::make_shared<PartitionFilesystem>(file)), status{Loader::ResultStatus::Success} {
|
||||
: file(std::move(file_)), status{Loader::ResultStatus::Success},
|
||||
pfs(std::make_shared<PartitionFilesystem>(file)) {
|
||||
if (pfs->GetStatus() != Loader::ResultStatus::Success) {
|
||||
status = pfs->GetStatus();
|
||||
return;
|
||||
|
||||
@@ -4,20 +4,23 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/file_sys/content_archive.h"
|
||||
#include "core/file_sys/romfs_factory.h"
|
||||
#include "core/file_sys/vfs.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
namespace Loader {
|
||||
enum class ResultStatus : u16;
|
||||
}
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
class NCA;
|
||||
class PartitionFilesystem;
|
||||
|
||||
enum class ContentRecordType : u8;
|
||||
|
||||
class NSP : public ReadOnlyVfsDirectory {
|
||||
public:
|
||||
explicit NSP(VirtualFile file);
|
||||
|
||||
@@ -116,6 +116,7 @@ struct KernelCore::Impl {
|
||||
next_thread_id = 1;
|
||||
|
||||
process_list.clear();
|
||||
current_process.reset();
|
||||
|
||||
handle_table.Clear();
|
||||
resource_limits.fill(nullptr);
|
||||
@@ -206,6 +207,7 @@ struct KernelCore::Impl {
|
||||
|
||||
// Lists all processes that exist in the current session.
|
||||
std::vector<SharedPtr<Process>> process_list;
|
||||
SharedPtr<Process> current_process;
|
||||
|
||||
Kernel::HandleTable handle_table;
|
||||
std::array<SharedPtr<ResourceLimit>, 4> resource_limits;
|
||||
@@ -264,6 +266,18 @@ void KernelCore::AppendNewProcess(SharedPtr<Process> process) {
|
||||
impl->process_list.push_back(std::move(process));
|
||||
}
|
||||
|
||||
void KernelCore::MakeCurrentProcess(SharedPtr<Process> process) {
|
||||
impl->current_process = std::move(process);
|
||||
}
|
||||
|
||||
SharedPtr<Process>& KernelCore::CurrentProcess() {
|
||||
return impl->current_process;
|
||||
}
|
||||
|
||||
const SharedPtr<Process>& KernelCore::CurrentProcess() const {
|
||||
return impl->current_process;
|
||||
}
|
||||
|
||||
void KernelCore::AddNamedPort(std::string name, SharedPtr<ClientPort> port) {
|
||||
impl->named_ports.emplace(std::move(name), std::move(port));
|
||||
}
|
||||
|
||||
@@ -65,6 +65,15 @@ public:
|
||||
/// Adds the given shared pointer to an internal list of active processes.
|
||||
void AppendNewProcess(SharedPtr<Process> process);
|
||||
|
||||
/// Makes the given process the new current process.
|
||||
void MakeCurrentProcess(SharedPtr<Process> process);
|
||||
|
||||
/// Retrieves a reference to the current process.
|
||||
SharedPtr<Process>& CurrentProcess();
|
||||
|
||||
/// Retrieves a const reference to the current process.
|
||||
const SharedPtr<Process>& CurrentProcess() const;
|
||||
|
||||
/// Adds a port to the named port table
|
||||
void AddNamedPort(std::string name, SharedPtr<ClientPort> port);
|
||||
|
||||
|
||||
@@ -18,4 +18,6 @@ ACC_AA::ACC_AA(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ACC_AA::~ACC_AA() = default;
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -12,6 +12,7 @@ class ACC_AA final : public Module::Interface {
|
||||
public:
|
||||
explicit ACC_AA(std::shared_ptr<Module> module,
|
||||
std::shared_ptr<ProfileManager> profile_manager);
|
||||
~ACC_AA() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -51,4 +51,6 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ACC_SU::~ACC_SU() = default;
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -13,6 +13,7 @@ class ACC_SU final : public Module::Interface {
|
||||
public:
|
||||
explicit ACC_SU(std::shared_ptr<Module> module,
|
||||
std::shared_ptr<ProfileManager> profile_manager);
|
||||
~ACC_SU() override;
|
||||
};
|
||||
|
||||
} // namespace Account
|
||||
|
||||
@@ -31,4 +31,6 @@ ACC_U0::ACC_U0(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ACC_U0::~ACC_U0() = default;
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -12,6 +12,7 @@ class ACC_U0 final : public Module::Interface {
|
||||
public:
|
||||
explicit ACC_U0(std::shared_ptr<Module> module,
|
||||
std::shared_ptr<ProfileManager> profile_manager);
|
||||
~ACC_U0() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -38,4 +38,6 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ACC_U1::~ACC_U1() = default;
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -12,6 +12,7 @@ class ACC_U1 final : public Module::Interface {
|
||||
public:
|
||||
explicit ACC_U1(std::shared_ptr<Module> module,
|
||||
std::shared_ptr<ProfileManager> profile_manager);
|
||||
~ACC_U1() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Account
|
||||
|
||||
@@ -29,6 +29,8 @@ ProfileManager::ProfileManager() {
|
||||
OpenUser(user_uuid);
|
||||
}
|
||||
|
||||
ProfileManager::~ProfileManager() = default;
|
||||
|
||||
/// After a users creation it needs to be "registered" to the system. AddToProfiles handles the
|
||||
/// internal management of the users profiles
|
||||
boost::optional<size_t> ProfileManager::AddToProfiles(const ProfileInfo& user) {
|
||||
|
||||
@@ -82,6 +82,8 @@ static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase is an invalid size");
|
||||
class ProfileManager {
|
||||
public:
|
||||
ProfileManager(); // TODO(ogniK): Load from system save
|
||||
~ProfileManager();
|
||||
|
||||
ResultCode AddUser(const ProfileInfo& user);
|
||||
ResultCode CreateNewUser(UUID uuid, const ProfileUsername& username);
|
||||
ResultCode CreateNewUser(UUID uuid, const std::string& username);
|
||||
|
||||
@@ -35,6 +35,8 @@ IWindowController::IWindowController() : ServiceFramework("IWindowController") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IWindowController::~IWindowController() = default;
|
||||
|
||||
void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
@@ -61,6 +63,8 @@ IAudioController::IAudioController() : ServiceFramework("IAudioController") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IAudioController::~IAudioController() = default;
|
||||
|
||||
void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
@@ -116,7 +120,10 @@ IDisplayController::IDisplayController() : ServiceFramework("IDisplayController"
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IDisplayController::~IDisplayController() = default;
|
||||
|
||||
IDebugFunctions::IDebugFunctions() : ServiceFramework("IDebugFunctions") {}
|
||||
IDebugFunctions::~IDebugFunctions() = default;
|
||||
|
||||
ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
|
||||
: ServiceFramework("ISelfController"), nvflinger(std::move(nvflinger)) {
|
||||
@@ -165,6 +172,8 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger
|
||||
Kernel::Event::Create(kernel, Kernel::ResetType::Sticky, "ISelfController:LaunchableEvent");
|
||||
}
|
||||
|
||||
ISelfController::~ISelfController() = default;
|
||||
|
||||
void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
||||
// Takes 3 input u8s with each field located immediately after the previous u8, these are
|
||||
// bool flags. No output.
|
||||
@@ -337,6 +346,8 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter"
|
||||
event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "ICommonStateGetter:Event");
|
||||
}
|
||||
|
||||
ICommonStateGetter::~ICommonStateGetter() = default;
|
||||
|
||||
void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
@@ -573,6 +584,8 @@ ILibraryAppletCreator::ILibraryAppletCreator() : ServiceFramework("ILibraryApple
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
ILibraryAppletCreator::~ILibraryAppletCreator() = default;
|
||||
|
||||
void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
|
||||
@@ -638,6 +651,8 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IApplicationFunctions::~IApplicationFunctions() = default;
|
||||
|
||||
void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
||||
constexpr std::array<u8, 0x88> data{{
|
||||
0xca, 0x97, 0x94, 0xc7, // Magic
|
||||
@@ -760,6 +775,8 @@ IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions"
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IHomeMenuFunctions::~IHomeMenuFunctions() = default;
|
||||
|
||||
void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
@@ -783,6 +800,8 @@ IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStat
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IGlobalStateController::~IGlobalStateController() = default;
|
||||
|
||||
IApplicationCreator::IApplicationCreator() : ServiceFramework("IApplicationCreator") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "CreateApplication"},
|
||||
@@ -793,6 +812,8 @@ IApplicationCreator::IApplicationCreator() : ServiceFramework("IApplicationCreat
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IApplicationCreator::~IApplicationCreator() = default;
|
||||
|
||||
IProcessWindingController::IProcessWindingController()
|
||||
: ServiceFramework("IProcessWindingController") {
|
||||
static const FunctionInfo functions[] = {
|
||||
@@ -807,4 +828,6 @@ IProcessWindingController::IProcessWindingController()
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IProcessWindingController::~IProcessWindingController() = default;
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -42,6 +42,7 @@ enum SystemLanguage {
|
||||
class IWindowController final : public ServiceFramework<IWindowController> {
|
||||
public:
|
||||
IWindowController();
|
||||
~IWindowController() override;
|
||||
|
||||
private:
|
||||
void GetAppletResourceUserId(Kernel::HLERequestContext& ctx);
|
||||
@@ -51,6 +52,7 @@ private:
|
||||
class IAudioController final : public ServiceFramework<IAudioController> {
|
||||
public:
|
||||
IAudioController();
|
||||
~IAudioController() override;
|
||||
|
||||
private:
|
||||
void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
||||
@@ -63,16 +65,19 @@ private:
|
||||
class IDisplayController final : public ServiceFramework<IDisplayController> {
|
||||
public:
|
||||
IDisplayController();
|
||||
~IDisplayController() override;
|
||||
};
|
||||
|
||||
class IDebugFunctions final : public ServiceFramework<IDebugFunctions> {
|
||||
public:
|
||||
IDebugFunctions();
|
||||
~IDebugFunctions() override;
|
||||
};
|
||||
|
||||
class ISelfController final : public ServiceFramework<ISelfController> {
|
||||
public:
|
||||
explicit ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
||||
~ISelfController() override;
|
||||
|
||||
private:
|
||||
void SetFocusHandlingMode(Kernel::HLERequestContext& ctx);
|
||||
@@ -98,6 +103,7 @@ private:
|
||||
class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
|
||||
public:
|
||||
ICommonStateGetter();
|
||||
~ICommonStateGetter() override;
|
||||
|
||||
private:
|
||||
enum class FocusState : u8 {
|
||||
@@ -124,6 +130,7 @@ private:
|
||||
class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
|
||||
public:
|
||||
ILibraryAppletCreator();
|
||||
~ILibraryAppletCreator() override;
|
||||
|
||||
private:
|
||||
void CreateLibraryApplet(Kernel::HLERequestContext& ctx);
|
||||
@@ -133,6 +140,7 @@ private:
|
||||
class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
|
||||
public:
|
||||
IApplicationFunctions();
|
||||
~IApplicationFunctions() override;
|
||||
|
||||
private:
|
||||
void PopLaunchParameter(Kernel::HLERequestContext& ctx);
|
||||
@@ -150,6 +158,7 @@ private:
|
||||
class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> {
|
||||
public:
|
||||
IHomeMenuFunctions();
|
||||
~IHomeMenuFunctions() override;
|
||||
|
||||
private:
|
||||
void RequestToGetForeground(Kernel::HLERequestContext& ctx);
|
||||
@@ -158,16 +167,19 @@ private:
|
||||
class IGlobalStateController final : public ServiceFramework<IGlobalStateController> {
|
||||
public:
|
||||
IGlobalStateController();
|
||||
~IGlobalStateController() override;
|
||||
};
|
||||
|
||||
class IApplicationCreator final : public ServiceFramework<IApplicationCreator> {
|
||||
public:
|
||||
IApplicationCreator();
|
||||
~IApplicationCreator() override;
|
||||
};
|
||||
|
||||
class IProcessWindingController final : public ServiceFramework<IProcessWindingController> {
|
||||
public:
|
||||
IProcessWindingController();
|
||||
~IProcessWindingController() override;
|
||||
};
|
||||
|
||||
/// Registers all AM services with the specified service manager.
|
||||
|
||||
@@ -222,4 +222,6 @@ AppletAE::AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AppletAE::~AppletAE() = default;
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace AM {
|
||||
class AppletAE final : public ServiceFramework<AppletAE> {
|
||||
public:
|
||||
explicit AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
||||
~AppletAE() = default;
|
||||
~AppletAE() override;
|
||||
|
||||
private:
|
||||
void OpenSystemAppletProxy(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -103,4 +103,6 @@ AppletOE::AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AppletOE::~AppletOE() = default;
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace AM {
|
||||
class AppletOE final : public ServiceFramework<AppletOE> {
|
||||
public:
|
||||
explicit AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
||||
~AppletOE() = default;
|
||||
~AppletOE() override;
|
||||
|
||||
private:
|
||||
void OpenApplicationProxy(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -21,4 +21,6 @@ IdleSys::IdleSys() : ServiceFramework{"idle:sys"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IdleSys::~IdleSys() = default;
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::AM {
|
||||
class IdleSys final : public ServiceFramework<IdleSys> {
|
||||
public:
|
||||
explicit IdleSys();
|
||||
~IdleSys() override;
|
||||
};
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -39,4 +39,6 @@ OMM::OMM() : ServiceFramework{"omm"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
OMM::~OMM() = default;
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::AM {
|
||||
class OMM final : public ServiceFramework<OMM> {
|
||||
public:
|
||||
explicit OMM();
|
||||
~OMM() override;
|
||||
};
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -27,4 +27,6 @@ SPSM::SPSM() : ServiceFramework{"spsm"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
SPSM::~SPSM() = default;
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::AM {
|
||||
class SPSM final : public ServiceFramework<SPSM> {
|
||||
public:
|
||||
explicit SPSM();
|
||||
~SPSM() override;
|
||||
};
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -23,6 +23,8 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AOC_U::~AOC_U() = default;
|
||||
|
||||
void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Service::AOC {
|
||||
class AOC_U final : public ServiceFramework<AOC_U> {
|
||||
public:
|
||||
AOC_U();
|
||||
~AOC_U() = default;
|
||||
~AOC_U() override;
|
||||
|
||||
private:
|
||||
void CountAddOnContent(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
namespace Service::APM {
|
||||
|
||||
Module::Module() = default;
|
||||
Module::~Module() = default;
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
auto module_ = std::make_shared<Module>();
|
||||
std::make_shared<APM>(module_, "apm")->InstallAsService(service_manager);
|
||||
|
||||
@@ -15,8 +15,8 @@ enum class PerformanceMode : u8 {
|
||||
|
||||
class Module final {
|
||||
public:
|
||||
Module() = default;
|
||||
~Module() = default;
|
||||
Module();
|
||||
~Module();
|
||||
};
|
||||
|
||||
/// Registers all AM services with the specified service manager.
|
||||
|
||||
@@ -70,6 +70,8 @@ APM::APM(std::shared_ptr<Module> apm, const char* name)
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
APM::~APM() = default;
|
||||
|
||||
void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
@@ -93,6 +95,8 @@ APM_Sys::APM_Sys() : ServiceFramework{"apm:sys"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
APM_Sys::~APM_Sys() = default;
|
||||
|
||||
void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) {
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Service::APM {
|
||||
class APM final : public ServiceFramework<APM> {
|
||||
public:
|
||||
explicit APM(std::shared_ptr<Module> apm, const char* name);
|
||||
~APM() = default;
|
||||
~APM() override;
|
||||
|
||||
private:
|
||||
void OpenSession(Kernel::HLERequestContext& ctx);
|
||||
@@ -22,6 +22,7 @@ private:
|
||||
class APM_Sys final : public ServiceFramework<APM_Sys> {
|
||||
public:
|
||||
explicit APM_Sys();
|
||||
~APM_Sys() override;
|
||||
|
||||
private:
|
||||
void GetPerformanceEvent(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -42,4 +42,6 @@ AudCtl::AudCtl() : ServiceFramework{"audctl"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudCtl::~AudCtl() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudCtl final : public ServiceFramework<AudCtl> {
|
||||
public:
|
||||
explicit AudCtl();
|
||||
~AudCtl() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -17,4 +17,6 @@ AudDbg::AudDbg(const char* name) : ServiceFramework{name} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudDbg::~AudDbg() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudDbg final : public ServiceFramework<AudDbg> {
|
||||
public:
|
||||
explicit AudDbg(const char* name);
|
||||
~AudDbg() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -19,4 +19,6 @@ AudInA::AudInA() : ServiceFramework{"audin:a"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudInA::~AudInA() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudInA final : public ServiceFramework<AudInA> {
|
||||
public:
|
||||
explicit AudInA();
|
||||
~AudInA() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -41,4 +41,6 @@ AudInU::AudInU() : ServiceFramework("audin:u") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudInU::~AudInU() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Service::Audio {
|
||||
class AudInU final : public ServiceFramework<AudInU> {
|
||||
public:
|
||||
explicit AudInU();
|
||||
~AudInU() = default;
|
||||
~AudInU() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/hle/service/audio/audren_u.h"
|
||||
#include "core/hle/service/audio/codecctl.h"
|
||||
#include "core/hle/service/audio/hwopus.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
namespace Service::SM {
|
||||
class ServiceManager;
|
||||
}
|
||||
|
||||
namespace Service::Audio {
|
||||
|
||||
|
||||
@@ -21,4 +21,6 @@ AudOutA::AudOutA() : ServiceFramework{"audout:a"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudOutA::~AudOutA() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudOutA final : public ServiceFramework<AudOutA> {
|
||||
public:
|
||||
explicit AudOutA();
|
||||
~AudOutA() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -3,15 +3,20 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "audio_core/audio_out.h"
|
||||
#include "audio_core/codec.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/service/audio/audout_u.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
|
||||
@@ -25,6 +30,18 @@ enum {
|
||||
constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}};
|
||||
constexpr int DefaultSampleRate{48000};
|
||||
|
||||
struct AudoutParams {
|
||||
s32_le sample_rate;
|
||||
u16_le channel_count;
|
||||
INSERT_PADDING_BYTES(2);
|
||||
};
|
||||
static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size");
|
||||
|
||||
enum class AudioState : u32 {
|
||||
Started,
|
||||
Stopped,
|
||||
};
|
||||
|
||||
class IAudioOut final : public ServiceFramework<IAudioOut> {
|
||||
public:
|
||||
IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core)
|
||||
@@ -218,4 +235,6 @@ AudOutU::AudOutU() : ServiceFramework("audout:u") {
|
||||
audio_core = std::make_unique<AudioCore::AudioOut>();
|
||||
}
|
||||
|
||||
AudOutU::~AudOutU() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -4,33 +4,24 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "audio_core/audio_out.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace AudioCore {
|
||||
class AudioOut;
|
||||
}
|
||||
|
||||
namespace Kernel {
|
||||
class HLERequestContext;
|
||||
}
|
||||
|
||||
namespace Service::Audio {
|
||||
|
||||
struct AudoutParams {
|
||||
s32_le sample_rate;
|
||||
u16_le channel_count;
|
||||
INSERT_PADDING_BYTES(2);
|
||||
};
|
||||
static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size");
|
||||
|
||||
enum class AudioState : u32 {
|
||||
Started,
|
||||
Stopped,
|
||||
};
|
||||
|
||||
class IAudioOut;
|
||||
|
||||
class AudOutU final : public ServiceFramework<AudOutU> {
|
||||
public:
|
||||
AudOutU();
|
||||
~AudOutU() = default;
|
||||
~AudOutU() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<IAudioOut> audio_out_interface;
|
||||
|
||||
@@ -17,4 +17,6 @@ AudRecA::AudRecA() : ServiceFramework{"audrec:a"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudRecA::~AudRecA() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudRecA final : public ServiceFramework<AudRecA> {
|
||||
public:
|
||||
explicit AudRecA();
|
||||
~AudRecA() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -36,4 +36,6 @@ AudRecU::AudRecU() : ServiceFramework("audrec:u") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudRecU::~AudRecU() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Service::Audio {
|
||||
class AudRecU final : public ServiceFramework<AudRecU> {
|
||||
public:
|
||||
explicit AudRecU();
|
||||
~AudRecU() = default;
|
||||
~AudRecU() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -23,4 +23,6 @@ AudRenA::AudRenA() : ServiceFramework{"audren:a"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudRenA::~AudRenA() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Audio {
|
||||
class AudRenA final : public ServiceFramework<AudRenA> {
|
||||
public:
|
||||
explicit AudRenA();
|
||||
~AudRenA() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "audio_core/audio_renderer.h"
|
||||
#include "common/alignment.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/core_timing_util.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
@@ -198,6 +200,8 @@ AudRenU::AudRenU() : ServiceFramework("audren:u") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
AudRenU::~AudRenU() = default;
|
||||
|
||||
void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
auto params = rp.PopRaw<AudioCore::AudioRendererParameter>();
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "audio_core/audio_renderer.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
@@ -16,7 +15,7 @@ namespace Service::Audio {
|
||||
class AudRenU final : public ServiceFramework<AudRenU> {
|
||||
public:
|
||||
explicit AudRenU();
|
||||
~AudRenU() = default;
|
||||
~AudRenU() override;
|
||||
|
||||
private:
|
||||
void OpenAudioRenderer(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -28,4 +28,6 @@ CodecCtl::CodecCtl() : ServiceFramework("codecctl") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
CodecCtl::~CodecCtl() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Service::Audio {
|
||||
class CodecCtl final : public ServiceFramework<CodecCtl> {
|
||||
public:
|
||||
explicit CodecCtl();
|
||||
~CodecCtl() = default;
|
||||
~CodecCtl() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <opus.h>
|
||||
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
@@ -151,4 +156,6 @@ HwOpus::HwOpus() : ServiceFramework("hwopus") {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
HwOpus::~HwOpus() = default;
|
||||
|
||||
} // namespace Service::Audio
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Service::Audio {
|
||||
class HwOpus final : public ServiceFramework<HwOpus> {
|
||||
public:
|
||||
explicit HwOpus();
|
||||
~HwOpus() = default;
|
||||
~HwOpus() override;
|
||||
|
||||
private:
|
||||
void OpenOpusDecoder(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -13,4 +13,6 @@ BCAT::BCAT(std::shared_ptr<Module> module, const char* name)
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
BCAT::~BCAT() = default;
|
||||
} // namespace Service::BCAT
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::BCAT {
|
||||
class BCAT final : public Module::Interface {
|
||||
public:
|
||||
explicit BCAT(std::shared_ptr<Module> module, const char* name);
|
||||
~BCAT() override;
|
||||
};
|
||||
|
||||
} // namespace Service::BCAT
|
||||
|
||||
@@ -42,6 +42,8 @@ void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) {
|
||||
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
||||
: ServiceFramework(name), module(std::move(module)) {}
|
||||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
auto module = std::make_shared<Module>();
|
||||
std::make_shared<BCAT>(module, "bcat:a")->InstallAsService(service_manager);
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
class Interface : public ServiceFramework<Interface> {
|
||||
public:
|
||||
explicit Interface(std::shared_ptr<Module> module, const char* name);
|
||||
~Interface() override;
|
||||
|
||||
void CreateBcatService(Kernel::HLERequestContext& ctx);
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace Service::Fatal {
|
||||
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
||||
: ServiceFramework(name), module(std::move(module)) {}
|
||||
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx);
|
||||
u32 error_code = rp.Pop<u32>();
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
class Interface : public ServiceFramework<Interface> {
|
||||
public:
|
||||
explicit Interface(std::shared_ptr<Module> module, const char* name);
|
||||
~Interface() override;
|
||||
|
||||
void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx);
|
||||
void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx);
|
||||
|
||||
@@ -9,4 +9,6 @@ namespace Service::Fatal {
|
||||
Fatal_P::Fatal_P(std::shared_ptr<Module> module)
|
||||
: Module::Interface(std::move(module), "fatal:p") {}
|
||||
|
||||
Fatal_P::~Fatal_P() = default;
|
||||
|
||||
} // namespace Service::Fatal
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Fatal {
|
||||
class Fatal_P final : public Module::Interface {
|
||||
public:
|
||||
explicit Fatal_P(std::shared_ptr<Module> module);
|
||||
~Fatal_P() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Fatal
|
||||
|
||||
@@ -15,4 +15,6 @@ Fatal_U::Fatal_U(std::shared_ptr<Module> module) : Module::Interface(std::move(m
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Fatal_U::~Fatal_U() = default;
|
||||
|
||||
} // namespace Service::Fatal
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Service::Fatal {
|
||||
class Fatal_U final : public Module::Interface {
|
||||
public:
|
||||
explicit Fatal_U(std::shared_ptr<Module> module);
|
||||
~Fatal_U() override;
|
||||
};
|
||||
|
||||
} // namespace Service::Fatal
|
||||
|
||||
@@ -40,6 +40,8 @@ static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
|
||||
VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_)
|
||||
: backing(std::move(backing_)) {}
|
||||
|
||||
VfsDirectoryServiceWrapper::~VfsDirectoryServiceWrapper() = default;
|
||||
|
||||
std::string VfsDirectoryServiceWrapper::GetName() const {
|
||||
return backing->GetName();
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager, const FileSys::Virtu
|
||||
class VfsDirectoryServiceWrapper {
|
||||
public:
|
||||
explicit VfsDirectoryServiceWrapper(FileSys::VirtualDir backing);
|
||||
~VfsDirectoryServiceWrapper();
|
||||
|
||||
/**
|
||||
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
|
||||
|
||||
@@ -19,4 +19,6 @@ FSP_LDR::FSP_LDR() : ServiceFramework{"fsp:ldr"} {
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
FSP_LDR::~FSP_LDR() = default;
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user