Compare commits

..

79 Commits

Author SHA1 Message Date
Frederic Laing
9f2bcdbb76 Update CMakeLists.txt
Set yuzu project as default StartUp Project in Visual Studio
2018-09-12 17:36:10 +02:00
bunnei
475222a496 Merge pull request #1296 from lioncash/prepo
service/prepo: Move class into the cpp file
2018-09-11 23:15:07 -04:00
bunnei
3ee4fa557f Merge pull request #1301 from lioncash/qt
game_list: Resolve variable shadowing within LoadCompatibilityList()
2018-09-11 23:13:54 -04:00
bunnei
c245150439 Merge pull request #1300 from lioncash/audio
service/audio: Replace includes with forward declarations where applicable
2018-09-11 23:13:29 -04:00
bunnei
89825766ee Merge pull request #1278 from tech4me/bg-color-fix
Port Citra #4047 & #4052: add change background color support
2018-09-11 23:13:11 -04:00
bunnei
522a11a11f Merge pull request #1295 from bunnei/accurate-copies
gl_rasterizer_cache: Improve accuracy of caching and copies.
2018-09-11 23:12:15 -04:00
bunnei
4a9acc87f9 Merge pull request #1294 from degasus/optimizations
gl_rasterizer: Use ARB_texture_storage.
2018-09-11 23:11:36 -04:00
bunnei
7bb226f22d gl_rasterizer_cache: Always blit on recreate, regardless of format.
- Fixes several rendering issues with Super Mario Odyssey.
2018-09-11 22:54:46 -04:00
Lioncash
0e61e8362f game_list: Resolve variable shadowing within LoadCompatibilityList()
"value" is already a used variable name within the outermost ranged-for
loop, so this variable was shadowing the outer one. This isn't a bug,
but it will get rid of a -Wshadow warning.
2018-09-11 22:34:09 -04:00
Lioncash
7fe10dea3e game_list: Use QJsonValueRef() within LoadCompatibilityList()
This way, we aren't constructing unnecessary QJsonValue instances.
2018-09-11 22:28:35 -04:00
Lioncash
c243bc09d4 service/audio: Replace includes with forward declarations where applicable
A few headers were including other headers when a forward declaration
can be used instead, allowing the include to be moved to the cpp file.
2018-09-11 21:54:33 -04:00
bunnei
429217248f Merge pull request #1289 from FernandoS27/lea_pset
shader_decompiler: Implemented LEA and PSET
2018-09-11 20:58:15 -04:00
Lioncash
325c259fc5 service/prepo: Move class into the cpp file
This doesn't need to be exposed within the header and be kept in the
translation unit, eliminating the need to include anything within the
header.
2018-09-11 20:49:01 -04:00
bunnei
cdddd71d08 gl_shader_cache: Remove cache_width/cache_height.
- This was once an optimization, but we no longer need it with the cache reserve.
- This is also inaccurate.
2018-09-11 20:12:29 -04:00
Markus Wick
3e973bc4c6 gl_rasterizer: Use ARB_texture_storage.
It allows us to use texture views and it reduces the overhead within the GPU driver.

But it disallows us to reallocate the texture, but we don't do so anyways.

In the end, it is the new way to allocate textures, so there is no need to use the old way.
2018-09-11 22:18:46 +02:00
FernandoS27
5c676dc884 Implemented LEA and PSET 2018-09-11 12:50:52 -04:00
FernandoS27
3f0922715a Implemented encodings for LEA and PSET 2018-09-11 12:50:25 -04:00
bunnei
1470b85af9 Merge pull request #1291 from lioncash/default
hle/service: Default constructors and destructors in the cpp file where applicable
2018-09-11 11:42:05 -04:00
bunnei
2f0ff4d25b Merge pull request #1292 from ogniK5377/renderdoc-fix
Fixed renderdoc input/output textures not working due to multiple render targets
2018-09-11 11:38:13 -04:00
bunnei
143525dcb9 Merge pull request #1293 from lioncash/font
externals: Place font data within cpp files
2018-09-11 11:37:32 -04:00
Lioncash
46ba1bc40f externals: Place font data within cpp files
This places the font data within cpp files, which mitigates the
possibility of the font data being duplicated within the binary if it's
referred to in more than one translation unit in the future. It also
stores the data within a std::array, which is more flexible when it
comes to operating with the standard library.

Furthermore, it makes the data arrays const. This is what we want, as it
allows the compiler to store the data within the read-only segment. As
it is, having several large sections of mutable data like this just
leaves spots in memory that we can accidentally write to (via accidental
overruns, what have you) and actually have it work. This ensures the
font data remains the same no matter what.
2018-09-11 04:25:33 -04:00
Lioncash
6ac955a0b4 hle/service: Default constructors and destructors in the cpp file where applicable
When a destructor isn't defaulted into a cpp file, it can cause the use
of forward declarations to seemingly fail to compile for non-obvious
reasons. It also allows inlining of the construction/destruction logic
all over the place where a constructor or destructor is invoked, which
can lead to code bloat. This isn't so much a worry here, given the
services won't be created and destroyed frequently.

The cause of the above mentioned non-obvious errors can be demonstrated
as follows:

------- Demonstrative example, if you know how the described error happens, skip forwards -------

Assume we have the following in the header, which we'll call "thing.h":

\#include <memory>

// Forward declaration. For example purposes, assume the definition
// of Object is in some header named "object.h"
class Object;

class Thing {
public:
    // assume no constructors or destructors are specified here,
    // or the constructors/destructors are defined as:
    //
    // Thing() = default;
    // ~Thing() = default;
    //

    // ... Some interface member functions would be defined here

private:
    std::shared_ptr<Object> obj;
};

If this header is included in a cpp file, (which we'll call "main.cpp"),
this will result in a compilation error, because even though no
destructor is specified, the destructor will still need to be generated by
the compiler because std::shared_ptr's destructor is *not* trivial (in
other words, it does something other than nothing), as std::shared_ptr's
destructor needs to do two things:

1. Decrement the shared reference count of the object being pointed to,
   and if the reference count decrements to zero,

2. Free the Object instance's memory (aka deallocate the memory it's
   pointing to).

And so the compiler generates the code for the destructor doing this inside main.cpp.

Now, keep in mind, the Object forward declaration is not a complete type. All it
does is tell the compiler "a type named Object exists" and allows us to
use the name in certain situations to avoid a header dependency. So the
compiler needs to generate destruction code for Object, but the compiler
doesn't know *how* to destruct it. A forward declaration doesn't tell
the compiler anything about Object's constructor or destructor. So, the
compiler will issue an error in this case because it's undefined
behavior to try and deallocate (or construct) an incomplete type and
std::shared_ptr and std::unique_ptr make sure this isn't the case
internally.

Now, if we had defaulted the destructor in "thing.cpp", where we also
include "object.h", this would never be an issue, as the destructor
would only have its code generated in one place, and it would be in a
place where the full class definition of Object would be visible to the
compiler.

---------------------- End example ----------------------------

Given these service classes are more than certainly going to change in
the future, this defaults the constructors and destructors into the
relevant cpp files to make the construction and destruction of all of
the services consistent and unlikely to run into cases where forward
declarations are indirectly causing compilation errors. It also has the
plus of avoiding the need to rebuild several services if destruction
logic changes, since it would only be necessary to recompile the single
cpp file.
2018-09-10 23:55:31 -04:00
David Marcec
4c3bd33be2 Fixed renderdoc input/output textures not working due to render targets 2018-09-11 13:31:20 +10:00
Tobias
3bac3051fc Use open-source shared fonts if no dumped file is available (#1269)
* Add open-source shared fonts

* Address review comments
2018-09-10 21:31:01 -04:00
Tobias
804115b2a4 Port #4141 from citra: Joystick hotplug support (#1275)
* Joystick hotplug support (#4141)

* use SDL_PollEvent instead of SDL_JoystickUpdate

Register hot plugged controller by GUID if they were configured in a previous session

* Move SDL_PollEvent into its own thread

* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call

* Fix that joystick_list gets cleared after SDL_Quit

* Add VirtualJoystick for InputDevices thats never nullptr

* fixup! Add VirtualJoystick for InputDevices thats never nullptr

* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr

* Remove SDL_GameController, make SDL_Joystick* unique_ptr

* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr

* Adressed feedback; fixed handling of same guid reconnects

* fixup! Adressed feedback; fixed handling of same guid reconnects

* merge the two joystick_lists into one

* make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! fixup! make SDLJoystick a member of VirtualJoystick

* SDLJoystick: Addressed review comments

* Address one missed review comment
2018-09-10 21:29:59 -04:00
bunnei
d6e8e16a66 Merge pull request #1286 from bunnei/multi-clear
gl_rasterizer: Implement clear for non-zero render targets.
2018-09-10 20:30:14 -04:00
bunnei
12445b476d Merge pull request #1285 from bunnei/depth-fix
gl_rasterizer_cache: Only use depth for applicable texture formats.
2018-09-10 20:28:40 -04:00
bunnei
d884e805c5 Merge pull request #1284 from bunnei/bgra8_srgb
gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
2018-09-10 20:28:00 -04:00
James Rowe
4bea6657ef Merge pull request #1288 from MysticExile/remove-multicore
Remove the multi-core option from the UI
2018-09-10 16:30:45 -06:00
bunnei
ae0c95efcc Merge pull request #1264 from degasus/optimizations
video_core: Optimize the command processor.
2018-09-10 18:02:47 -04:00
Markus Wick
c1b8cd9058 video_core: Refactor command_processor.
Inline the WriteReg helper as it is called ~20k times per frame.
2018-09-10 22:06:16 +02:00
Markus Wick
0cfb0bacb2 video_core: Move command buffer loop.
This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
2018-09-10 22:06:13 +02:00
MysticExile
d2f788762a Remove multicore configure_general.ui 2018-09-10 22:04:21 +02:00
MysticExile
17f8059fea remove multicore in configure_general.cpp 2018-09-10 22:03:23 +02:00
Markus Wick
c560043581 rasterizer: Drop unused handler.
This virtual function is called in a very hot spot, and it does nothing.

If this kind of feature is required, please be more specific and add callbacks
in the switch statement within Maxwell3D::WriteReg. There is no point in having
another switch statement within the rasterizer.
2018-09-10 22:03:10 +02:00
bunnei
4c0b1cc1ae gl_rasterizer_cache: Only use depth for applicable texture formats.
- Fixes an issue with Octopath Traveler leaving stale data here.
2018-09-10 00:50:38 -04:00
bunnei
035e6bd407 gl_rasterizer: Implement clear for non-zero render targets.
- Several misc. changes to ConfigureFramebuffers in support of this.
2018-09-10 00:41:20 -04:00
bunnei
1c34498368 gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
- Used by Octopath Traveler (with multiple render targets).
2018-09-10 00:37:52 -04:00
bunnei
ac959799e4 Merge pull request #1281 from bunnei/multi-rt
gl_rasterizer: Implement multiple color attachments.
2018-09-10 00:36:30 -04:00
bunnei
49b15af054 gl_rasterizer: Implement multiple color attachments. 2018-09-09 22:48:28 -04:00
bunnei
f9e468d891 Merge pull request #1258 from tgsm/fix-sdl-logging
yuzu-cmd: fix SDL logging
2018-09-09 22:34:23 -04:00
bunnei
7ddd5b765d Merge pull request #1282 from lioncash/compat
yuzu: Move compatibility list specifics to their own source files
2018-09-09 22:32:53 -04:00
bunnei
50c191439d Merge pull request #1276 from FearlessTobi/fix-stupid-stub
hid: Implement ReloadInputDevices
2018-09-09 22:31:04 -04:00
bunnei
3b8a0bc146 Merge pull request #1283 from lioncash/unused
service: Remove unused g_kernel_named_ports variable
2018-09-09 22:30:39 -04:00
Lioncash
136040ee15 service: Remove unused g_kernel_named_ports variable
With the named port functionality all migrated over to the kernel,
there's no need to keep this around anymore.
2018-09-09 22:10:54 -04:00
bunnei
e58855c7a4 Merge pull request #1268 from FernandoS27/tmml
shader_decompiler: Implemented TMML
2018-09-09 21:39:39 -04:00
FernandoS27
00131e752d Implemented TMML 2018-09-09 20:46:31 -04:00
bunnei
223ddb2008 Merge pull request #1272 from Subv/dma_2d
GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
2018-09-09 19:53:17 -04:00
bunnei
fcf81147e7 Merge pull request #1280 from zero334/improvements
video_core: fixed arithmetic overflow warnings & improved code style
2018-09-09 19:51:46 -04:00
Lioncash
73a2d71f44 game_list: Make CompatibilityList parameter of NavigateToGamedbEntryRequested() a const reference
The compatibility list isn't modified within any of the slots connected
to this signal, so we can make it const to enforce immutability.
2018-09-09 19:46:07 -04:00
Lioncash
bd8065295c yuzu: Move compatibility list specifics to their own source files
Lets us keep the generic portions of the compatibility list code
together, and allows us to introduce a type alias that makes it so we
don't need to type out a very long type declaration anymore, making the
immediate readability of some code better.
2018-09-09 19:45:25 -04:00
bunnei
0acf9b351f Merge pull request #1261 from FernandoS27/txq
shader_decompiler: Implemented (Partialy) TXQ
2018-09-09 19:43:10 -04:00
FernandoS27
073a21ac0b Implemented TXQ dimension query type, used by SMO. 2018-09-09 11:59:01 -04:00
Patrick Elsässer
64e45b04e0 video_core: fixed arithmetic overflow warnings & improved code style
- Fixed all warnings, for renderer_opengl items, which were indicating a
possible incorrect behavior from integral promotion rules and types
larger than those in which arithmetic is typically performed.
- Added const for variables where possible and meaningful.
- Added constexpr where possible.
2018-09-09 17:51:43 +02:00
tech4me
3dcedb36b4 Port Citra #4047 & #4052: add change background color support 2018-09-08 17:00:21 -07:00
Mat M
6d64ecf359 Merge pull request #1277 from jroweboy/update-xbyak
Externals: Update xbyak
2018-09-08 19:33:35 -04:00
fearlessTobi
500e81429a hid: Implement ReloadInputDevices 2018-09-09 00:57:41 +02:00
James Rowe
5ff72a48a7 Externals: Update xbyak 2018-09-08 16:53:52 -06:00
FernandoS27
82a313a14c Change name of TEXQ to TXQ, in order to match NVIDIA's naming 2018-09-08 18:08:57 -04:00
Subv
fdb199290b GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
When not set, this tells the GPU to only use the X size when performing a DMA copy.
This is only implemented for linear->linear and tiled->tiled copies. Conversion copies still retain the assert.

This bit is unset by some games for various purposes, and by nouveau when copying the vertex buffers.
2018-09-08 16:02:16 -05:00
bunnei
af074ee422 Merge pull request #1256 from bunnei/tex-target-support
Initial support for non-2D textures
2018-09-08 16:14:46 -04:00
bunnei
deff28d3c0 Merge pull request #1265 from zhaowenlan1779/patch-1
yuzu: fix title bar display
2018-09-08 16:03:25 -04:00
bunnei
3d9776f36a Merge pull request #1267 from MerryMage/audio_out
audio_renderer: Rename AudioOut instance to audio_out
2018-09-08 16:02:58 -04:00
MerryMage
a76f0d5d06 audio_renderer: Rename AudioOut instance to audio_out 2018-09-08 16:50:12 +01:00
Pengfei Zhu
4048b54ef7 yuzu: fix title bar display
Previously the version number got hidden after starting a game.
2018-09-08 19:10:50 +08:00
bunnei
9cd79c25ed Merge pull request #1246 from degasus/instanced_rendering
gl_rasterizer: Use baseInstance instead of moving the buffer points.
2018-09-08 04:49:24 -04:00
bunnei
2515d2433b Merge pull request #1259 from lioncash/relocate
yuzu: Move GameListWorker to its own source files
2018-09-08 04:10:11 -04:00
tgsm
975226e7ff yuzu-cmd: fix SDL logging 2018-09-08 03:12:47 -04:00
bunnei
23ae7cf9db gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures. 2018-09-08 02:53:39 -04:00
bunnei
fdd5c97a14 maxwell_3d: Remove assert that no longer applies. 2018-09-08 02:53:39 -04:00
bunnei
f165a85398 gl_rasterizer_cache: Partially implement several non-2D texture types. 2018-09-08 02:53:38 -04:00
bunnei
0731383124 gl_shader_decompiler: Partially implement several non-2D texture types (Subv). 2018-09-08 02:53:38 -04:00
bunnei
05f6f59ffb gl_rasterizer: Implement texture wrap mode p. 2018-09-08 02:53:38 -04:00
bunnei
ce8291f6c5 gl_rasterizer_cache: Track texture depth. 2018-09-08 02:53:38 -04:00
bunnei
9dccf7e1fa gl_rasterizer_cache: Remove impl. of FlushGLBuffer.
- Will not work for non-2d textures, and was not used anyways.
2018-09-08 02:53:37 -04:00
bunnei
030676b95d gl_rasterizer_cache: Keep track of texture type per surface. 2018-09-08 02:53:37 -04:00
bunnei
a439f7b6e1 gl_rasterizer_cache: Remove unused DownloadGLTexture. 2018-09-08 02:53:37 -04:00
bunnei
b56e5edafc gl_state: Keep track of texture target. 2018-09-08 02:53:37 -04:00
Lioncash
564b7fdc9c yuzu: Move GameListWorker to its own source files
This has gotten sufficiently large enough to warrant moving it to its
own source files. Especially given it dumps the file_sys headers around
code that doesn't use it for the most part.

This'll also make it easier to introduce a type alias for the
compatibility list, so a large unordered_map type declaration doesn't
need to be specified all the time (we don't want to propagate the
game_list_p.h include via the main game_list.h header).
2018-09-07 16:25:28 -04:00
223 changed files with 113977 additions and 1158 deletions

View File

@@ -431,6 +431,9 @@ enable_testing()
add_subdirectory(externals)
add_subdirectory(src)
# Set yuzu project as default StartUp Project in Visual Studio
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu)
# Installation instructions
# =========================

View File

@@ -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)

View 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)

View 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

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 217276> FontChineseSimplified;

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 222236> FontChineseTraditional;

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 293516> FontExtendedChineseSimplified;

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 217276> FontKorean;

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 172064> FontNintendoExtended;

View File

@@ -0,0 +1,6 @@
#pragma once
#include <array>
extern const std::array<unsigned char, 217276> FontStandard;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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);
}

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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

View File

@@ -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.

View File

@@ -222,4 +222,6 @@ AppletAE::AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
RegisterHandlers(functions);
}
AppletAE::~AppletAE() = default;
} // namespace Service::AM

View File

@@ -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);

View File

@@ -103,4 +103,6 @@ AppletOE::AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
RegisterHandlers(functions);
}
AppletOE::~AppletOE() = default;
} // namespace Service::AM

View File

@@ -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);

View File

@@ -21,4 +21,6 @@ IdleSys::IdleSys() : ServiceFramework{"idle:sys"} {
RegisterHandlers(functions);
}
IdleSys::~IdleSys() = default;
} // namespace Service::AM

View File

@@ -11,6 +11,7 @@ namespace Service::AM {
class IdleSys final : public ServiceFramework<IdleSys> {
public:
explicit IdleSys();
~IdleSys() override;
};
} // namespace Service::AM

View File

@@ -39,4 +39,6 @@ OMM::OMM() : ServiceFramework{"omm"} {
RegisterHandlers(functions);
}
OMM::~OMM() = default;
} // namespace Service::AM

View File

@@ -11,6 +11,7 @@ namespace Service::AM {
class OMM final : public ServiceFramework<OMM> {
public:
explicit OMM();
~OMM() override;
};
} // namespace Service::AM

View File

@@ -27,4 +27,6 @@ SPSM::SPSM() : ServiceFramework{"spsm"} {
RegisterHandlers(functions);
}
SPSM::~SPSM() = default;
} // namespace Service::AM

View File

@@ -11,6 +11,7 @@ namespace Service::AM {
class SPSM final : public ServiceFramework<SPSM> {
public:
explicit SPSM();
~SPSM() override;
};
} // namespace Service::AM

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -42,4 +42,6 @@ AudCtl::AudCtl() : ServiceFramework{"audctl"} {
RegisterHandlers(functions);
}
AudCtl::~AudCtl() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudCtl final : public ServiceFramework<AudCtl> {
public:
explicit AudCtl();
~AudCtl() override;
};
} // namespace Service::Audio

View File

@@ -17,4 +17,6 @@ AudDbg::AudDbg(const char* name) : ServiceFramework{name} {
RegisterHandlers(functions);
}
AudDbg::~AudDbg() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudDbg final : public ServiceFramework<AudDbg> {
public:
explicit AudDbg(const char* name);
~AudDbg() override;
};
} // namespace Service::Audio

View File

@@ -19,4 +19,6 @@ AudInA::AudInA() : ServiceFramework{"audin:a"} {
RegisterHandlers(functions);
}
AudInA::~AudInA() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudInA final : public ServiceFramework<AudInA> {
public:
explicit AudInA();
~AudInA() override;
};
} // namespace Service::Audio

View File

@@ -41,4 +41,6 @@ AudInU::AudInU() : ServiceFramework("audin:u") {
RegisterHandlers(functions);
}
AudInU::~AudInU() = default;
} // namespace Service::Audio

View File

@@ -15,7 +15,7 @@ namespace Service::Audio {
class AudInU final : public ServiceFramework<AudInU> {
public:
explicit AudInU();
~AudInU() = default;
~AudInU() override;
};
} // namespace Service::Audio

View File

@@ -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 {

View File

@@ -4,7 +4,9 @@
#pragma once
#include "core/hle/service/service.h"
namespace Service::SM {
class ServiceManager;
}
namespace Service::Audio {

View File

@@ -21,4 +21,6 @@ AudOutA::AudOutA() : ServiceFramework{"audout:a"} {
RegisterHandlers(functions);
}
AudOutA::~AudOutA() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudOutA final : public ServiceFramework<AudOutA> {
public:
explicit AudOutA();
~AudOutA() override;
};
} // namespace Service::Audio

View File

@@ -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

View File

@@ -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;

View File

@@ -17,4 +17,6 @@ AudRecA::AudRecA() : ServiceFramework{"audrec:a"} {
RegisterHandlers(functions);
}
AudRecA::~AudRecA() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudRecA final : public ServiceFramework<AudRecA> {
public:
explicit AudRecA();
~AudRecA() override;
};
} // namespace Service::Audio

View File

@@ -36,4 +36,6 @@ AudRecU::AudRecU() : ServiceFramework("audrec:u") {
RegisterHandlers(functions);
}
AudRecU::~AudRecU() = default;
} // namespace Service::Audio

View File

@@ -15,7 +15,7 @@ namespace Service::Audio {
class AudRecU final : public ServiceFramework<AudRecU> {
public:
explicit AudRecU();
~AudRecU() = default;
~AudRecU() override;
};
} // namespace Service::Audio

View File

@@ -23,4 +23,6 @@ AudRenA::AudRenA() : ServiceFramework{"audren:a"} {
RegisterHandlers(functions);
}
AudRenA::~AudRenA() = default;
} // namespace Service::Audio

View File

@@ -11,6 +11,7 @@ namespace Service::Audio {
class AudRenA final : public ServiceFramework<AudRenA> {
public:
explicit AudRenA();
~AudRenA() override;
};
} // namespace Service::Audio

View File

@@ -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>();

View File

@@ -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);

View File

@@ -28,4 +28,6 @@ CodecCtl::CodecCtl() : ServiceFramework("codecctl") {
RegisterHandlers(functions);
}
CodecCtl::~CodecCtl() = default;
} // namespace Service::Audio

View File

@@ -15,7 +15,7 @@ namespace Service::Audio {
class CodecCtl final : public ServiceFramework<CodecCtl> {
public:
explicit CodecCtl();
~CodecCtl() = default;
~CodecCtl() override;
};
} // namespace Service::Audio

View File

@@ -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

View File

@@ -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);

View File

@@ -13,4 +13,6 @@ BCAT::BCAT(std::shared_ptr<Module> module, const char* name)
};
RegisterHandlers(functions);
}
BCAT::~BCAT() = default;
} // namespace Service::BCAT

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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>();

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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();
}

View File

@@ -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.)

View File

@@ -19,4 +19,6 @@ FSP_LDR::FSP_LDR() : ServiceFramework{"fsp:ldr"} {
RegisterHandlers(functions);
}
FSP_LDR::~FSP_LDR() = default;
} // namespace Service::FileSystem

View File

@@ -11,6 +11,7 @@ namespace Service::FileSystem {
class FSP_LDR final : public ServiceFramework<FSP_LDR> {
public:
explicit FSP_LDR();
~FSP_LDR() override;
};
} // namespace Service::FileSystem

View File

@@ -20,4 +20,6 @@ FSP_PR::FSP_PR() : ServiceFramework{"fsp:pr"} {
RegisterHandlers(functions);
}
FSP_PR::~FSP_PR() = default;
} // namespace Service::FileSystem

View File

@@ -11,6 +11,7 @@ namespace Service::FileSystem {
class FSP_PR final : public ServiceFramework<FSP_PR> {
public:
explicit FSP_PR();
~FSP_PR() override;
};
} // namespace Service::FileSystem

View File

@@ -520,6 +520,8 @@ FSP_SRV::FSP_SRV() : ServiceFramework("fsp-srv") {
RegisterHandlers(functions);
}
FSP_SRV::~FSP_SRV() = default;
void FSP_SRV::Initialize(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_FS, "(STUBBED) called");

View File

@@ -16,7 +16,7 @@ namespace Service::FileSystem {
class FSP_SRV final : public ServiceFramework<FSP_SRV> {
public:
explicit FSP_SRV();
~FSP_SRV() = default;
~FSP_SRV() override;
private:
void Initialize(Kernel::HLERequestContext& ctx);

View File

@@ -118,6 +118,8 @@ void Module::Interface::CreateFriendService(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<Friend>(module, "friend:a")->InstallAsService(service_manager);

View File

@@ -13,6 +13,7 @@ public:
class Interface : public ServiceFramework<Interface> {
public:
explicit Interface(std::shared_ptr<Module> module, const char* name);
~Interface() override;
void CreateFriendService(Kernel::HLERequestContext& ctx);

View File

@@ -16,4 +16,6 @@ Friend::Friend(std::shared_ptr<Module> module, const char* name)
RegisterHandlers(functions);
}
Friend::~Friend() = default;
} // namespace Service::Friend

View File

@@ -11,6 +11,7 @@ namespace Service::Friend {
class Friend final : public Module::Interface {
public:
explicit Friend(std::shared_ptr<Module> module, const char* name);
~Friend() override;
};
} // namespace Service::Friend

View File

@@ -2,7 +2,6 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <atomic>
#include "common/logging/log.h"
#include "core/core.h"
#include "core/core_timing.h"
@@ -78,7 +77,7 @@ private:
SharedMemory mem{};
std::memcpy(&mem, shared_mem->GetPointer(), sizeof(SharedMemory));
if (is_device_reload_pending.exchange(false))
if (Settings::values.is_device_reload_pending.exchange(false))
LoadInputDevices();
// Set up controllers as neon red+blue Joy-Con attached to console
@@ -267,7 +266,6 @@ private:
CoreTiming::EventType* pad_update_event;
// Stored input state info
std::atomic<bool> is_device_reload_pending{true};
std::array<std::unique_ptr<Input::ButtonDevice>, Settings::NativeButton::NUM_BUTTONS_HID>
buttons;
std::array<std::unique_ptr<Input::AnalogDevice>, Settings::NativeAnalog::NUM_STICKS_HID> sticks;
@@ -797,7 +795,9 @@ public:
}
};
void ReloadInputDevices() {}
void ReloadInputDevices() {
Settings::values.is_device_reload_pending.store(true);
}
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<Hid>()->InstallAsService(service_manager);

View File

@@ -33,6 +33,8 @@ IRS::IRS() : ServiceFramework{"irs"} {
RegisterHandlers(functions);
}
IRS::~IRS() = default;
IRS_SYS::IRS_SYS() : ServiceFramework{"irs:sys"} {
// clang-format off
static const FunctionInfo functions[] = {
@@ -46,4 +48,6 @@ IRS_SYS::IRS_SYS() : ServiceFramework{"irs:sys"} {
RegisterHandlers(functions);
}
IRS_SYS::~IRS_SYS() = default;
} // namespace Service::HID

View File

@@ -11,11 +11,13 @@ namespace Service::HID {
class IRS final : public ServiceFramework<IRS> {
public:
explicit IRS();
~IRS() override;
};
class IRS_SYS final : public ServiceFramework<IRS_SYS> {
public:
explicit IRS_SYS();
~IRS_SYS() override;
};
} // namespace Service::HID

View File

@@ -34,4 +34,6 @@ XCD_SYS::XCD_SYS() : ServiceFramework{"xcd:sys"} {
RegisterHandlers(functions);
}
XCD_SYS::~XCD_SYS() = default;
} // namespace Service::HID

Some files were not shown because too many files have changed in this diff Show More