early-access version 3436
This commit is contained in:
parent
d9ba88c778
commit
ad5e9aec42
201 changed files with 6694 additions and 2004 deletions
|
@ -477,8 +477,8 @@ if (APPLE)
|
||||||
find_library(COCOA_LIBRARY Cocoa)
|
find_library(COCOA_LIBRARY Cocoa)
|
||||||
set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
# WSAPoll and SHGetKnownFolderPath (AppData/Roaming) didn't exist before WinNT 6.x (Vista)
|
# Target Windows 10
|
||||||
add_definitions(-D_WIN32_WINNT=0x0600 -DWINVER=0x0600)
|
add_definitions(-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||||
set(PLATFORM_LIBRARIES winmm ws2_32 iphlpapi)
|
set(PLATFORM_LIBRARIES winmm ws2_32 iphlpapi)
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
# PSAPI is the Process Status API
|
# PSAPI is the Process Status API
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3434.
|
This is the source code for early-access 3436.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
6
dist/yuzu.manifest
vendored
6
dist/yuzu.manifest
vendored
|
@ -36,12 +36,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
<application>
|
<application>
|
||||||
<!-- Windows 10 -->
|
<!-- Windows 10 -->
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
<!-- Windows 8.1 -->
|
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
|
||||||
<!-- Windows 8 -->
|
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
|
||||||
<!-- Windows 7 -->
|
|
||||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
|
||||||
</application>
|
</application>
|
||||||
</compatibility>
|
</compatibility>
|
||||||
<trustInfo
|
<trustInfo
|
||||||
|
|
|
@ -113,6 +113,8 @@ add_library(common STATIC
|
||||||
socket_types.h
|
socket_types.h
|
||||||
spin_lock.cpp
|
spin_lock.cpp
|
||||||
spin_lock.h
|
spin_lock.h
|
||||||
|
steady_clock.cpp
|
||||||
|
steady_clock.h
|
||||||
stream.cpp
|
stream.cpp
|
||||||
stream.h
|
stream.h
|
||||||
string_util.cpp
|
string_util.cpp
|
||||||
|
@ -142,6 +144,14 @@ add_library(common STATIC
|
||||||
zstd_compression.h
|
zstd_compression.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_sources(common PRIVATE
|
||||||
|
windows/timer_resolution.cpp
|
||||||
|
windows/timer_resolution.h
|
||||||
|
)
|
||||||
|
target_link_libraries(common PRIVATE ntdll)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ARCHITECTURE_x86_64)
|
if(ARCHITECTURE_x86_64)
|
||||||
target_sources(common
|
target_sources(common
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|
|
@ -119,7 +119,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||||
SUB(Service, NPNS) \
|
SUB(Service, NPNS) \
|
||||||
SUB(Service, NS) \
|
SUB(Service, NS) \
|
||||||
SUB(Service, NVDRV) \
|
SUB(Service, NVDRV) \
|
||||||
SUB(Service, NVFlinger) \
|
SUB(Service, Nvnflinger) \
|
||||||
SUB(Service, OLSC) \
|
SUB(Service, OLSC) \
|
||||||
SUB(Service, PCIE) \
|
SUB(Service, PCIE) \
|
||||||
SUB(Service, PCTL) \
|
SUB(Service, PCTL) \
|
||||||
|
|
|
@ -29,107 +29,107 @@ enum class Level : u8 {
|
||||||
* filter.cpp.
|
* filter.cpp.
|
||||||
*/
|
*/
|
||||||
enum class Class : u8 {
|
enum class Class : u8 {
|
||||||
Log, ///< Messages about the log system itself
|
Log, ///< Messages about the log system itself
|
||||||
Common, ///< Library routines
|
Common, ///< Library routines
|
||||||
Common_Filesystem, ///< Filesystem interface library
|
Common_Filesystem, ///< Filesystem interface library
|
||||||
Common_Memory, ///< Memory mapping and management functions
|
Common_Memory, ///< Memory mapping and management functions
|
||||||
Core, ///< LLE emulation core
|
Core, ///< LLE emulation core
|
||||||
Core_ARM, ///< ARM CPU core
|
Core_ARM, ///< ARM CPU core
|
||||||
Core_Timing, ///< CoreTiming functions
|
Core_Timing, ///< CoreTiming functions
|
||||||
Config, ///< Emulator configuration (including commandline)
|
Config, ///< Emulator configuration (including commandline)
|
||||||
Debug, ///< Debugging tools
|
Debug, ///< Debugging tools
|
||||||
Debug_Emulated, ///< Debug messages from the emulated programs
|
Debug_Emulated, ///< Debug messages from the emulated programs
|
||||||
Debug_GPU, ///< GPU debugging tools
|
Debug_GPU, ///< GPU debugging tools
|
||||||
Debug_Breakpoint, ///< Logging breakpoints and watchpoints
|
Debug_Breakpoint, ///< Logging breakpoints and watchpoints
|
||||||
Debug_GDBStub, ///< GDB Stub
|
Debug_GDBStub, ///< GDB Stub
|
||||||
Kernel, ///< The HLE implementation of the CTR kernel
|
Kernel, ///< The HLE implementation of the CTR kernel
|
||||||
Kernel_SVC, ///< Kernel system calls
|
Kernel_SVC, ///< Kernel system calls
|
||||||
Service, ///< HLE implementation of system services. Each major service
|
Service, ///< HLE implementation of system services. Each major service
|
||||||
///< should have its own subclass.
|
///< should have its own subclass.
|
||||||
Service_ACC, ///< The ACC (Accounts) service
|
Service_ACC, ///< The ACC (Accounts) service
|
||||||
Service_AM, ///< The AM (Applet manager) service
|
Service_AM, ///< The AM (Applet manager) service
|
||||||
Service_AOC, ///< The AOC (AddOn Content) service
|
Service_AOC, ///< The AOC (AddOn Content) service
|
||||||
Service_APM, ///< The APM (Performance) service
|
Service_APM, ///< The APM (Performance) service
|
||||||
Service_ARP, ///< The ARP service
|
Service_ARP, ///< The ARP service
|
||||||
Service_Audio, ///< The Audio (Audio control) service
|
Service_Audio, ///< The Audio (Audio control) service
|
||||||
Service_BCAT, ///< The BCAT service
|
Service_BCAT, ///< The BCAT service
|
||||||
Service_BGTC, ///< The BGTC (Background Task Controller) service
|
Service_BGTC, ///< The BGTC (Background Task Controller) service
|
||||||
Service_BPC, ///< The BPC service
|
Service_BPC, ///< The BPC service
|
||||||
Service_BTDRV, ///< The Bluetooth driver service
|
Service_BTDRV, ///< The Bluetooth driver service
|
||||||
Service_BTM, ///< The BTM service
|
Service_BTM, ///< The BTM service
|
||||||
Service_Capture, ///< The capture service
|
Service_Capture, ///< The capture service
|
||||||
Service_ERPT, ///< The error reporting service
|
Service_ERPT, ///< The error reporting service
|
||||||
Service_ETicket, ///< The ETicket service
|
Service_ETicket, ///< The ETicket service
|
||||||
Service_EUPLD, ///< The error upload service
|
Service_EUPLD, ///< The error upload service
|
||||||
Service_Fatal, ///< The Fatal service
|
Service_Fatal, ///< The Fatal service
|
||||||
Service_FGM, ///< The FGM service
|
Service_FGM, ///< The FGM service
|
||||||
Service_Friend, ///< The friend service
|
Service_Friend, ///< The friend service
|
||||||
Service_FS, ///< The FS (Filesystem) service
|
Service_FS, ///< The FS (Filesystem) service
|
||||||
Service_GRC, ///< The game recording service
|
Service_GRC, ///< The game recording service
|
||||||
Service_HID, ///< The HID (Human interface device) service
|
Service_HID, ///< The HID (Human interface device) service
|
||||||
Service_IRS, ///< The IRS service
|
Service_IRS, ///< The IRS service
|
||||||
Service_JIT, ///< The JIT service
|
Service_JIT, ///< The JIT service
|
||||||
Service_LBL, ///< The LBL (LCD backlight) service
|
Service_LBL, ///< The LBL (LCD backlight) service
|
||||||
Service_LDN, ///< The LDN (Local domain network) service
|
Service_LDN, ///< The LDN (Local domain network) service
|
||||||
Service_LDR, ///< The loader service
|
Service_LDR, ///< The loader service
|
||||||
Service_LM, ///< The LM (Logger) service
|
Service_LM, ///< The LM (Logger) service
|
||||||
Service_Migration, ///< The migration service
|
Service_Migration, ///< The migration service
|
||||||
Service_Mii, ///< The Mii service
|
Service_Mii, ///< The Mii service
|
||||||
Service_MM, ///< The MM (Multimedia) service
|
Service_MM, ///< The MM (Multimedia) service
|
||||||
Service_MNPP, ///< The MNPP service
|
Service_MNPP, ///< The MNPP service
|
||||||
Service_NCM, ///< The NCM service
|
Service_NCM, ///< The NCM service
|
||||||
Service_NFC, ///< The NFC (Near-field communication) service
|
Service_NFC, ///< The NFC (Near-field communication) service
|
||||||
Service_NFP, ///< The NFP service
|
Service_NFP, ///< The NFP service
|
||||||
Service_NGCT, ///< The NGCT (No Good Content for Terra) service
|
Service_NGCT, ///< The NGCT (No Good Content for Terra) service
|
||||||
Service_NIFM, ///< The NIFM (Network interface) service
|
Service_NIFM, ///< The NIFM (Network interface) service
|
||||||
Service_NIM, ///< The NIM service
|
Service_NIM, ///< The NIM service
|
||||||
Service_NOTIF, ///< The NOTIF (Notification) service
|
Service_NOTIF, ///< The NOTIF (Notification) service
|
||||||
Service_NPNS, ///< The NPNS service
|
Service_NPNS, ///< The NPNS service
|
||||||
Service_NS, ///< The NS services
|
Service_NS, ///< The NS services
|
||||||
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
Service_NVDRV, ///< The NVDRV (Nvidia driver) service
|
||||||
Service_NVFlinger, ///< The NVFlinger service
|
Service_Nvnflinger, ///< The Nvnflinger service
|
||||||
Service_OLSC, ///< The OLSC service
|
Service_OLSC, ///< The OLSC service
|
||||||
Service_PCIE, ///< The PCIe service
|
Service_PCIE, ///< The PCIe service
|
||||||
Service_PCTL, ///< The PCTL (Parental control) service
|
Service_PCTL, ///< The PCTL (Parental control) service
|
||||||
Service_PCV, ///< The PCV service
|
Service_PCV, ///< The PCV service
|
||||||
Service_PM, ///< The PM service
|
Service_PM, ///< The PM service
|
||||||
Service_PREPO, ///< The PREPO (Play report) service
|
Service_PREPO, ///< The PREPO (Play report) service
|
||||||
Service_PSC, ///< The PSC service
|
Service_PSC, ///< The PSC service
|
||||||
Service_PTM, ///< The PTM service
|
Service_PTM, ///< The PTM service
|
||||||
Service_SET, ///< The SET (Settings) service
|
Service_SET, ///< The SET (Settings) service
|
||||||
Service_SM, ///< The SM (Service manager) service
|
Service_SM, ///< The SM (Service manager) service
|
||||||
Service_SPL, ///< The SPL service
|
Service_SPL, ///< The SPL service
|
||||||
Service_SSL, ///< The SSL service
|
Service_SSL, ///< The SSL service
|
||||||
Service_TCAP, ///< The TCAP service.
|
Service_TCAP, ///< The TCAP service.
|
||||||
Service_Time, ///< The time service
|
Service_Time, ///< The time service
|
||||||
Service_USB, ///< The USB (Universal Serial Bus) service
|
Service_USB, ///< The USB (Universal Serial Bus) service
|
||||||
Service_VI, ///< The VI (Video interface) service
|
Service_VI, ///< The VI (Video interface) service
|
||||||
Service_WLAN, ///< The WLAN (Wireless local area network) service
|
Service_WLAN, ///< The WLAN (Wireless local area network) service
|
||||||
HW, ///< Low-level hardware emulation
|
HW, ///< Low-level hardware emulation
|
||||||
HW_Memory, ///< Memory-map and address translation
|
HW_Memory, ///< Memory-map and address translation
|
||||||
HW_LCD, ///< LCD register emulation
|
HW_LCD, ///< LCD register emulation
|
||||||
HW_GPU, ///< GPU control emulation
|
HW_GPU, ///< GPU control emulation
|
||||||
HW_AES, ///< AES engine emulation
|
HW_AES, ///< AES engine emulation
|
||||||
IPC, ///< IPC interface
|
IPC, ///< IPC interface
|
||||||
Frontend, ///< Emulator UI
|
Frontend, ///< Emulator UI
|
||||||
Render, ///< Emulator video output and hardware acceleration
|
Render, ///< Emulator video output and hardware acceleration
|
||||||
Render_Software, ///< Software renderer backend
|
Render_Software, ///< Software renderer backend
|
||||||
Render_OpenGL, ///< OpenGL backend
|
Render_OpenGL, ///< OpenGL backend
|
||||||
Render_Vulkan, ///< Vulkan backend
|
Render_Vulkan, ///< Vulkan backend
|
||||||
Shader, ///< Shader recompiler
|
Shader, ///< Shader recompiler
|
||||||
Shader_SPIRV, ///< Shader SPIR-V code generation
|
Shader_SPIRV, ///< Shader SPIR-V code generation
|
||||||
Shader_GLASM, ///< Shader GLASM code generation
|
Shader_GLASM, ///< Shader GLASM code generation
|
||||||
Shader_GLSL, ///< Shader GLSL code generation
|
Shader_GLSL, ///< Shader GLSL code generation
|
||||||
Audio, ///< Audio emulation
|
Audio, ///< Audio emulation
|
||||||
Audio_DSP, ///< The HLE implementation of the DSP
|
Audio_DSP, ///< The HLE implementation of the DSP
|
||||||
Audio_Sink, ///< Emulator audio output backend
|
Audio_Sink, ///< Emulator audio output backend
|
||||||
Loader, ///< ROM loader
|
Loader, ///< ROM loader
|
||||||
CheatEngine, ///< Memory manipulation and engine VM functions
|
CheatEngine, ///< Memory manipulation and engine VM functions
|
||||||
Crypto, ///< Cryptographic engine/functions
|
Crypto, ///< Cryptographic engine/functions
|
||||||
Input, ///< Input emulation
|
Input, ///< Input emulation
|
||||||
Network, ///< Network emulation
|
Network, ///< Network emulation
|
||||||
WebService, ///< Interface to yuzu Web Services
|
WebService, ///< Interface to yuzu Web Services
|
||||||
Count ///< Total number of logging classes
|
Count ///< Total number of logging classes
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Common::Log
|
} // namespace Common::Log
|
||||||
|
|
56
src/common/steady_clock.cpp
Executable file
56
src/common/steady_clock.cpp
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "common/steady_clock.h"
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
static s64 WindowsQueryPerformanceFrequency() {
|
||||||
|
LARGE_INTEGER frequency;
|
||||||
|
QueryPerformanceFrequency(&frequency);
|
||||||
|
return frequency.QuadPart;
|
||||||
|
}
|
||||||
|
|
||||||
|
static s64 WindowsQueryPerformanceCounter() {
|
||||||
|
LARGE_INTEGER counter;
|
||||||
|
QueryPerformanceCounter(&counter);
|
||||||
|
return counter.QuadPart;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SteadyClock::time_point SteadyClock::Now() noexcept {
|
||||||
|
#if defined(_WIN32)
|
||||||
|
static const auto freq = WindowsQueryPerformanceFrequency();
|
||||||
|
const auto counter = WindowsQueryPerformanceCounter();
|
||||||
|
|
||||||
|
// 10 MHz is a very common QPC frequency on modern PCs.
|
||||||
|
// Optimizing for this specific frequency can double the performance of
|
||||||
|
// this function by avoiding the expensive frequency conversion path.
|
||||||
|
static constexpr s64 TenMHz = 10'000'000;
|
||||||
|
|
||||||
|
if (freq == TenMHz) [[likely]] {
|
||||||
|
static_assert(period::den % TenMHz == 0);
|
||||||
|
static constexpr s64 Multiplier = period::den / TenMHz;
|
||||||
|
return time_point{duration{counter * Multiplier}};
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto whole = (counter / freq) * period::den;
|
||||||
|
const auto part = (counter % freq) * period::den / freq;
|
||||||
|
return time_point{duration{whole + part}};
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
return time_point{duration{clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW)}};
|
||||||
|
#else
|
||||||
|
timespec ts;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
return time_point{std::chrono::seconds{ts.tv_sec} + std::chrono::nanoseconds{ts.tv_nsec}};
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}; // namespace Common
|
21
src/common/steady_clock.h
Executable file
21
src/common/steady_clock.h
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
struct SteadyClock {
|
||||||
|
using rep = s64;
|
||||||
|
using period = std::nano;
|
||||||
|
using duration = std::chrono::nanoseconds;
|
||||||
|
using time_point = std::chrono::time_point<SteadyClock>;
|
||||||
|
|
||||||
|
static constexpr bool is_steady = true;
|
||||||
|
|
||||||
|
[[nodiscard]] static time_point Now() noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Common
|
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/steady_clock.h"
|
||||||
#include "common/uint128.h"
|
#include "common/uint128.h"
|
||||||
#include "common/wall_clock.h"
|
#include "common/wall_clock.h"
|
||||||
|
|
||||||
|
@ -11,45 +12,33 @@
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
using base_timer = std::chrono::steady_clock;
|
|
||||||
using base_time_point = std::chrono::time_point<base_timer>;
|
|
||||||
|
|
||||||
class StandardWallClock final : public WallClock {
|
class StandardWallClock final : public WallClock {
|
||||||
public:
|
public:
|
||||||
explicit StandardWallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_)
|
explicit StandardWallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_)
|
||||||
: WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, false) {
|
: WallClock{emulated_cpu_frequency_, emulated_clock_frequency_, false} {
|
||||||
start_time = base_timer::now();
|
start_time = SteadyClock::Now();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::nanoseconds GetTimeNS() override {
|
std::chrono::nanoseconds GetTimeNS() override {
|
||||||
base_time_point current = base_timer::now();
|
return SteadyClock::Now() - start_time;
|
||||||
auto elapsed = current - start_time;
|
|
||||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(elapsed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::microseconds GetTimeUS() override {
|
std::chrono::microseconds GetTimeUS() override {
|
||||||
base_time_point current = base_timer::now();
|
return std::chrono::duration_cast<std::chrono::microseconds>(GetTimeNS());
|
||||||
auto elapsed = current - start_time;
|
|
||||||
return std::chrono::duration_cast<std::chrono::microseconds>(elapsed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::milliseconds GetTimeMS() override {
|
std::chrono::milliseconds GetTimeMS() override {
|
||||||
base_time_point current = base_timer::now();
|
return std::chrono::duration_cast<std::chrono::milliseconds>(GetTimeNS());
|
||||||
auto elapsed = current - start_time;
|
|
||||||
return std::chrono::duration_cast<std::chrono::milliseconds>(elapsed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 GetClockCycles() override {
|
u64 GetClockCycles() override {
|
||||||
std::chrono::nanoseconds time_now = GetTimeNS();
|
const u128 temp = Common::Multiply64Into128(GetTimeNS().count(), emulated_clock_frequency);
|
||||||
const u128 temporary =
|
return Common::Divide128On32(temp, NS_RATIO).first;
|
||||||
Common::Multiply64Into128(time_now.count(), emulated_clock_frequency);
|
|
||||||
return Common::Divide128On32(temporary, 1000000000).first;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 GetCPUCycles() override {
|
u64 GetCPUCycles() override {
|
||||||
std::chrono::nanoseconds time_now = GetTimeNS();
|
const u128 temp = Common::Multiply64Into128(GetTimeNS().count(), emulated_cpu_frequency);
|
||||||
const u128 temporary = Common::Multiply64Into128(time_now.count(), emulated_cpu_frequency);
|
return Common::Divide128On32(temp, NS_RATIO).first;
|
||||||
return Common::Divide128On32(temporary, 1000000000).first;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pause([[maybe_unused]] bool is_paused) override {
|
void Pause([[maybe_unused]] bool is_paused) override {
|
||||||
|
@ -57,7 +46,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
base_time_point start_time;
|
SteadyClock::time_point start_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
|
@ -93,4 +82,9 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u64 emulated_cpu_frequency,
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
std::unique_ptr<WallClock> CreateStandardWallClock(u64 emulated_cpu_frequency,
|
||||||
|
u64 emulated_clock_frequency) {
|
||||||
|
return std::make_unique<StandardWallClock>(emulated_cpu_frequency, emulated_clock_frequency);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|
|
@ -55,4 +55,7 @@ private:
|
||||||
[[nodiscard]] std::unique_ptr<WallClock> CreateBestMatchingClock(u64 emulated_cpu_frequency,
|
[[nodiscard]] std::unique_ptr<WallClock> CreateBestMatchingClock(u64 emulated_cpu_frequency,
|
||||||
u64 emulated_clock_frequency);
|
u64 emulated_clock_frequency);
|
||||||
|
|
||||||
|
[[nodiscard]] std::unique_ptr<WallClock> CreateStandardWallClock(u64 emulated_cpu_frequency,
|
||||||
|
u64 emulated_clock_frequency);
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|
109
src/common/windows/timer_resolution.cpp
Executable file
109
src/common/windows/timer_resolution.cpp
Executable file
|
@ -0,0 +1,109 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include "common/windows/timer_resolution.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FTime%2FNtQueryTimerResolution.html
|
||||||
|
NTSYSAPI LONG NTAPI NtQueryTimerResolution(PULONG MinimumResolution, PULONG MaximumResolution,
|
||||||
|
PULONG CurrentResolution);
|
||||||
|
|
||||||
|
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FTime%2FNtSetTimerResolution.html
|
||||||
|
NTSYSAPI LONG NTAPI NtSetTimerResolution(ULONG DesiredResolution, BOOLEAN SetResolution,
|
||||||
|
PULONG CurrentResolution);
|
||||||
|
|
||||||
|
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FThread%2FNtDelayExecution.html
|
||||||
|
NTSYSAPI LONG NTAPI NtDelayExecution(BOOLEAN Alertable, PLARGE_INTEGER DelayInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defines for compatibility with older Windows 10 SDKs.
|
||||||
|
|
||||||
|
#ifndef PROCESS_POWER_THROTTLING_EXECUTION_SPEED
|
||||||
|
#define PROCESS_POWER_THROTTLING_EXECUTION_SPEED 0x1
|
||||||
|
#endif
|
||||||
|
#ifndef PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION
|
||||||
|
#define PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION 0x4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace Common::Windows {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
using namespace std::chrono;
|
||||||
|
|
||||||
|
constexpr nanoseconds ToNS(ULONG hundred_ns) {
|
||||||
|
return nanoseconds{hundred_ns * 100};
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr ULONG ToHundredNS(nanoseconds ns) {
|
||||||
|
return static_cast<ULONG>(ns.count()) / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct TimerResolution {
|
||||||
|
std::chrono::nanoseconds minimum;
|
||||||
|
std::chrono::nanoseconds maximum;
|
||||||
|
std::chrono::nanoseconds current;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimerResolution GetTimerResolution() {
|
||||||
|
ULONG MinimumTimerResolution;
|
||||||
|
ULONG MaximumTimerResolution;
|
||||||
|
ULONG CurrentTimerResolution;
|
||||||
|
NtQueryTimerResolution(&MinimumTimerResolution, &MaximumTimerResolution,
|
||||||
|
&CurrentTimerResolution);
|
||||||
|
return {
|
||||||
|
.minimum{ToNS(MinimumTimerResolution)},
|
||||||
|
.maximum{ToNS(MaximumTimerResolution)},
|
||||||
|
.current{ToNS(CurrentTimerResolution)},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetHighQoS() {
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/procthread/quality-of-service
|
||||||
|
PROCESS_POWER_THROTTLING_STATE PowerThrottling{
|
||||||
|
.Version{PROCESS_POWER_THROTTLING_CURRENT_VERSION},
|
||||||
|
.ControlMask{PROCESS_POWER_THROTTLING_EXECUTION_SPEED |
|
||||||
|
PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION},
|
||||||
|
.StateMask{},
|
||||||
|
};
|
||||||
|
SetProcessInformation(GetCurrentProcess(), ProcessPowerThrottling, &PowerThrottling,
|
||||||
|
sizeof(PROCESS_POWER_THROTTLING_STATE));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
nanoseconds GetMinimumTimerResolution() {
|
||||||
|
return GetTimerResolution().minimum;
|
||||||
|
}
|
||||||
|
|
||||||
|
nanoseconds GetMaximumTimerResolution() {
|
||||||
|
return GetTimerResolution().maximum;
|
||||||
|
}
|
||||||
|
|
||||||
|
nanoseconds GetCurrentTimerResolution() {
|
||||||
|
return GetTimerResolution().current;
|
||||||
|
}
|
||||||
|
|
||||||
|
nanoseconds SetCurrentTimerResolution(nanoseconds timer_resolution) {
|
||||||
|
// Set the timer resolution, and return the current timer resolution.
|
||||||
|
const auto DesiredTimerResolution = ToHundredNS(timer_resolution);
|
||||||
|
ULONG CurrentTimerResolution;
|
||||||
|
NtSetTimerResolution(DesiredTimerResolution, TRUE, &CurrentTimerResolution);
|
||||||
|
return ToNS(CurrentTimerResolution);
|
||||||
|
}
|
||||||
|
|
||||||
|
nanoseconds SetCurrentTimerResolutionToMaximum() {
|
||||||
|
SetHighQoS();
|
||||||
|
return SetCurrentTimerResolution(GetMaximumTimerResolution());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SleepForOneTick() {
|
||||||
|
LARGE_INTEGER DelayInterval{
|
||||||
|
.QuadPart{-1},
|
||||||
|
};
|
||||||
|
NtDelayExecution(FALSE, &DelayInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Common::Windows
|
36
src/common/windows/timer_resolution.h
Executable file
36
src/common/windows/timer_resolution.h
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
|
namespace Common::Windows {
|
||||||
|
|
||||||
|
/// Returns the minimum (least precise) supported timer resolution in nanoseconds.
|
||||||
|
std::chrono::nanoseconds GetMinimumTimerResolution();
|
||||||
|
|
||||||
|
/// Returns the maximum (most precise) supported timer resolution in nanoseconds.
|
||||||
|
std::chrono::nanoseconds GetMaximumTimerResolution();
|
||||||
|
|
||||||
|
/// Returns the current timer resolution in nanoseconds.
|
||||||
|
std::chrono::nanoseconds GetCurrentTimerResolution();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current timer resolution.
|
||||||
|
*
|
||||||
|
* @param timer_resolution Timer resolution in nanoseconds.
|
||||||
|
*
|
||||||
|
* @returns The current timer resolution.
|
||||||
|
*/
|
||||||
|
std::chrono::nanoseconds SetCurrentTimerResolution(std::chrono::nanoseconds timer_resolution);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current timer resolution to the maximum supported timer resolution.
|
||||||
|
*
|
||||||
|
* @returns The current timer resolution.
|
||||||
|
*/
|
||||||
|
std::chrono::nanoseconds SetCurrentTimerResolutionToMaximum();
|
||||||
|
|
||||||
|
/// Sleep for one tick of the current timer resolution.
|
||||||
|
void SleepForOneTick();
|
||||||
|
|
||||||
|
} // namespace Common::Windows
|
|
@ -6,6 +6,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include "common/atomic_ops.h"
|
#include "common/atomic_ops.h"
|
||||||
|
#include "common/steady_clock.h"
|
||||||
#include "common/uint128.h"
|
#include "common/uint128.h"
|
||||||
#include "common/x64/native_clock.h"
|
#include "common/x64/native_clock.h"
|
||||||
|
|
||||||
|
@ -39,6 +40,12 @@ static u64 FencedRDTSC() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
template <u64 Nearest>
|
||||||
|
static u64 RoundToNearest(u64 value) {
|
||||||
|
const auto mod = value % Nearest;
|
||||||
|
return mod >= (Nearest / 2) ? (value - mod + Nearest) : (value - mod);
|
||||||
|
}
|
||||||
|
|
||||||
u64 EstimateRDTSCFrequency() {
|
u64 EstimateRDTSCFrequency() {
|
||||||
// Discard the first result measuring the rdtsc.
|
// Discard the first result measuring the rdtsc.
|
||||||
FencedRDTSC();
|
FencedRDTSC();
|
||||||
|
@ -46,18 +53,18 @@ u64 EstimateRDTSCFrequency() {
|
||||||
FencedRDTSC();
|
FencedRDTSC();
|
||||||
|
|
||||||
// Get the current time.
|
// Get the current time.
|
||||||
const auto start_time = std::chrono::steady_clock::now();
|
const auto start_time = Common::SteadyClock::Now();
|
||||||
const u64 tsc_start = FencedRDTSC();
|
const u64 tsc_start = FencedRDTSC();
|
||||||
// Wait for 200 milliseconds.
|
// Wait for 250 milliseconds.
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds{200});
|
std::this_thread::sleep_for(std::chrono::milliseconds{250});
|
||||||
const auto end_time = std::chrono::steady_clock::now();
|
const auto end_time = Common::SteadyClock::Now();
|
||||||
const u64 tsc_end = FencedRDTSC();
|
const u64 tsc_end = FencedRDTSC();
|
||||||
// Calculate differences.
|
// Calculate differences.
|
||||||
const u64 timer_diff = static_cast<u64>(
|
const u64 timer_diff = static_cast<u64>(
|
||||||
std::chrono::duration_cast<std::chrono::nanoseconds>(end_time - start_time).count());
|
std::chrono::duration_cast<std::chrono::nanoseconds>(end_time - start_time).count());
|
||||||
const u64 tsc_diff = tsc_end - tsc_start;
|
const u64 tsc_diff = tsc_end - tsc_start;
|
||||||
const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, timer_diff);
|
const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, timer_diff);
|
||||||
return tsc_freq;
|
return RoundToNearest<1000>(tsc_freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace X64 {
|
namespace X64 {
|
||||||
|
|
|
@ -158,7 +158,6 @@ add_library(core STATIC
|
||||||
hid/motion_input.h
|
hid/motion_input.h
|
||||||
hle/api_version.h
|
hle/api_version.h
|
||||||
hle/ipc.h
|
hle/ipc.h
|
||||||
hle/ipc_helpers.h
|
|
||||||
hle/kernel/board/nintendo/nx/k_memory_layout.h
|
hle/kernel/board/nintendo/nx/k_memory_layout.h
|
||||||
hle/kernel/board/nintendo/nx/k_system_control.cpp
|
hle/kernel/board/nintendo/nx/k_system_control.cpp
|
||||||
hle/kernel/board/nintendo/nx/k_system_control.h
|
hle/kernel/board/nintendo/nx/k_system_control.h
|
||||||
|
@ -168,8 +167,6 @@ add_library(core STATIC
|
||||||
hle/kernel/svc_results.h
|
hle/kernel/svc_results.h
|
||||||
hle/kernel/global_scheduler_context.cpp
|
hle/kernel/global_scheduler_context.cpp
|
||||||
hle/kernel/global_scheduler_context.h
|
hle/kernel/global_scheduler_context.h
|
||||||
hle/kernel/hle_ipc.cpp
|
|
||||||
hle/kernel/hle_ipc.h
|
|
||||||
hle/kernel/init/init_slab_setup.cpp
|
hle/kernel/init/init_slab_setup.cpp
|
||||||
hle/kernel/init/init_slab_setup.h
|
hle/kernel/init/init_slab_setup.h
|
||||||
hle/kernel/initial_process.h
|
hle/kernel/initial_process.h
|
||||||
|
@ -629,35 +626,35 @@ add_library(core STATIC
|
||||||
hle/service/nvdrv/nvdrv_interface.h
|
hle/service/nvdrv/nvdrv_interface.h
|
||||||
hle/service/nvdrv/nvmemp.cpp
|
hle/service/nvdrv/nvmemp.cpp
|
||||||
hle/service/nvdrv/nvmemp.h
|
hle/service/nvdrv/nvmemp.h
|
||||||
hle/service/nvflinger/binder.h
|
hle/service/nvnflinger/binder.h
|
||||||
hle/service/nvflinger/buffer_item.h
|
hle/service/nvnflinger/buffer_item.h
|
||||||
hle/service/nvflinger/buffer_item_consumer.cpp
|
hle/service/nvnflinger/buffer_item_consumer.cpp
|
||||||
hle/service/nvflinger/buffer_item_consumer.h
|
hle/service/nvnflinger/buffer_item_consumer.h
|
||||||
hle/service/nvflinger/buffer_queue_consumer.cpp
|
hle/service/nvnflinger/buffer_queue_consumer.cpp
|
||||||
hle/service/nvflinger/buffer_queue_consumer.h
|
hle/service/nvnflinger/buffer_queue_consumer.h
|
||||||
hle/service/nvflinger/buffer_queue_core.cpp
|
hle/service/nvnflinger/buffer_queue_core.cpp
|
||||||
hle/service/nvflinger/buffer_queue_core.h
|
hle/service/nvnflinger/buffer_queue_core.h
|
||||||
hle/service/nvflinger/buffer_queue_defs.h
|
hle/service/nvnflinger/buffer_queue_defs.h
|
||||||
hle/service/nvflinger/buffer_queue_producer.cpp
|
hle/service/nvnflinger/buffer_queue_producer.cpp
|
||||||
hle/service/nvflinger/buffer_queue_producer.h
|
hle/service/nvnflinger/buffer_queue_producer.h
|
||||||
hle/service/nvflinger/buffer_slot.h
|
hle/service/nvnflinger/buffer_slot.h
|
||||||
hle/service/nvflinger/buffer_transform_flags.h
|
hle/service/nvnflinger/buffer_transform_flags.h
|
||||||
hle/service/nvflinger/consumer_base.cpp
|
hle/service/nvnflinger/consumer_base.cpp
|
||||||
hle/service/nvflinger/consumer_base.h
|
hle/service/nvnflinger/consumer_base.h
|
||||||
hle/service/nvflinger/consumer_listener.h
|
hle/service/nvnflinger/consumer_listener.h
|
||||||
hle/service/nvflinger/graphic_buffer_producer.cpp
|
hle/service/nvnflinger/graphic_buffer_producer.cpp
|
||||||
hle/service/nvflinger/graphic_buffer_producer.h
|
hle/service/nvnflinger/graphic_buffer_producer.h
|
||||||
hle/service/nvflinger/hos_binder_driver_server.cpp
|
hle/service/nvnflinger/hos_binder_driver_server.cpp
|
||||||
hle/service/nvflinger/hos_binder_driver_server.h
|
hle/service/nvnflinger/hos_binder_driver_server.h
|
||||||
hle/service/nvflinger/nvflinger.cpp
|
hle/service/nvnflinger/nvnflinger.cpp
|
||||||
hle/service/nvflinger/nvflinger.h
|
hle/service/nvnflinger/nvnflinger.h
|
||||||
hle/service/nvflinger/parcel.h
|
hle/service/nvnflinger/parcel.h
|
||||||
hle/service/nvflinger/pixel_format.h
|
hle/service/nvnflinger/pixel_format.h
|
||||||
hle/service/nvflinger/producer_listener.h
|
hle/service/nvnflinger/producer_listener.h
|
||||||
hle/service/nvflinger/status.h
|
hle/service/nvnflinger/status.h
|
||||||
hle/service/nvflinger/ui/fence.h
|
hle/service/nvnflinger/ui/fence.h
|
||||||
hle/service/nvflinger/ui/graphic_buffer.h
|
hle/service/nvnflinger/ui/graphic_buffer.h
|
||||||
hle/service/nvflinger/window.h
|
hle/service/nvnflinger/window.h
|
||||||
hle/service/olsc/olsc.cpp
|
hle/service/olsc/olsc.cpp
|
||||||
hle/service/olsc/olsc.h
|
hle/service/olsc/olsc.h
|
||||||
hle/service/pcie/pcie.cpp
|
hle/service/pcie/pcie.cpp
|
||||||
|
@ -680,6 +677,9 @@ add_library(core STATIC
|
||||||
hle/service/ptm/ptm.h
|
hle/service/ptm/ptm.h
|
||||||
hle/service/ptm/ts.cpp
|
hle/service/ptm/ts.cpp
|
||||||
hle/service/ptm/ts.h
|
hle/service/ptm/ts.h
|
||||||
|
hle/service/hle_ipc.cpp
|
||||||
|
hle/service/hle_ipc.h
|
||||||
|
hle/service/ipc_helpers.h
|
||||||
hle/service/kernel_helpers.cpp
|
hle/service/kernel_helpers.cpp
|
||||||
hle/service/kernel_helpers.h
|
hle/service/kernel_helpers.h
|
||||||
hle/service/mutex.cpp
|
hle/service/mutex.cpp
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "common/windows/timer_resolution.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/core_timing_util.h"
|
#include "core/core_timing_util.h"
|
||||||
|
@ -38,7 +42,8 @@ struct CoreTiming::Event {
|
||||||
};
|
};
|
||||||
|
|
||||||
CoreTiming::CoreTiming()
|
CoreTiming::CoreTiming()
|
||||||
: clock{Common::CreateBestMatchingClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)} {}
|
: cpu_clock{Common::CreateBestMatchingClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)},
|
||||||
|
event_clock{Common::CreateStandardWallClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)} {}
|
||||||
|
|
||||||
CoreTiming::~CoreTiming() {
|
CoreTiming::~CoreTiming() {
|
||||||
Reset();
|
Reset();
|
||||||
|
@ -185,15 +190,15 @@ void CoreTiming::ResetTicks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 CoreTiming::GetCPUTicks() const {
|
u64 CoreTiming::GetCPUTicks() const {
|
||||||
if (is_multicore) {
|
if (is_multicore) [[likely]] {
|
||||||
return clock->GetCPUCycles();
|
return cpu_clock->GetCPUCycles();
|
||||||
}
|
}
|
||||||
return ticks;
|
return ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 CoreTiming::GetClockTicks() const {
|
u64 CoreTiming::GetClockTicks() const {
|
||||||
if (is_multicore) {
|
if (is_multicore) [[likely]] {
|
||||||
return clock->GetClockCycles();
|
return cpu_clock->GetClockCycles();
|
||||||
}
|
}
|
||||||
return CpuCyclesToClockCycles(ticks);
|
return CpuCyclesToClockCycles(ticks);
|
||||||
}
|
}
|
||||||
|
@ -252,21 +257,20 @@ void CoreTiming::ThreadLoop() {
|
||||||
const auto next_time = Advance();
|
const auto next_time = Advance();
|
||||||
if (next_time) {
|
if (next_time) {
|
||||||
// There are more events left in the queue, wait until the next event.
|
// There are more events left in the queue, wait until the next event.
|
||||||
const auto wait_time = *next_time - GetGlobalTimeNs().count();
|
auto wait_time = *next_time - GetGlobalTimeNs().count();
|
||||||
if (wait_time > 0) {
|
if (wait_time > 0) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Assume a timer resolution of 1ms.
|
const auto timer_resolution_ns =
|
||||||
static constexpr s64 TimerResolutionNS = 1000000;
|
Common::Windows::GetCurrentTimerResolution().count();
|
||||||
|
|
||||||
// Sleep in discrete intervals of the timer resolution, and spin the rest.
|
while (!paused && !event.IsSet() && wait_time > 0) {
|
||||||
const auto sleep_time = wait_time - (wait_time % TimerResolutionNS);
|
wait_time = *next_time - GetGlobalTimeNs().count();
|
||||||
if (sleep_time > 0) {
|
|
||||||
event.WaitFor(std::chrono::nanoseconds(sleep_time));
|
|
||||||
}
|
|
||||||
|
|
||||||
while (!paused && !event.IsSet() && GetGlobalTimeNs().count() < *next_time) {
|
if (wait_time >= timer_resolution_ns) {
|
||||||
// Yield to reduce thread starvation.
|
Common::Windows::SleepForOneTick();
|
||||||
std::this_thread::yield();
|
} else {
|
||||||
|
std::this_thread::yield();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.IsSet()) {
|
if (event.IsSet()) {
|
||||||
|
@ -285,9 +289,9 @@ void CoreTiming::ThreadLoop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
paused_set = true;
|
paused_set = true;
|
||||||
clock->Pause(true);
|
event_clock->Pause(true);
|
||||||
pause_event.Wait();
|
pause_event.Wait();
|
||||||
clock->Pause(false);
|
event_clock->Pause(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,16 +307,23 @@ void CoreTiming::Reset() {
|
||||||
has_started = false;
|
has_started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::chrono::nanoseconds CoreTiming::GetCPUTimeNs() const {
|
||||||
|
if (is_multicore) [[likely]] {
|
||||||
|
return cpu_clock->GetTimeNS();
|
||||||
|
}
|
||||||
|
return CyclesToNs(ticks);
|
||||||
|
}
|
||||||
|
|
||||||
std::chrono::nanoseconds CoreTiming::GetGlobalTimeNs() const {
|
std::chrono::nanoseconds CoreTiming::GetGlobalTimeNs() const {
|
||||||
if (is_multicore) {
|
if (is_multicore) [[likely]] {
|
||||||
return clock->GetTimeNS();
|
return event_clock->GetTimeNS();
|
||||||
}
|
}
|
||||||
return CyclesToNs(ticks);
|
return CyclesToNs(ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const {
|
std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const {
|
||||||
if (is_multicore) {
|
if (is_multicore) [[likely]] {
|
||||||
return clock->GetTimeUS();
|
return event_clock->GetTimeUS();
|
||||||
}
|
}
|
||||||
return CyclesToUs(ticks);
|
return CyclesToUs(ticks);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,9 @@ public:
|
||||||
/// Returns current time in emulated in Clock cycles
|
/// Returns current time in emulated in Clock cycles
|
||||||
u64 GetClockTicks() const;
|
u64 GetClockTicks() const;
|
||||||
|
|
||||||
|
/// Returns current time in nanoseconds.
|
||||||
|
std::chrono::nanoseconds GetCPUTimeNs() const;
|
||||||
|
|
||||||
/// Returns current time in microseconds.
|
/// Returns current time in microseconds.
|
||||||
std::chrono::microseconds GetGlobalTimeUs() const;
|
std::chrono::microseconds GetGlobalTimeUs() const;
|
||||||
|
|
||||||
|
@ -139,7 +142,8 @@ private:
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
std::unique_ptr<Common::WallClock> clock;
|
std::unique_ptr<Common::WallClock> cpu_clock;
|
||||||
|
std::unique_ptr<Common::WallClock> event_clock;
|
||||||
|
|
||||||
s64 global_timer = 0;
|
s64 global_timer = 0;
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,9 @@ namespace Core {
|
||||||
|
|
||||||
namespace Hardware {
|
namespace Hardware {
|
||||||
|
|
||||||
// The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
|
constexpr u64 BASE_CLOCK_RATE = 1'020'000'000; // Default CPU Frequency = 1020 MHz
|
||||||
// The exact value used is of course unverified.
|
constexpr u64 CNTFREQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz
|
||||||
constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch cpu frequency is 1020MHz un/docked
|
constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
|
||||||
constexpr u64 CNTFREQ = 19200000; // Switch's hardware clock speed
|
|
||||||
constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
|
|
||||||
|
|
||||||
// Virtual to Physical core map.
|
// Virtual to Physical core map.
|
||||||
constexpr std::array<s32, Common::BitSize<u64>()> VirtualToPhysicalCoreMap{
|
constexpr std::array<s32, Common::BitSize<u64>()> VirtualToPhysicalCoreMap{
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
|
||||||
#include "core/hle/kernel/k_client_port.h"
|
#include "core/hle/kernel/k_client_port.h"
|
||||||
#include "core/hle/kernel/k_port.h"
|
#include "core/hle/kernel/k_port.h"
|
||||||
#include "core/hle/kernel/k_scheduler.h"
|
#include "core/hle/kernel/k_scheduler.h"
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace Kernel {
|
||||||
class KClientSession;
|
class KClientSession;
|
||||||
class KernelCore;
|
class KernelCore;
|
||||||
class KPort;
|
class KPort;
|
||||||
class SessionRequestManager;
|
|
||||||
|
|
||||||
class KClientPort final : public KSynchronizationObject {
|
class KClientPort final : public KSynchronizationObject {
|
||||||
KERNEL_AUTOOBJECT_TRAITS(KClientPort, KSynchronizationObject);
|
KERNEL_AUTOOBJECT_TRAITS(KClientPort, KSynchronizationObject);
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
|
||||||
#include "core/hle/kernel/k_client_session.h"
|
#include "core/hle/kernel/k_client_session.h"
|
||||||
#include "core/hle/kernel/k_server_session.h"
|
#include "core/hle/kernel/k_server_session.h"
|
||||||
#include "core/hle/kernel/k_session.h"
|
#include "core/hle/kernel/k_session.h"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
|
||||||
#include "core/hle/kernel/k_port.h"
|
#include "core/hle/kernel/k_port.h"
|
||||||
#include "core/hle/kernel/k_scheduler.h"
|
#include "core/hle/kernel/k_scheduler.h"
|
||||||
#include "core/hle/kernel/svc_results.h"
|
#include "core/hle/kernel/svc_results.h"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
|
||||||
#include "core/hle/kernel/k_client_port.h"
|
#include "core/hle/kernel/k_client_port.h"
|
||||||
#include "core/hle/kernel/k_handle_table.h"
|
#include "core/hle/kernel/k_handle_table.h"
|
||||||
#include "core/hle/kernel/k_process.h"
|
#include "core/hle/kernel/k_process.h"
|
||||||
|
@ -22,6 +20,8 @@
|
||||||
#include "core/hle/kernel/k_thread.h"
|
#include "core/hle/kernel/k_thread.h"
|
||||||
#include "core/hle/kernel/k_thread_queue.h"
|
#include "core/hle/kernel/k_thread_queue.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
#include "core/hle/service/hle_ipc.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
@ -281,8 +281,8 @@ Result KServerSession::SendReply(bool is_hle) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result KServerSession::ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context,
|
Result KServerSession::ReceiveRequest(std::shared_ptr<Service::HLERequestContext>* out_context,
|
||||||
std::weak_ptr<SessionRequestManager> manager) {
|
std::weak_ptr<Service::SessionRequestManager> manager) {
|
||||||
// Lock the session.
|
// Lock the session.
|
||||||
KScopedLightLock lk{m_lock};
|
KScopedLightLock lk{m_lock};
|
||||||
|
|
||||||
|
@ -329,7 +329,8 @@ Result KServerSession::ReceiveRequest(std::shared_ptr<HLERequestContext>* out_co
|
||||||
if (out_context != nullptr) {
|
if (out_context != nullptr) {
|
||||||
// HLE request.
|
// HLE request.
|
||||||
u32* cmd_buf{reinterpret_cast<u32*>(memory.GetPointer(client_message))};
|
u32* cmd_buf{reinterpret_cast<u32*>(memory.GetPointer(client_message))};
|
||||||
*out_context = std::make_shared<HLERequestContext>(kernel, memory, this, client_thread);
|
*out_context =
|
||||||
|
std::make_shared<Service::HLERequestContext>(kernel, memory, this, client_thread);
|
||||||
(*out_context)->SetSessionRequestManager(manager);
|
(*out_context)->SetSessionRequestManager(manager);
|
||||||
(*out_context)
|
(*out_context)
|
||||||
->PopulateFromIncomingCommandBuffer(client_thread->GetOwnerProcess()->GetHandleTable(),
|
->PopulateFromIncomingCommandBuffer(client_thread->GetOwnerProcess()->GetHandleTable(),
|
||||||
|
|
|
@ -10,18 +10,20 @@
|
||||||
|
|
||||||
#include <boost/intrusive/list.hpp>
|
#include <boost/intrusive/list.hpp>
|
||||||
|
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
|
||||||
#include "core/hle/kernel/k_light_lock.h"
|
#include "core/hle/kernel/k_light_lock.h"
|
||||||
#include "core/hle/kernel/k_session_request.h"
|
#include "core/hle/kernel/k_session_request.h"
|
||||||
#include "core/hle/kernel/k_synchronization_object.h"
|
#include "core/hle/kernel/k_synchronization_object.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
class HLERequestContext;
|
||||||
|
class SessionRequestManager;
|
||||||
|
} // namespace Service
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
class HLERequestContext;
|
|
||||||
class KernelCore;
|
class KernelCore;
|
||||||
class KSession;
|
class KSession;
|
||||||
class SessionRequestManager;
|
|
||||||
class KThread;
|
class KThread;
|
||||||
|
|
||||||
class KServerSession final : public KSynchronizationObject,
|
class KServerSession final : public KSynchronizationObject,
|
||||||
|
@ -52,8 +54,8 @@ public:
|
||||||
/// TODO: flesh these out to match the real kernel
|
/// TODO: flesh these out to match the real kernel
|
||||||
Result OnRequest(KSessionRequest* request);
|
Result OnRequest(KSessionRequest* request);
|
||||||
Result SendReply(bool is_hle = false);
|
Result SendReply(bool is_hle = false);
|
||||||
Result ReceiveRequest(std::shared_ptr<HLERequestContext>* out_context = nullptr,
|
Result ReceiveRequest(std::shared_ptr<Service::HLERequestContext>* out_context = nullptr,
|
||||||
std::weak_ptr<SessionRequestManager> manager = {});
|
std::weak_ptr<Service::SessionRequestManager> manager = {});
|
||||||
|
|
||||||
Result SendReplyHLE() {
|
Result SendReplyHLE() {
|
||||||
return SendReply(true);
|
return SendReply(true);
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/file_sys/control_metadata.h"
|
#include "core/file_sys/control_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/acc/acc.h"
|
#include "core/hle/service/acc/acc.h"
|
||||||
#include "core/hle/service/acc/acc_aa.h"
|
#include "core/hle/service/acc/acc_aa.h"
|
||||||
#include "core/hle/service/acc/acc_su.h"
|
#include "core/hle/service/acc/acc_su.h"
|
||||||
|
@ -25,6 +24,7 @@
|
||||||
#include "core/hle/service/acc/errors.h"
|
#include "core/hle/service/acc/errors.h"
|
||||||
#include "core/hle/service/acc/profile_manager.h"
|
#include "core/hle/service/acc/profile_manager.h"
|
||||||
#include "core/hle/service/glue/glue_manager.h"
|
#include "core/hle/service/glue/glue_manager.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Get(Kernel::HLERequestContext& ctx) {
|
void Get(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
||||||
ProfileBase profile_base{};
|
ProfileBase profile_base{};
|
||||||
UserData data{};
|
UserData data{};
|
||||||
|
@ -312,7 +312,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBase(Kernel::HLERequestContext& ctx) {
|
void GetBase(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
||||||
ProfileBase profile_base{};
|
ProfileBase profile_base{};
|
||||||
if (profile_manager.GetProfileBase(user_id, profile_base)) {
|
if (profile_manager.GetProfileBase(user_id, profile_base)) {
|
||||||
|
@ -326,7 +326,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadImage(Kernel::HLERequestContext& ctx) {
|
void LoadImage(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -353,7 +353,7 @@ protected:
|
||||||
rb.Push<u32>(size);
|
rb.Push<u32>(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetImageSize(Kernel::HLERequestContext& ctx) {
|
void GetImageSize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
@ -370,7 +370,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Store(Kernel::HLERequestContext& ctx) {
|
void Store(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto base = rp.PopRaw<ProfileBase>();
|
const auto base = rp.PopRaw<ProfileBase>();
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ protected:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreWithImage(Kernel::HLERequestContext& ctx) {
|
void StoreWithImage(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto base = rp.PopRaw<ProfileBase>();
|
const auto base = rp.PopRaw<ProfileBase>();
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ public:
|
||||||
}
|
}
|
||||||
~EnsureTokenIdCacheAsyncInterface() = default;
|
~EnsureTokenIdCacheAsyncInterface() = default;
|
||||||
|
|
||||||
void LoadIdTokenCache(Kernel::HLERequestContext& ctx) {
|
void LoadIdTokenCache(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -542,14 +542,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CheckAvailability(Kernel::HLERequestContext& ctx) {
|
void CheckAvailability(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "(STUBBED) called");
|
LOG_DEBUG(Service_ACC, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(false); // TODO: Check when this is supposed to return true and when not
|
rb.Push(false); // TODO: Check when this is supposed to return true and when not
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAccountId(Kernel::HLERequestContext& ctx) {
|
void GetAccountId(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -557,7 +557,7 @@ private:
|
||||||
rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash());
|
rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnsureIdTokenCacheAsync(Kernel::HLERequestContext& ctx) {
|
void EnsureIdTokenCacheAsync(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -565,13 +565,13 @@ private:
|
||||||
rb.PushIpcInterface(ensure_token_id);
|
rb.PushIpcInterface(ensure_token_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadIdTokenCache(Kernel::HLERequestContext& ctx) {
|
void LoadIdTokenCache(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
|
||||||
ensure_token_id->LoadIdTokenCache(ctx);
|
ensure_token_id->LoadIdTokenCache(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNintendoAccountUserResourceCacheForApplication(Kernel::HLERequestContext& ctx) {
|
void GetNintendoAccountUserResourceCacheForApplication(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
|
||||||
std::vector<u8> nas_user_base_for_application(0x68);
|
std::vector<u8> nas_user_base_for_application(0x68);
|
||||||
|
@ -587,7 +587,7 @@ private:
|
||||||
rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash());
|
rb.PushRaw<u64>(profile_manager->GetLastOpenedUser().Hash());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreOpenContext(Kernel::HLERequestContext& ctx) {
|
void StoreOpenContext(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
profile_manager->StoreOpenedUsers();
|
profile_manager->StoreOpenedUsers();
|
||||||
|
@ -689,14 +689,14 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetUserCount(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount()));
|
rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetUserExistence(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
||||||
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
||||||
|
@ -706,28 +706,28 @@ void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(profile_manager->UserExists(user_id));
|
rb.Push(profile_manager->UserExists(user_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ListAllUsers(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
ctx.WriteBuffer(profile_manager->GetAllUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ListOpenUsers(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
ctx.WriteBuffer(profile_manager->GetOpenUsers());
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetLastOpenedUser(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser());
|
rb.PushRaw<Common::UUID>(profile_manager->GetLastOpenedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetProfile(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
||||||
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString());
|
||||||
|
@ -737,20 +737,20 @@ void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager);
|
rb.PushIpcInterface<IProfile>(system, user_id, *profile_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::IsUserRegistrationRequestPermitted(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(profile_manager->CanSystemRegisterUser());
|
rb.Push(profile_manager->CanSystemRegisterUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::InitializeApplicationInfo(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(InitializeApplicationInfoBase());
|
rb.Push(InitializeApplicationInfoBase());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::InitializeApplicationInfoRestricted(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::InitializeApplicationInfoRestricted(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(Partial implementation) called");
|
LOG_WARNING(Service_ACC, "(Partial implementation) called");
|
||||||
|
|
||||||
// TODO(ogniK): We require checking if the user actually owns the title and what not. As of
|
// TODO(ogniK): We require checking if the user actually owns the title and what not. As of
|
||||||
|
@ -800,14 +800,14 @@ Result Module::Interface::InitializeApplicationInfoBase() {
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetBaasAccountManagerForApplication(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager);
|
rb.PushIpcInterface<IManagerForApplication>(system, profile_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::IsUserAccountSwitchLocked(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
FileSys::NACP nacp;
|
FileSys::NACP nacp;
|
||||||
const auto res = system.GetAppLoader().ReadControlData(nacp);
|
const auto res = system.GetAppLoader().ReadControlData(nacp);
|
||||||
|
@ -834,14 +834,14 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
|
||||||
rb.Push(is_locked);
|
rb.Push(is_locked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::InitializeApplicationInfoV2(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::InitializeApplicationInfoV2(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
LOG_WARNING(Service_ACC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetProfileEditor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
Common::UUID user_id = rp.PopRaw<Common::UUID>();
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@ void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager);
|
rb.PushIpcInterface<IProfileEditor>(system, user_id, *profile_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ListQualifiedUsers(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ListQualifiedUsers(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
// All users should be qualified. We don't actually have parental control or anything to do with
|
// All users should be qualified. We don't actually have parental control or anything to do with
|
||||||
|
@ -863,7 +863,7 @@ void Module::Interface::ListQualifiedUsers(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ListOpenContextStoredUsers(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
ctx.WriteBuffer(profile_manager->GetStoredOpenedUsers());
|
ctx.WriteBuffer(profile_manager->GetStoredOpenedUsers());
|
||||||
|
@ -871,7 +871,7 @@ void Module::Interface::ListOpenContextStoredUsers(Kernel::HLERequestContext& ct
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::StoreSaveDataThumbnailApplication(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto uuid = rp.PopRaw<Common::UUID>();
|
const auto uuid = rp.PopRaw<Common::UUID>();
|
||||||
|
|
||||||
|
@ -884,7 +884,7 @@ void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestCont
|
||||||
StoreSaveDataThumbnail(ctx, uuid, tid);
|
StoreSaveDataThumbnail(ctx, uuid, tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::StoreSaveDataThumbnailSystem(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto uuid = rp.PopRaw<Common::UUID>();
|
const auto uuid = rp.PopRaw<Common::UUID>();
|
||||||
const auto tid = rp.Pop<u64_le>();
|
const auto tid = rp.Pop<u64_le>();
|
||||||
|
@ -893,8 +893,8 @@ void Module::Interface::StoreSaveDataThumbnailSystem(Kernel::HLERequestContext&
|
||||||
StoreSaveDataThumbnail(ctx, uuid, tid);
|
StoreSaveDataThumbnail(ctx, uuid, tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx,
|
void Module::Interface::StoreSaveDataThumbnail(HLERequestContext& ctx, const Common::UUID& uuid,
|
||||||
const Common::UUID& uuid, const u64 tid) {
|
const u64 tid) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
||||||
if (tid == 0) {
|
if (tid == 0) {
|
||||||
|
@ -920,7 +920,7 @@ void Module::Interface::StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx,
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::TrySelectUserWithoutInteraction(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
// A u8 is passed into this function which we can safely ignore. It's to determine if we have
|
// A u8 is passed into this function which we can safely ignore. It's to determine if we have
|
||||||
// access to use the network or not by the looks of it
|
// access to use the network or not by the looks of it
|
||||||
|
|
|
@ -20,28 +20,28 @@ public:
|
||||||
const char* name);
|
const char* name);
|
||||||
~Interface() override;
|
~Interface() override;
|
||||||
|
|
||||||
void GetUserCount(Kernel::HLERequestContext& ctx);
|
void GetUserCount(HLERequestContext& ctx);
|
||||||
void GetUserExistence(Kernel::HLERequestContext& ctx);
|
void GetUserExistence(HLERequestContext& ctx);
|
||||||
void ListAllUsers(Kernel::HLERequestContext& ctx);
|
void ListAllUsers(HLERequestContext& ctx);
|
||||||
void ListOpenUsers(Kernel::HLERequestContext& ctx);
|
void ListOpenUsers(HLERequestContext& ctx);
|
||||||
void GetLastOpenedUser(Kernel::HLERequestContext& ctx);
|
void GetLastOpenedUser(HLERequestContext& ctx);
|
||||||
void GetProfile(Kernel::HLERequestContext& ctx);
|
void GetProfile(HLERequestContext& ctx);
|
||||||
void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
|
void InitializeApplicationInfo(HLERequestContext& ctx);
|
||||||
void InitializeApplicationInfoRestricted(Kernel::HLERequestContext& ctx);
|
void InitializeApplicationInfoRestricted(HLERequestContext& ctx);
|
||||||
void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx);
|
void GetBaasAccountManagerForApplication(HLERequestContext& ctx);
|
||||||
void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx);
|
void IsUserRegistrationRequestPermitted(HLERequestContext& ctx);
|
||||||
void TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx);
|
void TrySelectUserWithoutInteraction(HLERequestContext& ctx);
|
||||||
void IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx);
|
void IsUserAccountSwitchLocked(HLERequestContext& ctx);
|
||||||
void InitializeApplicationInfoV2(Kernel::HLERequestContext& ctx);
|
void InitializeApplicationInfoV2(HLERequestContext& ctx);
|
||||||
void GetProfileEditor(Kernel::HLERequestContext& ctx);
|
void GetProfileEditor(HLERequestContext& ctx);
|
||||||
void ListQualifiedUsers(Kernel::HLERequestContext& ctx);
|
void ListQualifiedUsers(HLERequestContext& ctx);
|
||||||
void ListOpenContextStoredUsers(Kernel::HLERequestContext& ctx);
|
void ListOpenContextStoredUsers(HLERequestContext& ctx);
|
||||||
void StoreSaveDataThumbnailApplication(Kernel::HLERequestContext& ctx);
|
void StoreSaveDataThumbnailApplication(HLERequestContext& ctx);
|
||||||
void StoreSaveDataThumbnailSystem(Kernel::HLERequestContext& ctx);
|
void StoreSaveDataThumbnailSystem(HLERequestContext& ctx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Result InitializeApplicationInfoBase();
|
Result InitializeApplicationInfoBase();
|
||||||
void StoreSaveDataThumbnail(Kernel::HLERequestContext& ctx, const Common::UUID& uuid,
|
void StoreSaveDataThumbnail(HLERequestContext& ctx, const Common::UUID& uuid,
|
||||||
const u64 tid);
|
const u64 tid);
|
||||||
|
|
||||||
enum class ApplicationType : u32_le {
|
enum class ApplicationType : u32_le {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/acc/async_context.h"
|
#include "core/hle/service/acc/async_context.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Account {
|
namespace Service::Account {
|
||||||
IAsyncContext::IAsyncContext(Core::System& system_)
|
IAsyncContext::IAsyncContext(Core::System& system_)
|
||||||
|
@ -27,7 +27,7 @@ IAsyncContext::~IAsyncContext() {
|
||||||
service_context.CloseEvent(completion_event);
|
service_context.CloseEvent(completion_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAsyncContext::GetSystemEvent(Kernel::HLERequestContext& ctx) {
|
void IAsyncContext::GetSystemEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -35,7 +35,7 @@ void IAsyncContext::GetSystemEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(completion_event->GetReadableEvent());
|
rb.PushCopyObjects(completion_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAsyncContext::Cancel(Kernel::HLERequestContext& ctx) {
|
void IAsyncContext::Cancel(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
Cancel();
|
Cancel();
|
||||||
|
@ -45,7 +45,7 @@ void IAsyncContext::Cancel(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAsyncContext::HasDone(Kernel::HLERequestContext& ctx) {
|
void IAsyncContext::HasDone(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
is_complete.store(IsComplete());
|
is_complete.store(IsComplete());
|
||||||
|
@ -55,7 +55,7 @@ void IAsyncContext::HasDone(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(is_complete.load());
|
rb.Push(is_complete.load());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAsyncContext::GetResult(Kernel::HLERequestContext& ctx) {
|
void IAsyncContext::GetResult(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ACC, "called");
|
LOG_DEBUG(Service_ACC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
|
@ -18,10 +18,10 @@ public:
|
||||||
explicit IAsyncContext(Core::System& system_);
|
explicit IAsyncContext(Core::System& system_);
|
||||||
~IAsyncContext() override;
|
~IAsyncContext() override;
|
||||||
|
|
||||||
void GetSystemEvent(Kernel::HLERequestContext& ctx);
|
void GetSystemEvent(HLERequestContext& ctx);
|
||||||
void Cancel(Kernel::HLERequestContext& ctx);
|
void Cancel(HLERequestContext& ctx);
|
||||||
void HasDone(Kernel::HLERequestContext& ctx);
|
void HasDone(HLERequestContext& ctx);
|
||||||
void GetResult(Kernel::HLERequestContext& ctx);
|
void GetResult(HLERequestContext& ctx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool IsComplete() const = 0;
|
virtual bool IsComplete() const = 0;
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
#include "core/file_sys/savedata_factory.h"
|
#include "core/file_sys/savedata_factory.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.h"
|
#include "core/hle/kernel/k_transfer_memory.h"
|
||||||
#include "core/hle/service/acc/profile_manager.h"
|
#include "core/hle/service/acc/profile_manager.h"
|
||||||
|
@ -29,8 +28,9 @@
|
||||||
#include "core/hle/service/bcat/backend/backend.h"
|
#include "core/hle/service/bcat/backend/backend.h"
|
||||||
#include "core/hle/service/caps/caps.h"
|
#include "core/hle/service/caps/caps.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/ns/ns.h"
|
#include "core/hle/service/ns/ns.h"
|
||||||
#include "core/hle/service/nvflinger/nvflinger.h"
|
#include "core/hle/service/nvnflinger/nvnflinger.h"
|
||||||
#include "core/hle/service/pm/pm.h"
|
#include "core/hle/service/pm/pm.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
|
@ -78,7 +78,7 @@ IWindowController::IWindowController(Core::System& system_)
|
||||||
|
|
||||||
IWindowController::~IWindowController() = default;
|
IWindowController::~IWindowController() = default;
|
||||||
|
|
||||||
void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) {
|
void IWindowController::GetAppletResourceUserId(HLERequestContext& ctx) {
|
||||||
const u64 process_id = system.ApplicationProcess()->GetProcessID();
|
const u64 process_id = system.ApplicationProcess()->GetProcessID();
|
||||||
|
|
||||||
LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id);
|
LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id);
|
||||||
|
@ -88,7 +88,7 @@ void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx)
|
||||||
rb.Push<u64>(process_id);
|
rb.Push<u64>(process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) {
|
void IWindowController::AcquireForegroundRights(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
@ -111,7 +111,7 @@ IAudioController::IAudioController(Core::System& system_)
|
||||||
|
|
||||||
IAudioController::~IAudioController() = default;
|
IAudioController::~IAudioController() = default;
|
||||||
|
|
||||||
void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::SetExpectedMasterVolume(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const float main_applet_volume_tmp = rp.Pop<float>();
|
const float main_applet_volume_tmp = rp.Pop<float>();
|
||||||
const float library_applet_volume_tmp = rp.Pop<float>();
|
const float library_applet_volume_tmp = rp.Pop<float>();
|
||||||
|
@ -128,21 +128,21 @@ void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::GetMainAppletExpectedMasterVolume(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume);
|
LOG_DEBUG(Service_AM, "called. main_applet_volume={}", main_applet_volume);
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(main_applet_volume);
|
rb.Push(main_applet_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::GetLibraryAppletExpectedMasterVolume(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume);
|
LOG_DEBUG(Service_AM, "called. library_applet_volume={}", library_applet_volume);
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(library_applet_volume);
|
rb.Push(library_applet_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::ChangeMainAppletMasterVolume(Kernel::HLERequestContext& ctx) {
|
void IAudioController::ChangeMainAppletMasterVolume(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
float volume;
|
float volume;
|
||||||
s64 fade_time_ns;
|
s64 fade_time_ns;
|
||||||
|
@ -162,7 +162,7 @@ void IAudioController::ChangeMainAppletMasterVolume(Kernel::HLERequestContext& c
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAudioController::SetTransparentAudioRate(Kernel::HLERequestContext& ctx) {
|
void IAudioController::SetTransparentAudioRate(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const float transparent_volume_rate_tmp = rp.Pop<float>();
|
const float transparent_volume_rate_tmp = rp.Pop<float>();
|
||||||
|
|
||||||
|
@ -251,10 +251,9 @@ IDebugFunctions::IDebugFunctions(Core::System& system_)
|
||||||
|
|
||||||
IDebugFunctions::~IDebugFunctions() = default;
|
IDebugFunctions::~IDebugFunctions() = default;
|
||||||
|
|
||||||
ISelfController::ISelfController(Core::System& system_, NVFlinger::NVFlinger& nvflinger_)
|
ISelfController::ISelfController(Core::System& system_, Nvnflinger::Nvnflinger& nvnflinger_)
|
||||||
: ServiceFramework{system_, "ISelfController"}, nvflinger{nvflinger_}, service_context{
|
: ServiceFramework{system_, "ISelfController"}, nvnflinger{nvnflinger_},
|
||||||
system,
|
service_context{system, "ISelfController"} {
|
||||||
"ISelfController"} {
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &ISelfController::Exit, "Exit"},
|
{0, &ISelfController::Exit, "Exit"},
|
||||||
|
@ -328,7 +327,7 @@ ISelfController::~ISelfController() {
|
||||||
service_context.CloseEvent(accumulated_suspended_tick_changed_event);
|
service_context.CloseEvent(accumulated_suspended_tick_changed_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::Exit(Kernel::HLERequestContext& ctx) {
|
void ISelfController::Exit(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -337,7 +336,7 @@ void ISelfController::Exit(Kernel::HLERequestContext& ctx) {
|
||||||
system.Exit();
|
system.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
|
void ISelfController::LockExit(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
system.SetExitLock(true);
|
system.SetExitLock(true);
|
||||||
|
@ -346,7 +345,7 @@ void ISelfController::LockExit(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
|
void ISelfController::UnlockExit(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
system.SetExitLock(false);
|
system.SetExitLock(false);
|
||||||
|
@ -355,7 +354,7 @@ void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) {
|
void ISelfController::EnterFatalSection(HLERequestContext& ctx) {
|
||||||
++num_fatal_sections_entered;
|
++num_fatal_sections_entered;
|
||||||
LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered);
|
LOG_DEBUG(Service_AM, "called. Num fatal sections entered: {}", num_fatal_sections_entered);
|
||||||
|
|
||||||
|
@ -363,7 +362,7 @@ void ISelfController::EnterFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) {
|
void ISelfController::LeaveFatalSection(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
// Entry and exit of fatal sections must be balanced.
|
// Entry and exit of fatal sections must be balanced.
|
||||||
|
@ -379,7 +378,7 @@ void ISelfController::LeaveFatalSection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetLibraryAppletLaunchableEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
launchable_event->Signal();
|
launchable_event->Signal();
|
||||||
|
@ -389,7 +388,7 @@ void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext&
|
||||||
rb.PushCopyObjects(launchable_event->GetReadableEvent());
|
rb.PushCopyObjects(launchable_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetScreenShotPermission(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto permission = rp.PopEnum<ScreenshotPermission>();
|
const auto permission = rp.PopEnum<ScreenshotPermission>();
|
||||||
LOG_DEBUG(Service_AM, "called, permission={}", permission);
|
LOG_DEBUG(Service_AM, "called, permission={}", permission);
|
||||||
|
@ -400,7 +399,7 @@ void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetOperationModeChangedNotification(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
bool flag = rp.Pop<bool>();
|
bool flag = rp.Pop<bool>();
|
||||||
|
@ -410,7 +409,7 @@ void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestCont
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetPerformanceModeChangedNotification(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
bool flag = rp.Pop<bool>();
|
bool flag = rp.Pop<bool>();
|
||||||
|
@ -420,7 +419,7 @@ void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestCo
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetFocusHandlingMode(HLERequestContext& ctx) {
|
||||||
// Takes 3 input u8s with each field located immediately after the previous
|
// Takes 3 input u8s with each field located immediately after the previous
|
||||||
// u8, these are bool flags. No output.
|
// u8, these are bool flags. No output.
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -439,14 +438,14 @@ void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetRestartMessageEnabled(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetOutOfFocusSuspendingEnabled(HLERequestContext& ctx) {
|
||||||
// Takes 3 input u8s with each field located immediately after the previous
|
// Takes 3 input u8s with each field located immediately after the previous
|
||||||
// u8, these are bool flags. No output.
|
// u8, these are bool flags. No output.
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -458,27 +457,27 @@ void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext&
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetAlbumImageOrientation(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetAlbumImageOrientation(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) {
|
void ISelfController::CreateManagedDisplayLayer(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
// TODO(Subv): Find out how AM determines the display to use, for now just
|
// TODO(Subv): Find out how AM determines the display to use, for now just
|
||||||
// create the layer in the Default display.
|
// create the layer in the Default display.
|
||||||
const auto display_id = nvflinger.OpenDisplay("Default");
|
const auto display_id = nvnflinger.OpenDisplay("Default");
|
||||||
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
const auto layer_id = nvnflinger.CreateLayer(*display_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*layer_id);
|
rb.Push(*layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx) {
|
void ISelfController::CreateManagedDisplaySeparableLayer(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
// TODO(Subv): Find out how AM determines the display to use, for now just
|
// TODO(Subv): Find out how AM determines the display to use, for now just
|
||||||
|
@ -488,22 +487,22 @@ void ISelfController::CreateManagedDisplaySeparableLayer(Kernel::HLERequestConte
|
||||||
// Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
|
// Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
|
||||||
// side effects.
|
// side effects.
|
||||||
// TODO: Support multiple layers
|
// TODO: Support multiple layers
|
||||||
const auto display_id = nvflinger.OpenDisplay("Default");
|
const auto display_id = nvnflinger.OpenDisplay("Default");
|
||||||
const auto layer_id = nvflinger.CreateLayer(*display_id);
|
const auto layer_id = nvnflinger.CreateLayer(*display_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(*layer_id);
|
rb.Push(*layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetHandlesRequestToDisplay(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetIdleTimeDetectionExtension(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
idle_time_detection_extension = rp.Pop<u32>();
|
idle_time_detection_extension = rp.Pop<u32>();
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called idle_time_detection_extension={}",
|
LOG_WARNING(Service_AM, "(STUBBED) called idle_time_detection_extension={}",
|
||||||
|
@ -513,7 +512,7 @@ void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& c
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetIdleTimeDetectionExtension(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -521,14 +520,14 @@ void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& c
|
||||||
rb.Push<u32>(idle_time_detection_extension);
|
rb.Push<u32>(idle_time_detection_extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::ReportUserIsActive(Kernel::HLERequestContext& ctx) {
|
void ISelfController::ReportUserIsActive(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetAutoSleepDisabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
is_auto_sleep_disabled = rp.Pop<bool>();
|
is_auto_sleep_disabled = rp.Pop<bool>();
|
||||||
|
|
||||||
|
@ -548,7 +547,7 @@ void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::IsAutoSleepDisabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -556,7 +555,7 @@ void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(is_auto_sleep_disabled);
|
rb.Push(is_auto_sleep_disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetAccumulatedSuspendedTickValue(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
// This command returns the total number of system ticks since ISelfController creation
|
// This command returns the total number of system ticks since ISelfController creation
|
||||||
|
@ -567,7 +566,7 @@ void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx) {
|
void ISelfController::GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -575,7 +574,7 @@ void ISelfController::GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequest
|
||||||
rb.PushCopyObjects(accumulated_suspended_tick_changed_event->GetReadableEvent());
|
rb.PushCopyObjects(accumulated_suspended_tick_changed_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
// This service call sets an internal flag whether a notification is shown when an image is
|
// This service call sets an internal flag whether a notification is shown when an image is
|
||||||
|
@ -590,7 +589,7 @@ void ISelfController::SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestCo
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SaveCurrentScreenshot(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SaveCurrentScreenshot(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>();
|
const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>();
|
||||||
|
@ -601,7 +600,7 @@ void ISelfController::SaveCurrentScreenshot(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISelfController::SetRecordVolumeMuted(Kernel::HLERequestContext& ctx) {
|
void ISelfController::SetRecordVolumeMuted(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto is_record_volume_muted = rp.Pop<bool>();
|
const auto is_record_volume_muted = rp.Pop<bool>();
|
||||||
|
@ -735,7 +734,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
|
||||||
|
|
||||||
ICommonStateGetter::~ICommonStateGetter() = default;
|
ICommonStateGetter::~ICommonStateGetter() = default;
|
||||||
|
|
||||||
void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetBootMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -743,7 +742,7 @@ void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode
|
rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetEventHandle(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -751,7 +750,7 @@ void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent());
|
rb.PushCopyObjects(msg_queue->GetMessageReceiveEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::ReceiveMessage(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
const auto message = msg_queue->PopMessage();
|
const auto message = msg_queue->PopMessage();
|
||||||
|
@ -768,7 +767,7 @@ void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum<AppletMessageQueue::AppletMessage>(message);
|
rb.PushEnum<AppletMessageQueue::AppletMessage>(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetCurrentFocusState(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "(STUBBED) called");
|
LOG_DEBUG(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -776,7 +775,7 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u8>(FocusState::InFocus));
|
rb.Push(static_cast<u8>(FocusState::InFocus));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::IsVrModeEnabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -784,7 +783,7 @@ void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(vr_mode_state);
|
rb.Push(vr_mode_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetVrModeEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
vr_mode_state = rp.Pop<bool>();
|
vr_mode_state = rp.Pop<bool>();
|
||||||
|
|
||||||
|
@ -794,7 +793,7 @@ void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetLcdBacklighOffEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto is_lcd_backlight_off_enabled = rp.Pop<bool>();
|
const auto is_lcd_backlight_off_enabled = rp.Pop<bool>();
|
||||||
|
|
||||||
|
@ -805,21 +804,21 @@ void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::BeginVrModeEx(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::BeginVrModeEx(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::EndVrModeEx(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::EndVrModeEx(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -827,7 +826,7 @@ void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLEReque
|
||||||
rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent());
|
rb.PushCopyObjects(msg_queue->GetOperationModeChangedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetDefaultDisplayResolution(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -842,7 +841,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetCpuBoostMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called, forwarding to APM:SYS");
|
LOG_DEBUG(Service_AM, "called, forwarding to APM:SYS");
|
||||||
|
|
||||||
const auto& sm = system.ServiceManager();
|
const auto& sm = system.ServiceManager();
|
||||||
|
@ -852,7 +851,7 @@ void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
apm_sys->SetCpuBoostMode(ctx);
|
apm_sys->SetCpuBoostMode(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto system_button{rp.PopEnum<SystemButtonType>()};
|
const auto system_button{rp.PopEnum<SystemButtonType>()};
|
||||||
|
|
||||||
|
@ -863,7 +862,7 @@ void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequest
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
|
void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
|
||||||
Kernel::HLERequestContext& ctx) {
|
HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -911,7 +910,7 @@ void IStorage::Register() {
|
||||||
|
|
||||||
IStorage::~IStorage() = default;
|
IStorage::~IStorage() = default;
|
||||||
|
|
||||||
void IStorage::Open(Kernel::HLERequestContext& ctx) {
|
void IStorage::Open(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -920,7 +919,7 @@ void IStorage::Open(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IStorageAccessor>(system, *this);
|
rb.PushIpcInterface<IStorageAccessor>(system, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) {
|
||||||
const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()};
|
const bool use_docked_mode{Settings::values.use_docked_mode.GetValue()};
|
||||||
LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode);
|
LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode);
|
||||||
|
|
||||||
|
@ -929,7 +928,7 @@ void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld));
|
rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::GetPerformanceMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -969,7 +968,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAppletStateChangedEvent(Kernel::HLERequestContext& ctx) {
|
void GetAppletStateChangedEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -977,7 +976,7 @@ private:
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetStateChangedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsCompleted(Kernel::HLERequestContext& ctx) {
|
void IsCompleted(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -985,21 +984,21 @@ private:
|
||||||
rb.Push<u32>(applet->TransactionComplete());
|
rb.Push<u32>(applet->TransactionComplete());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetResult(Kernel::HLERequestContext& ctx) {
|
void GetResult(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(applet->GetStatus());
|
rb.Push(applet->GetStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresetLibraryAppletGpuTimeSliceZero(Kernel::HLERequestContext& ctx) {
|
void PresetLibraryAppletGpuTimeSliceZero(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(Kernel::HLERequestContext& ctx) {
|
void Start(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
ASSERT(applet != nullptr);
|
ASSERT(applet != nullptr);
|
||||||
|
@ -1011,7 +1010,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PushInData(Kernel::HLERequestContext& ctx) {
|
void PushInData(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -1021,7 +1020,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopOutData(Kernel::HLERequestContext& ctx) {
|
void PopOutData(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
auto storage = applet->GetBroker().PopNormalDataToGame();
|
auto storage = applet->GetBroker().PopNormalDataToGame();
|
||||||
|
@ -1038,7 +1037,7 @@ private:
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PushInteractiveInData(Kernel::HLERequestContext& ctx) {
|
void PushInteractiveInData(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -1052,7 +1051,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopInteractiveOutData(Kernel::HLERequestContext& ctx) {
|
void PopInteractiveOutData(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
auto storage = applet->GetBroker().PopInteractiveDataToGame();
|
auto storage = applet->GetBroker().PopInteractiveDataToGame();
|
||||||
|
@ -1069,7 +1068,7 @@ private:
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPopOutDataEvent(Kernel::HLERequestContext& ctx) {
|
void GetPopOutDataEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1077,7 +1076,7 @@ private:
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetNormalDataEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPopInteractiveOutDataEvent(Kernel::HLERequestContext& ctx) {
|
void GetPopInteractiveOutDataEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1085,7 +1084,7 @@ private:
|
||||||
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent());
|
rb.PushCopyObjects(applet->GetBroker().GetInteractiveDataEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetIndirectLayerConsumerHandle(Kernel::HLERequestContext& ctx) {
|
void GetIndirectLayerConsumerHandle(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
// We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is
|
// We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is
|
||||||
|
@ -1115,7 +1114,7 @@ IStorageAccessor::IStorageAccessor(Core::System& system_, IStorage& backing_)
|
||||||
|
|
||||||
IStorageAccessor::~IStorageAccessor() = default;
|
IStorageAccessor::~IStorageAccessor() = default;
|
||||||
|
|
||||||
void IStorageAccessor::GetSize(Kernel::HLERequestContext& ctx) {
|
void IStorageAccessor::GetSize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -1124,7 +1123,7 @@ void IStorageAccessor::GetSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u64>(backing.GetSize()));
|
rb.Push(static_cast<u64>(backing.GetSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
|
void IStorageAccessor::Write(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 offset{rp.Pop<u64>()};
|
const u64 offset{rp.Pop<u64>()};
|
||||||
|
@ -1149,7 +1148,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
|
void IStorageAccessor::Read(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 offset{rp.Pop<u64>()};
|
const u64 offset{rp.Pop<u64>()};
|
||||||
|
@ -1187,7 +1186,7 @@ ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_)
|
||||||
|
|
||||||
ILibraryAppletCreator::~ILibraryAppletCreator() = default;
|
ILibraryAppletCreator::~ILibraryAppletCreator() = default;
|
||||||
|
|
||||||
void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) {
|
void ILibraryAppletCreator::CreateLibraryApplet(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto applet_id = rp.PopRaw<Applets::AppletId>();
|
const auto applet_id = rp.PopRaw<Applets::AppletId>();
|
||||||
|
@ -1213,7 +1212,7 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx)
|
||||||
rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet);
|
rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) {
|
void ILibraryAppletCreator::CreateStorage(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const s64 size{rp.Pop<s64>()};
|
const s64 size{rp.Pop<s64>()};
|
||||||
|
@ -1234,7 +1233,7 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(buffer));
|
rb.PushIpcInterface<IStorage>(system, std::move(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContext& ctx) {
|
void ILibraryAppletCreator::CreateTransferMemoryStorage(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
|
@ -1273,7 +1272,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
|
||||||
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
rb.PushIpcInterface<IStorage>(system, std::move(memory));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx) {
|
void ILibraryAppletCreator::CreateHandleStorage(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const s64 size{rp.Pop<s64>()};
|
const s64 size{rp.Pop<s64>()};
|
||||||
|
@ -1395,29 +1394,28 @@ IApplicationFunctions::~IApplicationFunctions() {
|
||||||
service_context.CloseEvent(health_warning_disappeared_system_event);
|
service_context.CloseEvent(health_warning_disappeared_system_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EnableApplicationCrashReport(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::EnableApplicationCrashReport(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(
|
void IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetApplicationCopyrightImage(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetApplicationCopyrightVisibility(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto is_visible = rp.Pop<bool>();
|
const auto is_visible = rp.Pop<bool>();
|
||||||
|
|
||||||
|
@ -1427,37 +1425,35 @@ void IApplicationFunctions::SetApplicationCopyrightVisibility(Kernel::HLERequest
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(
|
void IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(
|
void IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::BeginBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::BeginBlockingHomeButton(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::EndBlockingHomeButton(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::PopLaunchParameter(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto kind = rp.PopEnum<LaunchParameterKind>();
|
const auto kind = rp.PopEnum<LaunchParameterKind>();
|
||||||
|
|
||||||
|
@ -1509,15 +1505,14 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ERR_NO_DATA_IN_CHANNEL);
|
rb.Push(ERR_NO_DATA_IN_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest(
|
void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::EnsureSaveData(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
u128 user_id = rp.PopRaw<u128>();
|
u128 user_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
@ -1535,7 +1530,7 @@ void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetTerminateResult(HLERequestContext& ctx) {
|
||||||
// Takes an input u32 Result, no output.
|
// Takes an input u32 Result, no output.
|
||||||
// For example, in some cases official apps use this with error 0x2A2 then
|
// For example, in some cases official apps use this with error 0x2A2 then
|
||||||
// uses svcBreak.
|
// uses svcBreak.
|
||||||
|
@ -1548,7 +1543,7 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetDisplayVersion(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
std::array<u8, 0x10> version_string{};
|
std::array<u8, 0x10> version_string{};
|
||||||
|
@ -1582,7 +1577,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(version_string);
|
rb.PushRaw(version_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetDesiredLanguage(HLERequestContext& ctx) {
|
||||||
// TODO(bunnei): This should be configurable
|
// TODO(bunnei): This should be configurable
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
|
@ -1638,7 +1633,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(*res_code);
|
rb.Push(*res_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::IsGamePlayRecordingSupported(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
constexpr bool gameplay_recording_supported = false;
|
constexpr bool gameplay_recording_supported = false;
|
||||||
|
@ -1648,21 +1643,21 @@ void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestConte
|
||||||
rb.Push(gameplay_recording_supported);
|
rb.Push(gameplay_recording_supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::InitializeGamePlayRecording(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::SetGamePlayRecordingState(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::NotifyRunning(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -1670,7 +1665,7 @@ void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u8>(0); // Unknown, seems to be ignored by official processes
|
rb.Push<u8>(0); // Unknown, seems to be ignored by official processes
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetPseudoDeviceId(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
|
@ -1681,7 +1676,7 @@ void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::ExtendSaveData(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
FileSys::SaveDataType type;
|
FileSys::SaveDataType type;
|
||||||
u128 user_id;
|
u128 user_id;
|
||||||
|
@ -1710,7 +1705,7 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u64>(0);
|
rb.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetSaveDataSize(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
FileSys::SaveDataType type;
|
FileSys::SaveDataType type;
|
||||||
u128 user_id;
|
u128 user_id;
|
||||||
|
@ -1732,7 +1727,7 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(size.journal);
|
rb.Push(size.journal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -1740,7 +1735,7 @@ void IApplicationFunctions::QueryApplicationPlayStatistics(Kernel::HLERequestCon
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -1748,7 +1743,7 @@ void IApplicationFunctions::QueryApplicationPlayStatisticsByUid(Kernel::HLEReque
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::ExecuteProgram(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::ExecuteProgram(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -1762,21 +1757,21 @@ void IApplicationFunctions::ExecuteProgram(Kernel::HLERequestContext& ctx) {
|
||||||
system.ExecuteProgram(program_index);
|
system.ExecuteProgram(program_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::ClearUserChannel(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::ClearUserChannel(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::UnpopToUserChannel(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::UnpopToUserChannel(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetPreviousProgramIndex(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -1784,7 +1779,7 @@ void IApplicationFunctions::GetPreviousProgramIndex(Kernel::HLERequestContext& c
|
||||||
rb.Push<s32>(previous_program_index);
|
rb.Push<s32>(previous_program_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1792,7 +1787,7 @@ void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestCon
|
||||||
rb.PushCopyObjects(gpu_error_detected_event->GetReadableEvent());
|
rb.PushCopyObjects(gpu_error_detected_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1800,15 +1795,14 @@ void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERe
|
||||||
rb.PushCopyObjects(friend_invitation_storage_channel_event->GetReadableEvent());
|
rb.PushCopyObjects(friend_invitation_storage_channel_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(
|
void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ERR_NO_DATA_IN_CHANNEL);
|
rb.Push(ERR_NO_DATA_IN_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetNotificationStorageChannelEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1816,7 +1810,7 @@ void IApplicationFunctions::GetNotificationStorageChannelEvent(Kernel::HLEReques
|
||||||
rb.PushCopyObjects(notification_storage_channel_event->GetReadableEvent());
|
rb.PushCopyObjects(notification_storage_channel_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -1824,14 +1818,14 @@ void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERe
|
||||||
rb.PushCopyObjects(health_warning_disappeared_system_event->GetReadableEvent());
|
rb.PushCopyObjects(health_warning_disappeared_system_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::PrepareForJit(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::PrepareForJit(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system) {
|
void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system) {
|
||||||
auto message_queue = std::make_shared<AppletMessageQueue>(system);
|
auto message_queue = std::make_shared<AppletMessageQueue>(system);
|
||||||
// Needed on game boot
|
// Needed on game boot
|
||||||
message_queue->PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged);
|
message_queue->PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged);
|
||||||
|
@ -1839,9 +1833,9 @@ void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system) {
|
||||||
auto server_manager = std::make_unique<ServerManager>(system);
|
auto server_manager = std::make_unique<ServerManager>(system);
|
||||||
|
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService(
|
||||||
"appletAE", std::make_shared<AppletAE>(nvflinger, message_queue, system));
|
"appletAE", std::make_shared<AppletAE>(nvnflinger, message_queue, system));
|
||||||
server_manager->RegisterNamedService(
|
server_manager->RegisterNamedService(
|
||||||
"appletOE", std::make_shared<AppletOE>(nvflinger, message_queue, system));
|
"appletOE", std::make_shared<AppletOE>(nvnflinger, message_queue, system));
|
||||||
server_manager->RegisterNamedService("idle:sys", std::make_shared<IdleSys>(system));
|
server_manager->RegisterNamedService("idle:sys", std::make_shared<IdleSys>(system));
|
||||||
server_manager->RegisterNamedService("omm", std::make_shared<OMM>(system));
|
server_manager->RegisterNamedService("omm", std::make_shared<OMM>(system));
|
||||||
server_manager->RegisterNamedService("spsm", std::make_shared<SPSM>(system));
|
server_manager->RegisterNamedService("spsm", std::make_shared<SPSM>(system));
|
||||||
|
@ -1881,14 +1875,14 @@ IHomeMenuFunctions::~IHomeMenuFunctions() {
|
||||||
service_context.CloseEvent(pop_from_general_channel_event);
|
service_context.CloseEvent(pop_from_general_channel_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) {
|
void IHomeMenuFunctions::RequestToGetForeground(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) {
|
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
class KernelCore;
|
class KernelCore;
|
||||||
|
class KReadableEvent;
|
||||||
class KTransferMemory;
|
class KTransferMemory;
|
||||||
} // namespace Kernel
|
} // namespace Kernel
|
||||||
|
|
||||||
namespace Service::NVFlinger {
|
namespace Service::Nvnflinger {
|
||||||
class NVFlinger;
|
class Nvnflinger;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
|
@ -109,8 +110,8 @@ public:
|
||||||
~IWindowController() override;
|
~IWindowController() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAppletResourceUserId(Kernel::HLERequestContext& ctx);
|
void GetAppletResourceUserId(HLERequestContext& ctx);
|
||||||
void AcquireForegroundRights(Kernel::HLERequestContext& ctx);
|
void AcquireForegroundRights(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IAudioController final : public ServiceFramework<IAudioController> {
|
class IAudioController final : public ServiceFramework<IAudioController> {
|
||||||
|
@ -119,11 +120,11 @@ public:
|
||||||
~IAudioController() override;
|
~IAudioController() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
void SetExpectedMasterVolume(HLERequestContext& ctx);
|
||||||
void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
void GetMainAppletExpectedMasterVolume(HLERequestContext& ctx);
|
||||||
void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
void GetLibraryAppletExpectedMasterVolume(HLERequestContext& ctx);
|
||||||
void ChangeMainAppletMasterVolume(Kernel::HLERequestContext& ctx);
|
void ChangeMainAppletMasterVolume(HLERequestContext& ctx);
|
||||||
void SetTransparentAudioRate(Kernel::HLERequestContext& ctx);
|
void SetTransparentAudioRate(HLERequestContext& ctx);
|
||||||
|
|
||||||
static constexpr float min_allowed_volume = 0.0f;
|
static constexpr float min_allowed_volume = 0.0f;
|
||||||
static constexpr float max_allowed_volume = 1.0f;
|
static constexpr float max_allowed_volume = 1.0f;
|
||||||
|
@ -153,36 +154,36 @@ public:
|
||||||
|
|
||||||
class ISelfController final : public ServiceFramework<ISelfController> {
|
class ISelfController final : public ServiceFramework<ISelfController> {
|
||||||
public:
|
public:
|
||||||
explicit ISelfController(Core::System& system_, NVFlinger::NVFlinger& nvflinger_);
|
explicit ISelfController(Core::System& system_, Nvnflinger::Nvnflinger& nvnflinger_);
|
||||||
~ISelfController() override;
|
~ISelfController() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Exit(Kernel::HLERequestContext& ctx);
|
void Exit(HLERequestContext& ctx);
|
||||||
void LockExit(Kernel::HLERequestContext& ctx);
|
void LockExit(HLERequestContext& ctx);
|
||||||
void UnlockExit(Kernel::HLERequestContext& ctx);
|
void UnlockExit(HLERequestContext& ctx);
|
||||||
void EnterFatalSection(Kernel::HLERequestContext& ctx);
|
void EnterFatalSection(HLERequestContext& ctx);
|
||||||
void LeaveFatalSection(Kernel::HLERequestContext& ctx);
|
void LeaveFatalSection(HLERequestContext& ctx);
|
||||||
void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
|
void GetLibraryAppletLaunchableEvent(HLERequestContext& ctx);
|
||||||
void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
|
void SetScreenShotPermission(HLERequestContext& ctx);
|
||||||
void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx);
|
void SetOperationModeChangedNotification(HLERequestContext& ctx);
|
||||||
void SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx);
|
void SetPerformanceModeChangedNotification(HLERequestContext& ctx);
|
||||||
void SetFocusHandlingMode(Kernel::HLERequestContext& ctx);
|
void SetFocusHandlingMode(HLERequestContext& ctx);
|
||||||
void SetRestartMessageEnabled(Kernel::HLERequestContext& ctx);
|
void SetRestartMessageEnabled(HLERequestContext& ctx);
|
||||||
void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx);
|
void SetOutOfFocusSuspendingEnabled(HLERequestContext& ctx);
|
||||||
void SetAlbumImageOrientation(Kernel::HLERequestContext& ctx);
|
void SetAlbumImageOrientation(HLERequestContext& ctx);
|
||||||
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
|
void CreateManagedDisplayLayer(HLERequestContext& ctx);
|
||||||
void CreateManagedDisplaySeparableLayer(Kernel::HLERequestContext& ctx);
|
void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx);
|
||||||
void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
|
void SetHandlesRequestToDisplay(HLERequestContext& ctx);
|
||||||
void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
void SetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
||||||
void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
void GetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
||||||
void ReportUserIsActive(Kernel::HLERequestContext& ctx);
|
void ReportUserIsActive(HLERequestContext& ctx);
|
||||||
void SetAutoSleepDisabled(Kernel::HLERequestContext& ctx);
|
void SetAutoSleepDisabled(HLERequestContext& ctx);
|
||||||
void IsAutoSleepDisabled(Kernel::HLERequestContext& ctx);
|
void IsAutoSleepDisabled(HLERequestContext& ctx);
|
||||||
void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx);
|
void GetAccumulatedSuspendedTickValue(HLERequestContext& ctx);
|
||||||
void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx);
|
void GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx);
|
||||||
void SetAlbumImageTakenNotificationEnabled(Kernel::HLERequestContext& ctx);
|
void SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx);
|
||||||
void SaveCurrentScreenshot(Kernel::HLERequestContext& ctx);
|
void SaveCurrentScreenshot(HLERequestContext& ctx);
|
||||||
void SetRecordVolumeMuted(Kernel::HLERequestContext& ctx);
|
void SetRecordVolumeMuted(HLERequestContext& ctx);
|
||||||
|
|
||||||
enum class ScreenshotPermission : u32 {
|
enum class ScreenshotPermission : u32 {
|
||||||
Inherit = 0,
|
Inherit = 0,
|
||||||
|
@ -190,7 +191,7 @@ private:
|
||||||
Disable = 2,
|
Disable = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
||||||
|
@ -235,22 +236,22 @@ private:
|
||||||
CaptureButtonLongPressing,
|
CaptureButtonLongPressing,
|
||||||
};
|
};
|
||||||
|
|
||||||
void GetEventHandle(Kernel::HLERequestContext& ctx);
|
void GetEventHandle(HLERequestContext& ctx);
|
||||||
void ReceiveMessage(Kernel::HLERequestContext& ctx);
|
void ReceiveMessage(HLERequestContext& ctx);
|
||||||
void GetCurrentFocusState(Kernel::HLERequestContext& ctx);
|
void GetCurrentFocusState(HLERequestContext& ctx);
|
||||||
void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx);
|
void GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx);
|
||||||
void GetOperationMode(Kernel::HLERequestContext& ctx);
|
void GetOperationMode(HLERequestContext& ctx);
|
||||||
void GetPerformanceMode(Kernel::HLERequestContext& ctx);
|
void GetPerformanceMode(HLERequestContext& ctx);
|
||||||
void GetBootMode(Kernel::HLERequestContext& ctx);
|
void GetBootMode(HLERequestContext& ctx);
|
||||||
void IsVrModeEnabled(Kernel::HLERequestContext& ctx);
|
void IsVrModeEnabled(HLERequestContext& ctx);
|
||||||
void SetVrModeEnabled(Kernel::HLERequestContext& ctx);
|
void SetVrModeEnabled(HLERequestContext& ctx);
|
||||||
void SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx);
|
void SetLcdBacklighOffEnabled(HLERequestContext& ctx);
|
||||||
void BeginVrModeEx(Kernel::HLERequestContext& ctx);
|
void BeginVrModeEx(HLERequestContext& ctx);
|
||||||
void EndVrModeEx(Kernel::HLERequestContext& ctx);
|
void EndVrModeEx(HLERequestContext& ctx);
|
||||||
void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx);
|
void GetDefaultDisplayResolution(HLERequestContext& ctx);
|
||||||
void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
|
void SetCpuBoostMode(HLERequestContext& ctx);
|
||||||
void PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx);
|
void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx);
|
||||||
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx);
|
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
bool vr_mode_state{};
|
bool vr_mode_state{};
|
||||||
|
@ -283,7 +284,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Register();
|
void Register();
|
||||||
void Open(Kernel::HLERequestContext& ctx);
|
void Open(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<IStorageImpl> impl;
|
std::shared_ptr<IStorageImpl> impl;
|
||||||
};
|
};
|
||||||
|
@ -294,9 +295,9 @@ public:
|
||||||
~IStorageAccessor() override;
|
~IStorageAccessor() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetSize(Kernel::HLERequestContext& ctx);
|
void GetSize(HLERequestContext& ctx);
|
||||||
void Write(Kernel::HLERequestContext& ctx);
|
void Write(HLERequestContext& ctx);
|
||||||
void Read(Kernel::HLERequestContext& ctx);
|
void Read(HLERequestContext& ctx);
|
||||||
|
|
||||||
IStorage& backing;
|
IStorage& backing;
|
||||||
};
|
};
|
||||||
|
@ -307,10 +308,10 @@ public:
|
||||||
~ILibraryAppletCreator() override;
|
~ILibraryAppletCreator() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateLibraryApplet(Kernel::HLERequestContext& ctx);
|
void CreateLibraryApplet(HLERequestContext& ctx);
|
||||||
void CreateStorage(Kernel::HLERequestContext& ctx);
|
void CreateStorage(HLERequestContext& ctx);
|
||||||
void CreateTransferMemoryStorage(Kernel::HLERequestContext& ctx);
|
void CreateTransferMemoryStorage(HLERequestContext& ctx);
|
||||||
void CreateHandleStorage(Kernel::HLERequestContext& ctx);
|
void CreateHandleStorage(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
|
class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
|
||||||
|
@ -319,39 +320,39 @@ public:
|
||||||
~IApplicationFunctions() override;
|
~IApplicationFunctions() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void PopLaunchParameter(Kernel::HLERequestContext& ctx);
|
void PopLaunchParameter(HLERequestContext& ctx);
|
||||||
void CreateApplicationAndRequestToStartForQuest(Kernel::HLERequestContext& ctx);
|
void CreateApplicationAndRequestToStartForQuest(HLERequestContext& ctx);
|
||||||
void EnsureSaveData(Kernel::HLERequestContext& ctx);
|
void EnsureSaveData(HLERequestContext& ctx);
|
||||||
void SetTerminateResult(Kernel::HLERequestContext& ctx);
|
void SetTerminateResult(HLERequestContext& ctx);
|
||||||
void GetDisplayVersion(Kernel::HLERequestContext& ctx);
|
void GetDisplayVersion(HLERequestContext& ctx);
|
||||||
void GetDesiredLanguage(Kernel::HLERequestContext& ctx);
|
void GetDesiredLanguage(HLERequestContext& ctx);
|
||||||
void IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx);
|
void IsGamePlayRecordingSupported(HLERequestContext& ctx);
|
||||||
void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx);
|
void InitializeGamePlayRecording(HLERequestContext& ctx);
|
||||||
void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx);
|
void SetGamePlayRecordingState(HLERequestContext& ctx);
|
||||||
void NotifyRunning(Kernel::HLERequestContext& ctx);
|
void NotifyRunning(HLERequestContext& ctx);
|
||||||
void GetPseudoDeviceId(Kernel::HLERequestContext& ctx);
|
void GetPseudoDeviceId(HLERequestContext& ctx);
|
||||||
void ExtendSaveData(Kernel::HLERequestContext& ctx);
|
void ExtendSaveData(HLERequestContext& ctx);
|
||||||
void GetSaveDataSize(Kernel::HLERequestContext& ctx);
|
void GetSaveDataSize(HLERequestContext& ctx);
|
||||||
void BeginBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx);
|
void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
||||||
void EndBlockingHomeButtonShortAndLongPressed(Kernel::HLERequestContext& ctx);
|
void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
||||||
void BeginBlockingHomeButton(Kernel::HLERequestContext& ctx);
|
void BeginBlockingHomeButton(HLERequestContext& ctx);
|
||||||
void EndBlockingHomeButton(Kernel::HLERequestContext& ctx);
|
void EndBlockingHomeButton(HLERequestContext& ctx);
|
||||||
void EnableApplicationCrashReport(Kernel::HLERequestContext& ctx);
|
void EnableApplicationCrashReport(HLERequestContext& ctx);
|
||||||
void InitializeApplicationCopyrightFrameBuffer(Kernel::HLERequestContext& ctx);
|
void InitializeApplicationCopyrightFrameBuffer(HLERequestContext& ctx);
|
||||||
void SetApplicationCopyrightImage(Kernel::HLERequestContext& ctx);
|
void SetApplicationCopyrightImage(HLERequestContext& ctx);
|
||||||
void SetApplicationCopyrightVisibility(Kernel::HLERequestContext& ctx);
|
void SetApplicationCopyrightVisibility(HLERequestContext& ctx);
|
||||||
void QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx);
|
void QueryApplicationPlayStatistics(HLERequestContext& ctx);
|
||||||
void QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx);
|
void QueryApplicationPlayStatisticsByUid(HLERequestContext& ctx);
|
||||||
void ExecuteProgram(Kernel::HLERequestContext& ctx);
|
void ExecuteProgram(HLERequestContext& ctx);
|
||||||
void ClearUserChannel(Kernel::HLERequestContext& ctx);
|
void ClearUserChannel(HLERequestContext& ctx);
|
||||||
void UnpopToUserChannel(Kernel::HLERequestContext& ctx);
|
void UnpopToUserChannel(HLERequestContext& ctx);
|
||||||
void GetPreviousProgramIndex(Kernel::HLERequestContext& ctx);
|
void GetPreviousProgramIndex(HLERequestContext& ctx);
|
||||||
void GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx);
|
void GetGpuErrorDetectedSystemEvent(HLERequestContext& ctx);
|
||||||
void GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx);
|
void GetFriendInvitationStorageChannelEvent(HLERequestContext& ctx);
|
||||||
void TryPopFromFriendInvitationStorageChannel(Kernel::HLERequestContext& ctx);
|
void TryPopFromFriendInvitationStorageChannel(HLERequestContext& ctx);
|
||||||
void GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx);
|
void GetNotificationStorageChannelEvent(HLERequestContext& ctx);
|
||||||
void GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx);
|
void GetHealthWarningDisappearedSystemEvent(HLERequestContext& ctx);
|
||||||
void PrepareForJit(Kernel::HLERequestContext& ctx);
|
void PrepareForJit(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
||||||
|
@ -370,8 +371,8 @@ public:
|
||||||
~IHomeMenuFunctions() override;
|
~IHomeMenuFunctions() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RequestToGetForeground(Kernel::HLERequestContext& ctx);
|
void RequestToGetForeground(HLERequestContext& ctx);
|
||||||
void GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx);
|
void GetPopFromGeneralChannelEvent(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
||||||
|
@ -396,6 +397,6 @@ public:
|
||||||
~IProcessWindingController() override;
|
~IProcessWindingController() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system);
|
void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system);
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
|
|
@ -3,20 +3,20 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/am/am.h"
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applet_ae.h"
|
#include "core/hle/service/am/applet_ae.h"
|
||||||
#include "core/hle/service/nvflinger/nvflinger.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/nvnflinger/nvnflinger.h"
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
|
|
||||||
class ILibraryAppletProxy final : public ServiceFramework<ILibraryAppletProxy> {
|
class ILibraryAppletProxy final : public ServiceFramework<ILibraryAppletProxy> {
|
||||||
public:
|
public:
|
||||||
explicit ILibraryAppletProxy(NVFlinger::NVFlinger& nvflinger_,
|
explicit ILibraryAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
||||||
Core::System& system_)
|
Core::System& system_)
|
||||||
: ServiceFramework{system_, "ILibraryAppletProxy"}, nvflinger{nvflinger_},
|
: ServiceFramework{system_, "ILibraryAppletProxy"},
|
||||||
msg_queue{std::move(msg_queue_)} {
|
nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
{0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
||||||
|
@ -36,7 +36,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
|
void GetCommonStateGetter(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -44,15 +44,15 @@ private:
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSelfController(Kernel::HLERequestContext& ctx) {
|
void GetSelfController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvnflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowController(Kernel::HLERequestContext& ctx) {
|
void GetWindowController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -60,7 +60,7 @@ private:
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioController(Kernel::HLERequestContext& ctx) {
|
void GetAudioController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -68,7 +68,7 @@ private:
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDisplayController(Kernel::HLERequestContext& ctx) {
|
void GetDisplayController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -76,7 +76,7 @@ private:
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetProcessWindingController(Kernel::HLERequestContext& ctx) {
|
void GetProcessWindingController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
rb.PushIpcInterface<IProcessWindingController>(system);
|
rb.PushIpcInterface<IProcessWindingController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
|
void GetDebugFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
|
void GetLibraryAppletCreator(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -100,7 +100,7 @@ private:
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
|
void GetApplicationFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -108,17 +108,17 @@ private:
|
||||||
rb.PushIpcInterface<IApplicationFunctions>(system);
|
rb.PushIpcInterface<IApplicationFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ISystemAppletProxy final : public ServiceFramework<ISystemAppletProxy> {
|
class ISystemAppletProxy final : public ServiceFramework<ISystemAppletProxy> {
|
||||||
public:
|
public:
|
||||||
explicit ISystemAppletProxy(NVFlinger::NVFlinger& nvflinger_,
|
explicit ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
||||||
Core::System& system_)
|
Core::System& system_)
|
||||||
: ServiceFramework{system_, "ISystemAppletProxy"}, nvflinger{nvflinger_},
|
: ServiceFramework{system_, "ISystemAppletProxy"},
|
||||||
msg_queue{std::move(msg_queue_)} {
|
nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
{0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
|
void GetCommonStateGetter(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -148,15 +148,15 @@ private:
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSelfController(Kernel::HLERequestContext& ctx) {
|
void GetSelfController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvnflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowController(Kernel::HLERequestContext& ctx) {
|
void GetWindowController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -164,7 +164,7 @@ private:
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioController(Kernel::HLERequestContext& ctx) {
|
void GetAudioController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDisplayController(Kernel::HLERequestContext& ctx) {
|
void GetDisplayController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -180,7 +180,7 @@ private:
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
|
void GetDebugFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -188,7 +188,7 @@ private:
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
|
void GetLibraryAppletCreator(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -196,7 +196,7 @@ private:
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetHomeMenuFunctions(Kernel::HLERequestContext& ctx) {
|
void GetHomeMenuFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -204,7 +204,7 @@ private:
|
||||||
rb.PushIpcInterface<IHomeMenuFunctions>(system);
|
rb.PushIpcInterface<IHomeMenuFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetGlobalStateController(Kernel::HLERequestContext& ctx) {
|
void GetGlobalStateController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -212,7 +212,7 @@ private:
|
||||||
rb.PushIpcInterface<IGlobalStateController>(system);
|
rb.PushIpcInterface<IGlobalStateController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetApplicationCreator(Kernel::HLERequestContext& ctx) {
|
void GetApplicationCreator(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -220,38 +220,38 @@ private:
|
||||||
rb.PushIpcInterface<IApplicationCreator>(system);
|
rb.PushIpcInterface<IApplicationCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
void AppletAE::OpenSystemAppletProxy(Kernel::HLERequestContext& ctx) {
|
void AppletAE::OpenSystemAppletProxy(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISystemAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ISystemAppletProxy>(nvnflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) {
|
void AppletAE::OpenLibraryAppletProxy(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ILibraryAppletProxy>(nvnflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppletAE::OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx) {
|
void AppletAE::OpenLibraryAppletProxyOld(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<ILibraryAppletProxy>(nvnflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppletAE::AppletAE(NVFlinger::NVFlinger& nvflinger_, std::shared_ptr<AppletMessageQueue> msg_queue_,
|
AppletAE::AppletAE(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
Core::System& system_)
|
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_)
|
||||||
: ServiceFramework{system_, "appletAE"}, nvflinger{nvflinger_}, msg_queue{
|
: ServiceFramework{system_, "appletAE"}, nvnflinger{nvnflinger_}, msg_queue{
|
||||||
std::move(msg_queue_)} {
|
std::move(msg_queue_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{100, &AppletAE::OpenSystemAppletProxy, "OpenSystemAppletProxy"},
|
{100, &AppletAE::OpenSystemAppletProxy, "OpenSystemAppletProxy"},
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace FileSystem {
|
||||||
class FileSystemController;
|
class FileSystemController;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace NVFlinger {
|
namespace Nvnflinger {
|
||||||
class NVFlinger;
|
class Nvnflinger;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace AM {
|
namespace AM {
|
||||||
|
@ -22,18 +22,18 @@ class AppletMessageQueue;
|
||||||
|
|
||||||
class AppletAE final : public ServiceFramework<AppletAE> {
|
class AppletAE final : public ServiceFramework<AppletAE> {
|
||||||
public:
|
public:
|
||||||
explicit AppletAE(NVFlinger::NVFlinger& nvflinger_,
|
explicit AppletAE(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_);
|
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_);
|
||||||
~AppletAE() override;
|
~AppletAE() override;
|
||||||
|
|
||||||
const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const;
|
const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenSystemAppletProxy(Kernel::HLERequestContext& ctx);
|
void OpenSystemAppletProxy(HLERequestContext& ctx);
|
||||||
void OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx);
|
void OpenLibraryAppletProxy(HLERequestContext& ctx);
|
||||||
void OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx);
|
void OpenLibraryAppletProxyOld(HLERequestContext& ctx);
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/am/am.h"
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applet_oe.h"
|
#include "core/hle/service/am/applet_oe.h"
|
||||||
#include "core/hle/service/nvflinger/nvflinger.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/nvnflinger/nvnflinger.h"
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
|
|
||||||
class IApplicationProxy final : public ServiceFramework<IApplicationProxy> {
|
class IApplicationProxy final : public ServiceFramework<IApplicationProxy> {
|
||||||
public:
|
public:
|
||||||
explicit IApplicationProxy(NVFlinger::NVFlinger& nvflinger_,
|
explicit IApplicationProxy(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
std::shared_ptr<AppletMessageQueue> msg_queue_,
|
||||||
Core::System& system_)
|
Core::System& system_)
|
||||||
: ServiceFramework{system_, "IApplicationProxy"}, nvflinger{nvflinger_},
|
: ServiceFramework{system_, "IApplicationProxy"},
|
||||||
msg_queue{std::move(msg_queue_)} {
|
nvnflinger{nvnflinger_}, msg_queue{std::move(msg_queue_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
{0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"},
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAudioController(Kernel::HLERequestContext& ctx) {
|
void GetAudioController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -42,7 +42,7 @@ private:
|
||||||
rb.PushIpcInterface<IAudioController>(system);
|
rb.PushIpcInterface<IAudioController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDisplayController(Kernel::HLERequestContext& ctx) {
|
void GetDisplayController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -50,7 +50,7 @@ private:
|
||||||
rb.PushIpcInterface<IDisplayController>(system);
|
rb.PushIpcInterface<IDisplayController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
|
void GetDebugFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -58,7 +58,7 @@ private:
|
||||||
rb.PushIpcInterface<IDebugFunctions>(system);
|
rb.PushIpcInterface<IDebugFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowController(Kernel::HLERequestContext& ctx) {
|
void GetWindowController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -66,15 +66,15 @@ private:
|
||||||
rb.PushIpcInterface<IWindowController>(system);
|
rb.PushIpcInterface<IWindowController>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSelfController(Kernel::HLERequestContext& ctx) {
|
void GetSelfController(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<ISelfController>(system, nvflinger);
|
rb.PushIpcInterface<ISelfController>(system, nvnflinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
|
void GetCommonStateGetter(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -82,7 +82,7 @@ private:
|
||||||
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
rb.PushIpcInterface<ICommonStateGetter>(system, msg_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
|
void GetLibraryAppletCreator(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -90,7 +90,7 @@ private:
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
rb.PushIpcInterface<ILibraryAppletCreator>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
|
void GetApplicationFunctions(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -98,22 +98,22 @@ private:
|
||||||
rb.PushIpcInterface<IApplicationFunctions>(system);
|
rb.PushIpcInterface<IApplicationFunctions>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
|
void AppletOE::OpenApplicationProxy(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IApplicationProxy>(nvflinger, msg_queue, system);
|
rb.PushIpcInterface<IApplicationProxy>(nvnflinger, msg_queue, system);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppletOE::AppletOE(NVFlinger::NVFlinger& nvflinger_, std::shared_ptr<AppletMessageQueue> msg_queue_,
|
AppletOE::AppletOE(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
Core::System& system_)
|
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_)
|
||||||
: ServiceFramework{system_, "appletOE"}, nvflinger{nvflinger_}, msg_queue{
|
: ServiceFramework{system_, "appletOE"}, nvnflinger{nvnflinger_}, msg_queue{
|
||||||
std::move(msg_queue_)} {
|
std::move(msg_queue_)} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"},
|
{0, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"},
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace FileSystem {
|
||||||
class FileSystemController;
|
class FileSystemController;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace NVFlinger {
|
namespace Nvnflinger {
|
||||||
class NVFlinger;
|
class Nvnflinger;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace AM {
|
namespace AM {
|
||||||
|
@ -22,16 +22,16 @@ class AppletMessageQueue;
|
||||||
|
|
||||||
class AppletOE final : public ServiceFramework<AppletOE> {
|
class AppletOE final : public ServiceFramework<AppletOE> {
|
||||||
public:
|
public:
|
||||||
explicit AppletOE(NVFlinger::NVFlinger& nvflinger_,
|
explicit AppletOE(Nvnflinger::Nvnflinger& nvnflinger_,
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_);
|
std::shared_ptr<AppletMessageQueue> msg_queue_, Core::System& system_);
|
||||||
~AppletOE() override;
|
~AppletOE() override;
|
||||||
|
|
||||||
const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const;
|
const std::shared_ptr<AppletMessageQueue>& GetMessageQueue() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenApplicationProxy(Kernel::HLERequestContext& ctx);
|
void OpenApplicationProxy(HLERequestContext& ctx);
|
||||||
|
|
||||||
NVFlinger::NVFlinger& nvflinger;
|
Nvnflinger::Nvnflinger& nvnflinger;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
#include "core/file_sys/nca_metadata.h"
|
#include "core/file_sys/nca_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/aoc/aoc_u.h"
|
#include "core/hle/service/aoc/aoc_u.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetDefaultDeliveryTarget(Kernel::HLERequestContext& ctx) {
|
void SetDefaultDeliveryTarget(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto unknown_1 = rp.Pop<u64>();
|
const auto unknown_1 = rp.Pop<u64>();
|
||||||
|
@ -81,7 +81,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDeliveryTarget(Kernel::HLERequestContext& ctx) {
|
void SetDeliveryTarget(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto unknown_1 = rp.Pop<u64>();
|
const auto unknown_1 = rp.Pop<u64>();
|
||||||
|
@ -93,7 +93,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPurchasedEventReadableHandle(Kernel::HLERequestContext& ctx) {
|
void GetPurchasedEventReadableHandle(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "called");
|
LOG_WARNING(Service_AOC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -145,7 +145,7 @@ AOC_U::~AOC_U() {
|
||||||
service_context.CloseEvent(aoc_change_event);
|
service_context.CloseEvent(aoc_change_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::CountAddOnContent(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u64 process_id;
|
u64 process_id;
|
||||||
};
|
};
|
||||||
|
@ -172,7 +172,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
[current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); })));
|
[current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); })));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::ListAddOnContent(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 count;
|
u32 count;
|
||||||
|
@ -218,7 +218,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(out_count);
|
rb.Push(out_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
|
void AOC_U::GetAddOnContentBaseId(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u64 process_id;
|
u64 process_id;
|
||||||
};
|
};
|
||||||
|
@ -245,7 +245,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(res.first->GetDLCBaseTitleId());
|
rb.Push(res.first->GetDLCBaseTitleId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::PrepareAddOnContent(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
s32 addon_index;
|
s32 addon_index;
|
||||||
u64 process_id;
|
u64 process_id;
|
||||||
|
@ -262,7 +262,7 @@ void AOC_U::PrepareAddOnContent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::GetAddOnContentListChangedEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -270,7 +270,7 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
|
rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestContext& ctx) {
|
void AOC_U::GetAddOnContentListChangedEventWithProcessId(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -278,28 +278,28 @@ void AOC_U::GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestConte
|
||||||
rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
|
rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::NotifyMountAddOnContent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::NotifyMountAddOnContent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::NotifyUnmountAddOnContent(Kernel::HLERequestContext& ctx) {
|
void AOC_U::NotifyUnmountAddOnContent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::CheckAddOnContentMountStatus(Kernel::HLERequestContext& ctx) {
|
void AOC_U::CheckAddOnContentMountStatus(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {
|
void AOC_U::CreateEcPurchasedEventManager(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -307,7 +307,7 @@ void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
rb.PushIpcInterface<IPurchaseEventManager>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOC_U::CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {
|
void AOC_U::CreatePermanentEcPurchasedEventManager(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
LOG_WARNING(Service_AOC, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -22,17 +22,17 @@ public:
|
||||||
~AOC_U() override;
|
~AOC_U() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CountAddOnContent(Kernel::HLERequestContext& ctx);
|
void CountAddOnContent(HLERequestContext& ctx);
|
||||||
void ListAddOnContent(Kernel::HLERequestContext& ctx);
|
void ListAddOnContent(HLERequestContext& ctx);
|
||||||
void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx);
|
void GetAddOnContentBaseId(HLERequestContext& ctx);
|
||||||
void PrepareAddOnContent(Kernel::HLERequestContext& ctx);
|
void PrepareAddOnContent(HLERequestContext& ctx);
|
||||||
void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx);
|
void GetAddOnContentListChangedEvent(HLERequestContext& ctx);
|
||||||
void GetAddOnContentListChangedEventWithProcessId(Kernel::HLERequestContext& ctx);
|
void GetAddOnContentListChangedEventWithProcessId(HLERequestContext& ctx);
|
||||||
void NotifyMountAddOnContent(Kernel::HLERequestContext& ctx);
|
void NotifyMountAddOnContent(HLERequestContext& ctx);
|
||||||
void NotifyUnmountAddOnContent(Kernel::HLERequestContext& ctx);
|
void NotifyUnmountAddOnContent(HLERequestContext& ctx);
|
||||||
void CheckAddOnContentMountStatus(Kernel::HLERequestContext& ctx);
|
void CheckAddOnContentMountStatus(HLERequestContext& ctx);
|
||||||
void CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx);
|
void CreateEcPurchasedEventManager(HLERequestContext& ctx);
|
||||||
void CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx);
|
void CreatePermanentEcPurchasedEventManager(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::vector<u64> add_on_content;
|
std::vector<u64> add_on_content;
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/apm/apm.h"
|
#include "core/hle/service/apm/apm.h"
|
||||||
#include "core/hle/service/apm/apm_controller.h"
|
#include "core/hle/service/apm/apm_controller.h"
|
||||||
#include "core/hle/service/apm/apm_interface.h"
|
#include "core/hle/service/apm/apm_interface.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::APM {
|
namespace Service::APM {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
void SetPerformanceConfiguration(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto mode = rp.PopEnum<PerformanceMode>();
|
const auto mode = rp.PopEnum<PerformanceMode>();
|
||||||
|
@ -35,7 +35,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
void GetPerformanceConfiguration(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto mode = rp.PopEnum<PerformanceMode>();
|
const auto mode = rp.PopEnum<PerformanceMode>();
|
||||||
|
@ -46,7 +46,7 @@ private:
|
||||||
rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode));
|
rb.PushEnum(controller.GetCurrentPerformanceConfiguration(mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCpuOverclockEnabled(Kernel::HLERequestContext& ctx) {
|
void SetCpuOverclockEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto cpu_overclock_enabled = rp.Pop<bool>();
|
const auto cpu_overclock_enabled = rp.Pop<bool>();
|
||||||
|
@ -74,7 +74,7 @@ APM::APM(Core::System& system_, std::shared_ptr<Module> apm_, Controller& contro
|
||||||
|
|
||||||
APM::~APM() = default;
|
APM::~APM() = default;
|
||||||
|
|
||||||
void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
void APM::OpenSession(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -82,14 +82,14 @@ void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<ISession>(system, controller);
|
rb.PushIpcInterface<ISession>(system, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
void APM::GetPerformanceMode(Kernel::HLERequestContext& ctx) {
|
void APM::GetPerformanceMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.PushEnum(controller.GetCurrentPerformanceMode());
|
rb.PushEnum(controller.GetCurrentPerformanceMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void APM::IsCpuOverclockEnabled(Kernel::HLERequestContext& ctx) {
|
void APM::IsCpuOverclockEnabled(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_APM, "(STUBBED) called");
|
LOG_WARNING(Service_APM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -117,7 +117,7 @@ APM_Sys::APM_Sys(Core::System& system_, Controller& controller_)
|
||||||
|
|
||||||
APM_Sys::~APM_Sys() = default;
|
APM_Sys::~APM_Sys() = default;
|
||||||
|
|
||||||
void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) {
|
void APM_Sys::GetPerformanceEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -125,7 +125,7 @@ void APM_Sys::GetPerformanceEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<ISession>(system, controller);
|
rb.PushIpcInterface<ISession>(system, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
void APM_Sys::SetCpuBoostMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto mode = rp.PopEnum<CpuBoostMode>();
|
const auto mode = rp.PopEnum<CpuBoostMode>();
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ void APM_Sys::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void APM_Sys::GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx) {
|
void APM_Sys::GetCurrentPerformanceConfiguration(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_APM, "called");
|
LOG_DEBUG(Service_APM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
|
@ -17,9 +17,9 @@ public:
|
||||||
~APM() override;
|
~APM() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenSession(Kernel::HLERequestContext& ctx);
|
void OpenSession(HLERequestContext& ctx);
|
||||||
void GetPerformanceMode(Kernel::HLERequestContext& ctx);
|
void GetPerformanceMode(HLERequestContext& ctx);
|
||||||
void IsCpuOverclockEnabled(Kernel::HLERequestContext& ctx);
|
void IsCpuOverclockEnabled(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<Module> apm;
|
std::shared_ptr<Module> apm;
|
||||||
Controller& controller;
|
Controller& controller;
|
||||||
|
@ -30,11 +30,11 @@ public:
|
||||||
explicit APM_Sys(Core::System& system_, Controller& controller);
|
explicit APM_Sys(Core::System& system_, Controller& controller);
|
||||||
~APM_Sys() override;
|
~APM_Sys() override;
|
||||||
|
|
||||||
void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
|
void SetCpuBoostMode(HLERequestContext& ctx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetPerformanceEvent(Kernel::HLERequestContext& ctx);
|
void GetPerformanceEvent(HLERequestContext& ctx);
|
||||||
void GetCurrentPerformanceConfiguration(Kernel::HLERequestContext& ctx);
|
void GetCurrentPerformanceConfiguration(HLERequestContext& ctx);
|
||||||
|
|
||||||
Controller& controller;
|
Controller& controller;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/audio/audctl.h"
|
#include "core/hle/service/audio/audctl.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} {
|
||||||
|
|
||||||
AudCtl::~AudCtl() = default;
|
AudCtl::~AudCtl() = default;
|
||||||
|
|
||||||
void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) {
|
void AudCtl::GetTargetVolumeMin(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "called.");
|
LOG_DEBUG(Audio, "called.");
|
||||||
|
|
||||||
// This service function is currently hardcoded on the
|
// This service function is currently hardcoded on the
|
||||||
|
@ -84,7 +84,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(target_min_volume);
|
rb.Push(target_min_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) {
|
void AudCtl::GetTargetVolumeMax(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "called.");
|
LOG_DEBUG(Audio, "called.");
|
||||||
|
|
||||||
// This service function is currently hardcoded on the
|
// This service function is currently hardcoded on the
|
||||||
|
|
|
@ -17,8 +17,8 @@ public:
|
||||||
~AudCtl() override;
|
~AudCtl() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetTargetVolumeMin(Kernel::HLERequestContext& ctx);
|
void GetTargetVolumeMin(HLERequestContext& ctx);
|
||||||
void GetTargetVolumeMax(Kernel::HLERequestContext& ctx);
|
void GetTargetVolumeMax(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Audio
|
} // namespace Service::Audio
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/audio/audin_u.h"
|
#include "core/hle/service/audio/audin_u.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
using namespace AudioCore::AudioIn;
|
using namespace AudioCore::AudioIn;
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAudioInState(Kernel::HLERequestContext& ctx) {
|
void GetAudioInState(HLERequestContext& ctx) {
|
||||||
const auto state = static_cast<u32>(impl->GetState());
|
const auto state = static_cast<u32>(impl->GetState());
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. State={}", state);
|
LOG_DEBUG(Service_Audio, "called. State={}", state);
|
||||||
|
@ -71,7 +71,7 @@ private:
|
||||||
rb.Push(state);
|
rb.Push(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(Kernel::HLERequestContext& ctx) {
|
void Start(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto result = impl->StartSystem();
|
auto result = impl->StartSystem();
|
||||||
|
@ -80,7 +80,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop(Kernel::HLERequestContext& ctx) {
|
void Stop(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto result = impl->StopSystem();
|
auto result = impl->StopSystem();
|
||||||
|
@ -89,7 +89,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendAudioInBuffer(Kernel::HLERequestContext& ctx) {
|
void AppendAudioInBuffer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
u64 tag = rp.PopRaw<u64>();
|
u64 tag = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
|
void RegisterBufferEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto& buffer_event = impl->GetBufferEvent();
|
auto& buffer_event = impl->GetBufferEvent();
|
||||||
|
@ -121,7 +121,7 @@ private:
|
||||||
rb.PushCopyObjects(buffer_event);
|
rb.PushCopyObjects(buffer_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetReleasedAudioInBuffer(Kernel::HLERequestContext& ctx) {
|
void GetReleasedAudioInBuffer(HLERequestContext& ctx) {
|
||||||
const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>();
|
const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>();
|
||||||
std::vector<u64> released_buffers(write_buffer_size);
|
std::vector<u64> released_buffers(write_buffer_size);
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
rb.Push(count);
|
rb.Push(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainsAudioInBuffer(Kernel::HLERequestContext& ctx) {
|
void ContainsAudioInBuffer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 tag{rp.Pop<u64>()};
|
const u64 tag{rp.Pop<u64>()};
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
rb.Push(buffer_queued);
|
rb.Push(buffer_queued);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioInBufferCount(Kernel::HLERequestContext& ctx) {
|
void GetAudioInBufferCount(HLERequestContext& ctx) {
|
||||||
const auto buffer_count = impl->GetBufferCount();
|
const auto buffer_count = impl->GetBufferCount();
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count);
|
LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count);
|
||||||
|
@ -165,7 +165,7 @@ private:
|
||||||
rb.Push(buffer_count);
|
rb.Push(buffer_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDeviceGain(Kernel::HLERequestContext& ctx) {
|
void SetDeviceGain(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto volume{rp.Pop<f32>()};
|
const auto volume{rp.Pop<f32>()};
|
||||||
|
@ -177,7 +177,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDeviceGain(Kernel::HLERequestContext& ctx) {
|
void GetDeviceGain(HLERequestContext& ctx) {
|
||||||
auto volume{impl->GetVolume()};
|
auto volume{impl->GetVolume()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Gain {}", volume);
|
LOG_DEBUG(Service_Audio, "called. Gain {}", volume);
|
||||||
|
@ -187,7 +187,7 @@ private:
|
||||||
rb.Push(volume);
|
rb.Push(volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushAudioInBuffers(Kernel::HLERequestContext& ctx) {
|
void FlushAudioInBuffers(HLERequestContext& ctx) {
|
||||||
bool flushed{impl->FlushAudioInBuffers()};
|
bool flushed{impl->FlushAudioInBuffers()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed);
|
LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed);
|
||||||
|
@ -221,7 +221,7 @@ AudInU::AudInU(Core::System& system_)
|
||||||
|
|
||||||
AudInU::~AudInU() = default;
|
AudInU::~AudInU() = default;
|
||||||
|
|
||||||
void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) {
|
void AudInU::ListAudioIns(HLERequestContext& ctx) {
|
||||||
using namespace AudioCore::AudioRenderer;
|
using namespace AudioCore::AudioRenderer;
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
@ -241,7 +241,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(out_count);
|
rb.Push(out_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) {
|
void AudInU::ListAudioInsAutoFiltered(HLERequestContext& ctx) {
|
||||||
using namespace AudioCore::AudioRenderer;
|
using namespace AudioCore::AudioRenderer;
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
@ -261,7 +261,7 @@ void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(out_count);
|
rb.Push(out_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) {
|
void AudInU::OpenAudioIn(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto in_params{rp.PopRaw<AudioInParameter>()};
|
auto in_params{rp.PopRaw<AudioInParameter>()};
|
||||||
auto applet_resource_user_id{rp.PopRaw<u64>()};
|
auto applet_resource_user_id{rp.PopRaw<u64>()};
|
||||||
|
@ -311,7 +311,7 @@ void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IAudioIn>(audio_in);
|
rb.PushIpcInterface<IAudioIn>(audio_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) {
|
void AudInU::OpenAudioInProtocolSpecified(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto protocol_specified{rp.PopRaw<u64>()};
|
auto protocol_specified{rp.PopRaw<u64>()};
|
||||||
auto in_params{rp.PopRaw<AudioInParameter>()};
|
auto in_params{rp.PopRaw<AudioInParameter>()};
|
||||||
|
|
|
@ -12,10 +12,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace AudioCore::AudioOut {
|
namespace AudioCore::AudioOut {
|
||||||
class Manager;
|
class Manager;
|
||||||
class In;
|
class In;
|
||||||
|
@ -29,11 +25,11 @@ public:
|
||||||
~AudInU() override;
|
~AudInU() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ListAudioIns(Kernel::HLERequestContext& ctx);
|
void ListAudioIns(HLERequestContext& ctx);
|
||||||
void ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx);
|
void ListAudioInsAutoFiltered(HLERequestContext& ctx);
|
||||||
void OpenInOutImpl(Kernel::HLERequestContext& ctx);
|
void OpenInOutImpl(HLERequestContext& ctx);
|
||||||
void OpenAudioIn(Kernel::HLERequestContext& ctx);
|
void OpenAudioIn(HLERequestContext& ctx);
|
||||||
void OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx);
|
void OpenAudioInProtocolSpecified(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
std::unique_ptr<AudioCore::AudioIn::Manager> impl;
|
std::unique_ptr<AudioCore::AudioIn::Manager> impl;
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/audio/audout_u.h"
|
#include "core/hle/service/audio/audout_u.h"
|
||||||
#include "core/hle/service/audio/errors.h"
|
#include "core/hle/service/audio/errors.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
|
@ -67,7 +67,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAudioOutState(Kernel::HLERequestContext& ctx) {
|
void GetAudioOutState(HLERequestContext& ctx) {
|
||||||
const auto state = static_cast<u32>(impl->GetState());
|
const auto state = static_cast<u32>(impl->GetState());
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. State={}", state);
|
LOG_DEBUG(Service_Audio, "called. State={}", state);
|
||||||
|
@ -77,7 +77,7 @@ private:
|
||||||
rb.Push(state);
|
rb.Push(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(Kernel::HLERequestContext& ctx) {
|
void Start(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto result = impl->StartSystem();
|
auto result = impl->StartSystem();
|
||||||
|
@ -86,7 +86,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop(Kernel::HLERequestContext& ctx) {
|
void Stop(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto result = impl->StopSystem();
|
auto result = impl->StopSystem();
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) {
|
void AppendAudioOutBuffer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
u64 tag = rp.PopRaw<u64>();
|
u64 tag = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
|
void RegisterBufferEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto& buffer_event = impl->GetBufferEvent();
|
auto& buffer_event = impl->GetBufferEvent();
|
||||||
|
@ -127,7 +127,7 @@ private:
|
||||||
rb.PushCopyObjects(buffer_event);
|
rb.PushCopyObjects(buffer_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetReleasedAudioOutBuffers(Kernel::HLERequestContext& ctx) {
|
void GetReleasedAudioOutBuffers(HLERequestContext& ctx) {
|
||||||
const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>();
|
const auto write_buffer_size = ctx.GetWriteBufferNumElements<u64>();
|
||||||
std::vector<u64> released_buffers(write_buffer_size);
|
std::vector<u64> released_buffers(write_buffer_size);
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ private:
|
||||||
rb.Push(count);
|
rb.Push(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainsAudioOutBuffer(Kernel::HLERequestContext& ctx) {
|
void ContainsAudioOutBuffer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const u64 tag{rp.Pop<u64>()};
|
const u64 tag{rp.Pop<u64>()};
|
||||||
|
@ -160,7 +160,7 @@ private:
|
||||||
rb.Push(buffer_queued);
|
rb.Push(buffer_queued);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioOutBufferCount(Kernel::HLERequestContext& ctx) {
|
void GetAudioOutBufferCount(HLERequestContext& ctx) {
|
||||||
const auto buffer_count = impl->GetBufferCount();
|
const auto buffer_count = impl->GetBufferCount();
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count);
|
LOG_DEBUG(Service_Audio, "called. Buffer count={}", buffer_count);
|
||||||
|
@ -171,7 +171,7 @@ private:
|
||||||
rb.Push(buffer_count);
|
rb.Push(buffer_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioOutPlayedSampleCount(Kernel::HLERequestContext& ctx) {
|
void GetAudioOutPlayedSampleCount(HLERequestContext& ctx) {
|
||||||
const auto samples_played = impl->GetPlayedSampleCount();
|
const auto samples_played = impl->GetPlayedSampleCount();
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Played samples={}", samples_played);
|
LOG_DEBUG(Service_Audio, "called. Played samples={}", samples_played);
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
rb.Push(samples_played);
|
rb.Push(samples_played);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushAudioOutBuffers(Kernel::HLERequestContext& ctx) {
|
void FlushAudioOutBuffers(HLERequestContext& ctx) {
|
||||||
bool flushed{impl->FlushAudioOutBuffers()};
|
bool flushed{impl->FlushAudioOutBuffers()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed);
|
LOG_DEBUG(Service_Audio, "called. Were any buffers flushed? {}", flushed);
|
||||||
|
@ -192,7 +192,7 @@ private:
|
||||||
rb.Push(flushed);
|
rb.Push(flushed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAudioOutVolume(Kernel::HLERequestContext& ctx) {
|
void SetAudioOutVolume(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto volume = rp.Pop<f32>();
|
const auto volume = rp.Pop<f32>();
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioOutVolume(Kernel::HLERequestContext& ctx) {
|
void GetAudioOutVolume(HLERequestContext& ctx) {
|
||||||
const auto volume = impl->GetVolume();
|
const auto volume = impl->GetVolume();
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Volume={}", volume);
|
LOG_DEBUG(Service_Audio, "called. Volume={}", volume);
|
||||||
|
@ -236,7 +236,7 @@ AudOutU::AudOutU(Core::System& system_)
|
||||||
|
|
||||||
AudOutU::~AudOutU() = default;
|
AudOutU::~AudOutU() = default;
|
||||||
|
|
||||||
void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
|
void AudOutU::ListAudioOuts(HLERequestContext& ctx) {
|
||||||
using namespace AudioCore::AudioRenderer;
|
using namespace AudioCore::AudioRenderer;
|
||||||
|
|
||||||
std::scoped_lock l{impl->mutex};
|
std::scoped_lock l{impl->mutex};
|
||||||
|
@ -258,7 +258,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u32>(static_cast<u32>(device_names.size()));
|
rb.Push<u32>(static_cast<u32>(device_names.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) {
|
void AudOutU::OpenAudioOut(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto in_params{rp.PopRaw<AudioOutParameter>()};
|
auto in_params{rp.PopRaw<AudioOutParameter>()};
|
||||||
auto applet_resource_user_id{rp.PopRaw<u64>()};
|
auto applet_resource_user_id{rp.PopRaw<u64>()};
|
||||||
|
|
|
@ -12,10 +12,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace AudioCore::AudioOut {
|
namespace AudioCore::AudioOut {
|
||||||
class Manager;
|
class Manager;
|
||||||
class Out;
|
class Out;
|
||||||
|
@ -31,8 +27,8 @@ public:
|
||||||
~AudOutU() override;
|
~AudOutU() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ListAudioOuts(Kernel::HLERequestContext& ctx);
|
void ListAudioOuts(HLERequestContext& ctx);
|
||||||
void OpenAudioOut(Kernel::HLERequestContext& ctx);
|
void OpenAudioOut(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
std::unique_ptr<AudioCore::AudioOut::Manager> impl;
|
std::unique_ptr<AudioCore::AudioOut::Manager> impl;
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
#include "common/polyfill_ranges.h"
|
#include "common/polyfill_ranges.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/kernel/k_process.h"
|
#include "core/hle/kernel/k_process.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.h"
|
#include "core/hle/kernel/k_transfer_memory.h"
|
||||||
#include "core/hle/service/audio/audren_u.h"
|
#include "core/hle/service/audio/audren_u.h"
|
||||||
#include "core/hle/service/audio/errors.h"
|
#include "core/hle/service/audio/errors.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
using namespace AudioCore::AudioRenderer;
|
using namespace AudioCore::AudioRenderer;
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetSampleRate(Kernel::HLERequestContext& ctx) {
|
void GetSampleRate(HLERequestContext& ctx) {
|
||||||
const auto sample_rate{impl->GetSystem().GetSampleRate()};
|
const auto sample_rate{impl->GetSystem().GetSampleRate()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Sample rate {}", sample_rate);
|
LOG_DEBUG(Service_Audio, "called. Sample rate {}", sample_rate);
|
||||||
|
@ -78,7 +78,7 @@ private:
|
||||||
rb.Push(sample_rate);
|
rb.Push(sample_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSampleCount(Kernel::HLERequestContext& ctx) {
|
void GetSampleCount(HLERequestContext& ctx) {
|
||||||
const auto sample_count{impl->GetSystem().GetSampleCount()};
|
const auto sample_count{impl->GetSystem().GetSampleCount()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called. Sample count {}", sample_count);
|
LOG_DEBUG(Service_Audio, "called. Sample count {}", sample_count);
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
rb.Push(sample_count);
|
rb.Push(sample_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetState(Kernel::HLERequestContext& ctx) {
|
void GetState(HLERequestContext& ctx) {
|
||||||
const u32 state{!impl->GetSystem().IsActive()};
|
const u32 state{!impl->GetSystem().IsActive()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_Audio, "called, state {}", state);
|
LOG_DEBUG(Service_Audio, "called, state {}", state);
|
||||||
|
@ -98,7 +98,7 @@ private:
|
||||||
rb.Push(state);
|
rb.Push(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetMixBufferCount(Kernel::HLERequestContext& ctx) {
|
void GetMixBufferCount(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
const auto buffer_count{impl->GetSystem().GetMixBufferCount()};
|
const auto buffer_count{impl->GetSystem().GetMixBufferCount()};
|
||||||
|
@ -108,7 +108,7 @@ private:
|
||||||
rb.Push(buffer_count);
|
rb.Push(buffer_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestUpdate(Kernel::HLERequestContext& ctx) {
|
void RequestUpdate(HLERequestContext& ctx) {
|
||||||
LOG_TRACE(Service_Audio, "called");
|
LOG_TRACE(Service_Audio, "called");
|
||||||
|
|
||||||
const auto input{ctx.ReadBuffer(0)};
|
const auto input{ctx.ReadBuffer(0)};
|
||||||
|
@ -147,7 +147,7 @@ private:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(Kernel::HLERequestContext& ctx) {
|
void Start(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
impl->Start();
|
impl->Start();
|
||||||
|
@ -156,7 +156,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop(Kernel::HLERequestContext& ctx) {
|
void Stop(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
impl->Stop();
|
impl->Stop();
|
||||||
|
@ -165,7 +165,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuerySystemEvent(Kernel::HLERequestContext& ctx) {
|
void QuerySystemEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
if (impl->GetSystem().GetExecutionMode() == AudioCore::ExecutionMode::Manual) {
|
if (impl->GetSystem().GetExecutionMode() == AudioCore::ExecutionMode::Manual) {
|
||||||
|
@ -179,7 +179,7 @@ private:
|
||||||
rb.PushCopyObjects(rendered_event->GetReadableEvent());
|
rb.PushCopyObjects(rendered_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
|
void SetRenderingTimeLimit(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -192,7 +192,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) {
|
void GetRenderingTimeLimit(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto& system_ = impl->GetSystem();
|
auto& system_ = impl->GetSystem();
|
||||||
|
@ -203,11 +203,11 @@ private:
|
||||||
rb.Push(time);
|
rb.Push(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteAudioRendererRendering(Kernel::HLERequestContext& ctx) {
|
void ExecuteAudioRendererRendering(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetVoiceDropParameter(Kernel::HLERequestContext& ctx) {
|
void SetVoiceDropParameter(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -220,7 +220,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetVoiceDropParameter(Kernel::HLERequestContext& ctx) {
|
void GetVoiceDropParameter(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
auto& system_ = impl->GetSystem();
|
auto& system_ = impl->GetSystem();
|
||||||
|
@ -271,7 +271,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ListAudioDeviceName(Kernel::HLERequestContext& ctx) {
|
void ListAudioDeviceName(HLERequestContext& ctx) {
|
||||||
const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>();
|
const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>();
|
||||||
|
|
||||||
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
||||||
|
@ -299,7 +299,7 @@ private:
|
||||||
rb.Push(out_count);
|
rb.Push(out_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) {
|
void SetAudioDeviceOutputVolume(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const f32 volume = rp.Pop<f32>();
|
const f32 volume = rp.Pop<f32>();
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) {
|
void GetAudioDeviceOutputVolume(HLERequestContext& ctx) {
|
||||||
const auto device_name_buffer = ctx.ReadBuffer();
|
const auto device_name_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(device_name_buffer);
|
const std::string name = Common::StringFromBuffer(device_name_buffer);
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ private:
|
||||||
rb.Push(volume);
|
rb.Push(volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) {
|
void GetActiveAudioDeviceName(HLERequestContext& ctx) {
|
||||||
const auto write_size = ctx.GetWriteBufferSize();
|
const auto write_size = ctx.GetWriteBufferSize();
|
||||||
std::string out_name{"AudioTvOutput"};
|
std::string out_name{"AudioTvOutput"};
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) {
|
void QueryAudioDeviceSystemEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "(STUBBED) called");
|
LOG_DEBUG(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
event->Signal();
|
event->Signal();
|
||||||
|
@ -356,7 +356,7 @@ private:
|
||||||
rb.PushCopyObjects(event->GetReadableEvent());
|
rb.PushCopyObjects(event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetActiveChannelCount(Kernel::HLERequestContext& ctx) {
|
void GetActiveChannelCount(HLERequestContext& ctx) {
|
||||||
const auto& sink{system.AudioCore().GetOutputSink()};
|
const auto& sink{system.AudioCore().GetOutputSink()};
|
||||||
u32 channel_count{sink.GetDeviceChannels()};
|
u32 channel_count{sink.GetDeviceChannels()};
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ private:
|
||||||
rb.Push<u32>(channel_count);
|
rb.Push<u32>(channel_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryAudioDeviceInputEvent(Kernel::HLERequestContext& ctx) {
|
void QueryAudioDeviceInputEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "(STUBBED) called");
|
LOG_DEBUG(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -376,7 +376,7 @@ private:
|
||||||
rb.PushCopyObjects(event->GetReadableEvent());
|
rb.PushCopyObjects(event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueryAudioDeviceOutputEvent(Kernel::HLERequestContext& ctx) {
|
void QueryAudioDeviceOutputEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -384,7 +384,7 @@ private:
|
||||||
rb.PushCopyObjects(event->GetReadableEvent());
|
rb.PushCopyObjects(event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListAudioOutputDeviceName(Kernel::HLERequestContext& ctx) {
|
void ListAudioOutputDeviceName(HLERequestContext& ctx) {
|
||||||
const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>();
|
const size_t in_count = ctx.GetWriteBufferNumElements<AudioDevice::AudioDeviceName>();
|
||||||
|
|
||||||
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
||||||
|
@ -435,7 +435,7 @@ AudRenU::AudRenU(Core::System& system_)
|
||||||
|
|
||||||
AudRenU::~AudRenU() = default;
|
AudRenU::~AudRenU() = default;
|
||||||
|
|
||||||
void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) {
|
void AudRenU::OpenAudioRenderer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
AudioCore::AudioRendererParameterInternal params;
|
AudioCore::AudioRendererParameterInternal params;
|
||||||
|
@ -475,7 +475,7 @@ void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) {
|
||||||
applet_resource_user_id, session_id);
|
applet_resource_user_id, session_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
void AudRenU::GetWorkBufferSize(HLERequestContext& ctx) {
|
||||||
AudioCore::AudioRendererParameterInternal params;
|
AudioCore::AudioRendererParameterInternal params;
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -506,7 +506,7 @@ void AudRenU::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u64>(size);
|
rb.Push<u64>(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) {
|
void AudRenU::GetAudioDeviceService(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto applet_resource_user_id = rp.Pop<u64>();
|
const auto applet_resource_user_id = rp.Pop<u64>();
|
||||||
|
@ -520,11 +520,11 @@ void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) {
|
||||||
::Common::MakeMagic('R', 'E', 'V', '1'), num_audio_devices++);
|
::Common::MakeMagic('R', 'E', 'V', '1'), num_audio_devices++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudRenU::OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx) {
|
void AudRenU::OpenAudioRendererForManualExecution(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Audio, "called");
|
LOG_DEBUG(Service_Audio, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx) {
|
void AudRenU::GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 revision;
|
u32 revision;
|
||||||
u64 applet_resource_user_id;
|
u64 applet_resource_user_id;
|
||||||
|
|
|
@ -11,10 +11,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
class IAudioRenderer;
|
class IAudioRenderer;
|
||||||
|
|
||||||
|
@ -24,11 +20,11 @@ public:
|
||||||
~AudRenU() override;
|
~AudRenU() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenAudioRenderer(Kernel::HLERequestContext& ctx);
|
void OpenAudioRenderer(HLERequestContext& ctx);
|
||||||
void GetWorkBufferSize(Kernel::HLERequestContext& ctx);
|
void GetWorkBufferSize(HLERequestContext& ctx);
|
||||||
void GetAudioDeviceService(Kernel::HLERequestContext& ctx);
|
void GetAudioDeviceService(HLERequestContext& ctx);
|
||||||
void OpenAudioRendererForManualExecution(Kernel::HLERequestContext& ctx);
|
void OpenAudioRendererForManualExecution(HLERequestContext& ctx);
|
||||||
void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx);
|
void GetAudioDeviceServiceWithRevisionInfo(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
std::unique_ptr<AudioCore::AudioRenderer::Manager> impl;
|
std::unique_ptr<AudioCore::AudioRenderer::Manager> impl;
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/audio/hwopus.h"
|
#include "core/hle/service/audio/hwopus.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
|
|
||||||
// Decodes interleaved Opus packets. Optionally allows reporting time taken to
|
// Decodes interleaved Opus packets. Optionally allows reporting time taken to
|
||||||
// perform the decoding, as well as any relevant extra behavior.
|
// perform the decoding, as well as any relevant extra behavior.
|
||||||
void DecodeInterleaved(Kernel::HLERequestContext& ctx, PerfTime perf_time,
|
void DecodeInterleaved(HLERequestContext& ctx, PerfTime perf_time,
|
||||||
ExtraBehavior extra_behavior) {
|
ExtraBehavior extra_behavior) {
|
||||||
if (perf_time == PerfTime::Disabled) {
|
if (perf_time == PerfTime::Disabled) {
|
||||||
DecodeInterleavedHelper(ctx, nullptr, extra_behavior);
|
DecodeInterleavedHelper(ctx, nullptr, extra_behavior);
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DecodeInterleavedHelper(Kernel::HLERequestContext& ctx, u64* performance,
|
void DecodeInterleavedHelper(HLERequestContext& ctx, u64* performance,
|
||||||
ExtraBehavior extra_behavior) {
|
ExtraBehavior extra_behavior) {
|
||||||
u32 consumed = 0;
|
u32 consumed = 0;
|
||||||
u32 sample_count = 0;
|
u32 sample_count = 0;
|
||||||
|
@ -180,21 +180,21 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DecodeInterleavedOld(Kernel::HLERequestContext& ctx) {
|
void DecodeInterleavedOld(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "called");
|
LOG_DEBUG(Audio, "called");
|
||||||
|
|
||||||
decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Disabled,
|
decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Disabled,
|
||||||
OpusDecoderState::ExtraBehavior::None);
|
OpusDecoderState::ExtraBehavior::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecodeInterleavedWithPerfOld(Kernel::HLERequestContext& ctx) {
|
void DecodeInterleavedWithPerfOld(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "called");
|
LOG_DEBUG(Audio, "called");
|
||||||
|
|
||||||
decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Enabled,
|
decoder_state.DecodeInterleaved(ctx, OpusDecoderState::PerfTime::Enabled,
|
||||||
OpusDecoderState::ExtraBehavior::None);
|
OpusDecoderState::ExtraBehavior::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecodeInterleaved(Kernel::HLERequestContext& ctx) {
|
void DecodeInterleaved(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Audio, "called");
|
LOG_DEBUG(Audio, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -231,7 +231,7 @@ std::array<u8, 2> CreateMappingTable(u32 channel_count) {
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
void HwOpus::GetWorkBufferSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto sample_rate = rp.Pop<u32>();
|
const auto sample_rate = rp.Pop<u32>();
|
||||||
const auto channel_count = rp.Pop<u32>();
|
const auto channel_count = rp.Pop<u32>();
|
||||||
|
@ -251,11 +251,11 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u32>(worker_buffer_sz);
|
rb.Push<u32>(worker_buffer_sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HwOpus::GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx) {
|
void HwOpus::GetWorkBufferSizeEx(HLERequestContext& ctx) {
|
||||||
GetWorkBufferSize(ctx);
|
GetWorkBufferSize(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) {
|
void HwOpus::GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx) {
|
||||||
OpusMultiStreamParametersEx param;
|
OpusMultiStreamParametersEx param;
|
||||||
std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize());
|
std::memcpy(¶m, ctx.ReadBuffer().data(), ctx.GetReadBufferSize());
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ void HwOpus::GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push<u32>(worker_buffer_sz);
|
rb.Push<u32>(worker_buffer_sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) {
|
void HwOpus::OpenHardwareOpusDecoder(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto sample_rate = rp.Pop<u32>();
|
const auto sample_rate = rp.Pop<u32>();
|
||||||
const auto channel_count = rp.Pop<u32>();
|
const auto channel_count = rp.Pop<u32>();
|
||||||
|
@ -319,7 +319,7 @@ void HwOpus::OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx) {
|
||||||
system, OpusDecoderState{std::move(decoder), sample_rate, channel_count});
|
system, OpusDecoderState{std::move(decoder), sample_rate, channel_count});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HwOpus::OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx) {
|
void HwOpus::OpenHardwareOpusDecoderEx(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto sample_rate = rp.Pop<u32>();
|
const auto sample_rate = rp.Pop<u32>();
|
||||||
const auto channel_count = rp.Pop<u32>();
|
const auto channel_count = rp.Pop<u32>();
|
||||||
|
|
|
@ -27,11 +27,11 @@ public:
|
||||||
~HwOpus() override;
|
~HwOpus() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenHardwareOpusDecoder(Kernel::HLERequestContext& ctx);
|
void OpenHardwareOpusDecoder(HLERequestContext& ctx);
|
||||||
void OpenHardwareOpusDecoderEx(Kernel::HLERequestContext& ctx);
|
void OpenHardwareOpusDecoderEx(HLERequestContext& ctx);
|
||||||
void GetWorkBufferSize(Kernel::HLERequestContext& ctx);
|
void GetWorkBufferSize(HLERequestContext& ctx);
|
||||||
void GetWorkBufferSizeEx(Kernel::HLERequestContext& ctx);
|
void GetWorkBufferSizeEx(HLERequestContext& ctx);
|
||||||
void GetWorkBufferSizeForMultiStreamEx(Kernel::HLERequestContext& ctx);
|
void GetWorkBufferSizeForMultiStreamEx(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Audio
|
} // namespace Service::Audio
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/file_sys/vfs.h"
|
#include "core/file_sys/vfs.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_readable_event.h"
|
#include "core/hle/kernel/k_readable_event.h"
|
||||||
#include "core/hle/service/bcat/backend/backend.h"
|
#include "core/hle/service/bcat/backend/backend.h"
|
||||||
#include "core/hle/service/bcat/bcat.h"
|
#include "core/hle/service/bcat/bcat.h"
|
||||||
#include "core/hle/service/bcat/bcat_module.h"
|
#include "core/hle/service/bcat/bcat_module.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
|
||||||
namespace Service::BCAT {
|
namespace Service::BCAT {
|
||||||
|
@ -51,8 +51,7 @@ BCATDigest DigestFile(const FileSys::VirtualFile& file) {
|
||||||
// For a name to be valid it must be non-empty, must have a null terminating character as the final
|
// For a name to be valid it must be non-empty, must have a null terminating character as the final
|
||||||
// char, can only contain numbers, letters, underscores and a hyphen if directory and a period if
|
// char, can only contain numbers, letters, underscores and a hyphen if directory and a period if
|
||||||
// file.
|
// file.
|
||||||
bool VerifyNameValidInternal(Kernel::HLERequestContext& ctx, std::array<char, 0x20> name,
|
bool VerifyNameValidInternal(HLERequestContext& ctx, std::array<char, 0x20> name, char match_char) {
|
||||||
char match_char) {
|
|
||||||
const auto null_chars = std::count(name.begin(), name.end(), 0);
|
const auto null_chars = std::count(name.begin(), name.end(), 0);
|
||||||
const auto bad_chars = std::count_if(name.begin(), name.end(), [match_char](char c) {
|
const auto bad_chars = std::count_if(name.begin(), name.end(), [match_char](char c) {
|
||||||
return !std::isalnum(static_cast<u8>(c)) && c != '_' && c != match_char && c != '\0';
|
return !std::isalnum(static_cast<u8>(c)) && c != '_' && c != match_char && c != '\0';
|
||||||
|
@ -67,11 +66,11 @@ bool VerifyNameValidInternal(Kernel::HLERequestContext& ctx, std::array<char, 0x
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VerifyNameValidDir(Kernel::HLERequestContext& ctx, DirectoryName name) {
|
bool VerifyNameValidDir(HLERequestContext& ctx, DirectoryName name) {
|
||||||
return VerifyNameValidInternal(ctx, name, '-');
|
return VerifyNameValidInternal(ctx, name, '-');
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VerifyNameValidFile(Kernel::HLERequestContext& ctx, FileName name) {
|
bool VerifyNameValidFile(HLERequestContext& ctx, FileName name) {
|
||||||
return VerifyNameValidInternal(ctx, name, '.');
|
return VerifyNameValidInternal(ctx, name, '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +98,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetEvent(Kernel::HLERequestContext& ctx) {
|
void GetEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -107,7 +106,7 @@ private:
|
||||||
rb.PushCopyObjects(event);
|
rb.PushCopyObjects(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetImpl(Kernel::HLERequestContext& ctx) {
|
void GetImpl(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
ctx.WriteBuffer(impl);
|
ctx.WriteBuffer(impl);
|
||||||
|
@ -174,7 +173,7 @@ private:
|
||||||
progress_backend.GetImpl());
|
progress_backend.GetImpl());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) {
|
void RequestSyncDeliveryCache(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
backend.Synchronize({system.GetApplicationProcessProgramID(),
|
backend.Synchronize({system.GetApplicationProcessProgramID(),
|
||||||
|
@ -186,7 +185,7 @@ private:
|
||||||
rb.PushIpcInterface(CreateProgressService(SyncType::Normal));
|
rb.PushIpcInterface(CreateProgressService(SyncType::Normal));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RequestSyncDeliveryCacheWithDirectoryName(Kernel::HLERequestContext& ctx) {
|
void RequestSyncDeliveryCacheWithDirectoryName(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto name_raw = rp.PopRaw<DirectoryName>();
|
const auto name_raw = rp.PopRaw<DirectoryName>();
|
||||||
const auto name =
|
const auto name =
|
||||||
|
@ -203,7 +202,7 @@ private:
|
||||||
rb.PushIpcInterface(CreateProgressService(SyncType::Directory));
|
rb.PushIpcInterface(CreateProgressService(SyncType::Directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPassphrase(Kernel::HLERequestContext& ctx) {
|
void SetPassphrase(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -235,7 +234,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearDeliveryCacheStorage(Kernel::HLERequestContext& ctx) {
|
void ClearDeliveryCacheStorage(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -271,7 +270,7 @@ private:
|
||||||
std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress;
|
std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CreateBcatService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -296,7 +295,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Open(Kernel::HLERequestContext& ctx) {
|
void Open(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto dir_name_raw = rp.PopRaw<DirectoryName>();
|
const auto dir_name_raw = rp.PopRaw<DirectoryName>();
|
||||||
const auto file_name_raw = rp.PopRaw<FileName>();
|
const auto file_name_raw = rp.PopRaw<FileName>();
|
||||||
|
@ -340,7 +339,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto offset{rp.PopRaw<u64>()};
|
const auto offset{rp.PopRaw<u64>()};
|
||||||
|
|
||||||
|
@ -363,7 +362,7 @@ private:
|
||||||
rb.Push<u64>(buffer.size());
|
rb.Push<u64>(buffer.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSize(Kernel::HLERequestContext& ctx) {
|
void GetSize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
if (current_file == nullptr) {
|
if (current_file == nullptr) {
|
||||||
|
@ -377,7 +376,7 @@ private:
|
||||||
rb.Push<u64>(current_file->GetSize());
|
rb.Push<u64>(current_file->GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDigest(Kernel::HLERequestContext& ctx) {
|
void GetDigest(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
if (current_file == nullptr) {
|
if (current_file == nullptr) {
|
||||||
|
@ -412,7 +411,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Open(Kernel::HLERequestContext& ctx) {
|
void Open(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto name_raw = rp.PopRaw<DirectoryName>();
|
const auto name_raw = rp.PopRaw<DirectoryName>();
|
||||||
const auto name =
|
const auto name =
|
||||||
|
@ -443,7 +442,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
auto write_size = ctx.GetWriteBufferNumElements<DeliveryCacheDirectoryEntry>();
|
auto write_size = ctx.GetWriteBufferNumElements<DeliveryCacheDirectoryEntry>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_BCAT, "called, write_size={:016X}", write_size);
|
LOG_DEBUG(Service_BCAT, "called, write_size={:016X}", write_size);
|
||||||
|
@ -473,7 +472,7 @@ private:
|
||||||
rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)));
|
rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCount(Kernel::HLERequestContext& ctx) {
|
void GetCount(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
if (current_dir == nullptr) {
|
if (current_dir == nullptr) {
|
||||||
|
@ -517,7 +516,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateFileService(Kernel::HLERequestContext& ctx) {
|
void CreateFileService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -525,7 +524,7 @@ private:
|
||||||
rb.PushIpcInterface<IDeliveryCacheFileService>(system, root);
|
rb.PushIpcInterface<IDeliveryCacheFileService>(system, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDirectoryService(Kernel::HLERequestContext& ctx) {
|
void CreateDirectoryService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -533,7 +532,7 @@ private:
|
||||||
rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root);
|
rb.PushIpcInterface<IDeliveryCacheDirectoryService>(system, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnumerateDeliveryCacheDirectory(Kernel::HLERequestContext& ctx) {
|
void EnumerateDeliveryCacheDirectory(HLERequestContext& ctx) {
|
||||||
auto size = ctx.GetWriteBufferNumElements<DirectoryName>();
|
auto size = ctx.GetWriteBufferNumElements<DirectoryName>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_BCAT, "called, size={:016X}", size);
|
LOG_DEBUG(Service_BCAT, "called, size={:016X}", size);
|
||||||
|
@ -552,7 +551,7 @@ private:
|
||||||
u64 next_read_index = 0;
|
u64 next_read_index = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CreateDeliveryCacheStorageService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BCAT, "called");
|
LOG_DEBUG(Service_BCAT, "called");
|
||||||
|
|
||||||
const auto title_id = system.GetApplicationProcessProgramID();
|
const auto title_id = system.GetApplicationProcessProgramID();
|
||||||
|
@ -561,8 +560,7 @@ void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestCont
|
||||||
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(
|
void Module::Interface::CreateDeliveryCacheStorageServiceWithApplicationId(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ public:
|
||||||
FileSystem::FileSystemController& fsc_, const char* name);
|
FileSystem::FileSystemController& fsc_, const char* name);
|
||||||
~Interface() override;
|
~Interface() override;
|
||||||
|
|
||||||
void CreateBcatService(Kernel::HLERequestContext& ctx);
|
void CreateBcatService(HLERequestContext& ctx);
|
||||||
void CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx);
|
void CreateDeliveryCacheStorageService(HLERequestContext& ctx);
|
||||||
void CreateDeliveryCacheStorageServiceWithApplicationId(Kernel::HLERequestContext& ctx);
|
void CreateDeliveryCacheStorageServiceWithApplicationId(HLERequestContext& ctx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FileSystem::FileSystemController& fsc;
|
FileSystem::FileSystemController& fsc;
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/btdrv/btdrv.h"
|
#include "core/hle/service/btdrv/btdrv.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/kernel_helpers.h"
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -41,7 +41,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RegisterBleEvent(Kernel::HLERequestContext& ctx) {
|
void RegisterBleEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/btm/btm.h"
|
#include "core/hle/service/btm/btm.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/kernel_helpers.h"
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -70,7 +70,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AcquireBleScanEvent(Kernel::HLERequestContext& ctx) {
|
void AcquireBleScanEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||||
|
@ -79,7 +79,7 @@ private:
|
||||||
rb.PushCopyObjects(scan_event->GetReadableEvent());
|
rb.PushCopyObjects(scan_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) {
|
void AcquireBleConnectionEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
rb.PushCopyObjects(connection_event->GetReadableEvent());
|
rb.PushCopyObjects(connection_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) {
|
void AcquireBleServiceDiscoveryEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||||
|
@ -97,7 +97,7 @@ private:
|
||||||
rb.PushCopyObjects(service_discovery_event->GetReadableEvent());
|
rb.PushCopyObjects(service_discovery_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) {
|
void AcquireBleMtuConfigEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
LOG_WARNING(Service_BTM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3, 1};
|
IPC::ResponseBuilder rb{ctx, 3, 1};
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetCore(Kernel::HLERequestContext& ctx) {
|
void GetCore(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BTM, "called");
|
LOG_DEBUG(Service_BTM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -307,7 +307,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetCore(Kernel::HLERequestContext& ctx) {
|
void GetCore(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BTM, "called");
|
LOG_DEBUG(Service_BTM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -9,10 +9,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
class CAPS_A final : public ServiceFramework<CAPS_A> {
|
class CAPS_A final : public ServiceFramework<CAPS_A> {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/caps/caps_c.h"
|
#include "core/hle/service/caps/caps_c.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ CAPS_C::CAPS_C(Core::System& system_) : ServiceFramework{system_, "caps:c"} {
|
||||||
|
|
||||||
CAPS_C::~CAPS_C() = default;
|
CAPS_C::~CAPS_C() = default;
|
||||||
|
|
||||||
void CAPS_C::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
void CAPS_C::SetShimLibraryVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto library_version{rp.Pop<u64>()};
|
const auto library_version{rp.Pop<u64>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
|
@ -9,10 +9,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
class CAPS_C final : public ServiceFramework<CAPS_C> {
|
class CAPS_C final : public ServiceFramework<CAPS_C> {
|
||||||
|
@ -21,7 +17,7 @@ public:
|
||||||
~CAPS_C() override;
|
~CAPS_C() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetShimLibraryVersion(Kernel::HLERequestContext& ctx);
|
void SetShimLibraryVersion(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Capture
|
} // namespace Service::Capture
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/caps/caps_su.h"
|
#include "core/hle/service/caps/caps_su.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ CAPS_SU::CAPS_SU(Core::System& system_) : ServiceFramework{system_, "caps:su"} {
|
||||||
|
|
||||||
CAPS_SU::~CAPS_SU() = default;
|
CAPS_SU::~CAPS_SU() = default;
|
||||||
|
|
||||||
void CAPS_SU::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
void CAPS_SU::SetShimLibraryVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto library_version{rp.Pop<u64>()};
|
const auto library_version{rp.Pop<u64>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
|
@ -9,10 +9,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
class CAPS_SU final : public ServiceFramework<CAPS_SU> {
|
class CAPS_SU final : public ServiceFramework<CAPS_SU> {
|
||||||
|
@ -21,7 +17,7 @@ public:
|
||||||
~CAPS_SU() override;
|
~CAPS_SU() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetShimLibraryVersion(Kernel::HLERequestContext& ctx);
|
void SetShimLibraryVersion(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Capture
|
} // namespace Service::Capture
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/caps/caps.h"
|
#include "core/hle/service/caps/caps.h"
|
||||||
#include "core/hle/service/caps/caps_u.h"
|
#include "core/hle/service/caps/caps_u.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ CAPS_U::CAPS_U(Core::System& system_) : ServiceFramework{system_, "caps:u"} {
|
||||||
|
|
||||||
CAPS_U::~CAPS_U() = default;
|
CAPS_U::~CAPS_U() = default;
|
||||||
|
|
||||||
void CAPS_U::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
void CAPS_U::SetShimLibraryVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto library_version{rp.Pop<u64>()};
|
const auto library_version{rp.Pop<u64>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
@ -64,7 +64,7 @@ void CAPS_U::SetShimLibraryVersion(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx) {
|
void CAPS_U::GetAlbumContentsFileListForApplication(HLERequestContext& ctx) {
|
||||||
// Takes a type-0x6 output buffer containing an array of ApplicationAlbumFileEntry, a PID, an
|
// Takes a type-0x6 output buffer containing an array of ApplicationAlbumFileEntry, a PID, an
|
||||||
// u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total
|
// u8 ContentType, two s64s, and an u64 AppletResourceUserId. Returns an output u64 for total
|
||||||
// output entries (which is copied to a s32 by official SW).
|
// output entries (which is copied to a s32 by official SW).
|
||||||
|
@ -93,7 +93,7 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c
|
||||||
rb.Push(total_entries_2);
|
rb.Push(total_entries_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAPS_U::GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx) {
|
void CAPS_U::GetAlbumFileList3AaeAruid(HLERequestContext& ctx) {
|
||||||
GetAlbumContentsFileListForApplication(ctx);
|
GetAlbumContentsFileListForApplication(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,6 @@ namespace Core {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Kernel {
|
|
||||||
class HLERequestContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Service::Capture {
|
namespace Service::Capture {
|
||||||
|
|
||||||
class CAPS_U final : public ServiceFramework<CAPS_U> {
|
class CAPS_U final : public ServiceFramework<CAPS_U> {
|
||||||
|
@ -21,9 +17,9 @@ public:
|
||||||
~CAPS_U() override;
|
~CAPS_U() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetShimLibraryVersion(Kernel::HLERequestContext& ctx);
|
void SetShimLibraryVersion(HLERequestContext& ctx);
|
||||||
void GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx);
|
void GetAlbumContentsFileListForApplication(HLERequestContext& ctx);
|
||||||
void GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx);
|
void GetAlbumFileList3AaeAruid(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::Capture
|
} // namespace Service::Capture
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/crypto/key_manager.h"
|
#include "core/crypto/key_manager.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/es/es.h"
|
#include "core/hle/service/es/es.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool CheckRightsId(Kernel::HLERequestContext& ctx, const u128& rights_id) {
|
bool CheckRightsId(HLERequestContext& ctx, const u128& rights_id) {
|
||||||
if (rights_id == u128{}) {
|
if (rights_id == u128{}) {
|
||||||
LOG_ERROR(Service_ETicket, "The rights ID was invalid!");
|
LOG_ERROR(Service_ETicket, "The rights ID was invalid!");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -121,7 +121,7 @@ private:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportTicket(Kernel::HLERequestContext& ctx) {
|
void ImportTicket(HLERequestContext& ctx) {
|
||||||
const auto ticket = ctx.ReadBuffer();
|
const auto ticket = ctx.ReadBuffer();
|
||||||
[[maybe_unused]] const auto cert = ctx.ReadBuffer(1);
|
[[maybe_unused]] const auto cert = ctx.ReadBuffer(1);
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTitleKey(Kernel::HLERequestContext& ctx) {
|
void GetTitleKey(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto rights_id = rp.PopRaw<u128>();
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CountCommonTicket(Kernel::HLERequestContext& ctx) {
|
void CountCommonTicket(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ETicket, "called");
|
LOG_DEBUG(Service_ETicket, "called");
|
||||||
|
|
||||||
const u32 count = static_cast<u32>(keys.GetCommonTickets().size());
|
const u32 count = static_cast<u32>(keys.GetCommonTickets().size());
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
rb.Push<u32>(count);
|
rb.Push<u32>(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CountPersonalizedTicket(Kernel::HLERequestContext& ctx) {
|
void CountPersonalizedTicket(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ETicket, "called");
|
LOG_DEBUG(Service_ETicket, "called");
|
||||||
|
|
||||||
const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size());
|
const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size());
|
||||||
|
@ -192,7 +192,7 @@ private:
|
||||||
rb.Push<u32>(count);
|
rb.Push<u32>(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListCommonTicketRightsIds(Kernel::HLERequestContext& ctx) {
|
void ListCommonTicketRightsIds(HLERequestContext& ctx) {
|
||||||
size_t out_entries = 0;
|
size_t out_entries = 0;
|
||||||
if (!keys.GetCommonTickets().empty()) {
|
if (!keys.GetCommonTickets().empty()) {
|
||||||
out_entries = ctx.GetWriteBufferNumElements<u128>();
|
out_entries = ctx.GetWriteBufferNumElements<u128>();
|
||||||
|
@ -213,7 +213,7 @@ private:
|
||||||
rb.Push<u32>(static_cast<u32>(out_entries));
|
rb.Push<u32>(static_cast<u32>(out_entries));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListPersonalizedTicketRightsIds(Kernel::HLERequestContext& ctx) {
|
void ListPersonalizedTicketRightsIds(HLERequestContext& ctx) {
|
||||||
size_t out_entries = 0;
|
size_t out_entries = 0;
|
||||||
if (!keys.GetPersonalizedTickets().empty()) {
|
if (!keys.GetPersonalizedTickets().empty()) {
|
||||||
out_entries = ctx.GetWriteBufferNumElements<u128>();
|
out_entries = ctx.GetWriteBufferNumElements<u128>();
|
||||||
|
@ -235,7 +235,7 @@ private:
|
||||||
rb.Push<u32>(static_cast<u32>(out_entries));
|
rb.Push<u32>(static_cast<u32>(out_entries));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCommonTicketSize(Kernel::HLERequestContext& ctx) {
|
void GetCommonTicketSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto rights_id = rp.PopRaw<u128>();
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ private:
|
||||||
rb.Push<u64>(ticket.GetSize());
|
rb.Push<u64>(ticket.GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPersonalizedTicketSize(Kernel::HLERequestContext& ctx) {
|
void GetPersonalizedTicketSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto rights_id = rp.PopRaw<u128>();
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ private:
|
||||||
rb.Push<u64>(ticket.GetSize());
|
rb.Push<u64>(ticket.GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCommonTicketData(Kernel::HLERequestContext& ctx) {
|
void GetCommonTicketData(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto rights_id = rp.PopRaw<u128>();
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ private:
|
||||||
rb.Push<u64>(write_size);
|
rb.Push<u64>(write_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPersonalizedTicketData(Kernel::HLERequestContext& ctx) {
|
void GetPersonalizedTicketData(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto rights_id = rp.PopRaw<u128>();
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
#include "common/scm_rev.h"
|
#include "common/scm_rev.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/fatal/fatal.h"
|
#include "core/hle/service/fatal/fatal.h"
|
||||||
#include "core/hle/service/fatal/fatal_p.h"
|
#include "core/hle/service/fatal/fatal_p.h"
|
||||||
#include "core/hle/service/fatal/fatal_u.h"
|
#include "core/hle/service/fatal/fatal_u.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/reporter.h"
|
#include "core/reporter.h"
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ static void ThrowFatalError(Core::System& system, Result error_code, FatalType f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatal(HLERequestContext& ctx) {
|
||||||
LOG_ERROR(Service_Fatal, "called");
|
LOG_ERROR(Service_Fatal, "called");
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto error_code = rp.Pop<Result>();
|
const auto error_code = rp.Pop<Result>();
|
||||||
|
@ -136,7 +136,7 @@ void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithPolicy(HLERequestContext& ctx) {
|
||||||
LOG_ERROR(Service_Fatal, "called");
|
LOG_ERROR(Service_Fatal, "called");
|
||||||
IPC::RequestParser rp(ctx);
|
IPC::RequestParser rp(ctx);
|
||||||
const auto error_code = rp.Pop<Result>();
|
const auto error_code = rp.Pop<Result>();
|
||||||
|
@ -148,7 +148,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithCpuContext(HLERequestContext& ctx) {
|
||||||
LOG_ERROR(Service_Fatal, "called");
|
LOG_ERROR(Service_Fatal, "called");
|
||||||
IPC::RequestParser rp(ctx);
|
IPC::RequestParser rp(ctx);
|
||||||
const auto error_code = rp.Pop<Result>();
|
const auto error_code = rp.Pop<Result>();
|
||||||
|
|
|
@ -19,9 +19,9 @@ public:
|
||||||
const char* name);
|
const char* name);
|
||||||
~Interface() override;
|
~Interface() override;
|
||||||
|
|
||||||
void ThrowFatal(Kernel::HLERequestContext& ctx);
|
void ThrowFatal(HLERequestContext& ctx);
|
||||||
void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx);
|
void ThrowFatalWithPolicy(HLERequestContext& ctx);
|
||||||
void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx);
|
void ThrowFatalWithCpuContext(HLERequestContext& ctx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<Module> module;
|
std::shared_ptr<Module> module;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/fgm/fgm.h"
|
#include "core/hle/service/fgm/fgm.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
|
@ -40,7 +40,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
void Initialize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FGM, "called");
|
LOG_DEBUG(Service_FGM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#include "core/file_sys/savedata_factory.h"
|
#include "core/file_sys/savedata_factory.h"
|
||||||
#include "core/file_sys/system_archive/system_archive.h"
|
#include "core/file_sys/system_archive/system_archive.h"
|
||||||
#include "core/file_sys/vfs.h"
|
#include "core/file_sys/vfs.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
#include "core/hle/service/filesystem/fsp_srv.h"
|
#include "core/hle/service/filesystem/fsp_srv.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/reporter.h"
|
#include "core/reporter.h"
|
||||||
|
|
||||||
namespace Service::FileSystem {
|
namespace Service::FileSystem {
|
||||||
|
@ -72,7 +72,7 @@ public:
|
||||||
private:
|
private:
|
||||||
FileSys::VirtualFile backend;
|
FileSys::VirtualFile backend;
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const s64 offset = rp.Pop<s64>();
|
const s64 offset = rp.Pop<s64>();
|
||||||
const s64 length = rp.Pop<s64>();
|
const s64 length = rp.Pop<s64>();
|
||||||
|
@ -102,7 +102,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSize(Kernel::HLERequestContext& ctx) {
|
void GetSize(HLERequestContext& ctx) {
|
||||||
const u64 size = backend->GetSize();
|
const u64 size = backend->GetSize();
|
||||||
LOG_DEBUG(Service_FS, "called, size={}", size);
|
LOG_DEBUG(Service_FS, "called, size={}", size);
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public:
|
||||||
private:
|
private:
|
||||||
FileSys::VirtualFile backend;
|
FileSys::VirtualFile backend;
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 option = rp.Pop<u64>();
|
const u64 option = rp.Pop<u64>();
|
||||||
const s64 offset = rp.Pop<s64>();
|
const s64 offset = rp.Pop<s64>();
|
||||||
|
@ -165,7 +165,7 @@ private:
|
||||||
rb.Push(static_cast<u64>(output.size()));
|
rb.Push(static_cast<u64>(output.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write(Kernel::HLERequestContext& ctx) {
|
void Write(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 option = rp.Pop<u64>();
|
const u64 option = rp.Pop<u64>();
|
||||||
const s64 offset = rp.Pop<s64>();
|
const s64 offset = rp.Pop<s64>();
|
||||||
|
@ -208,7 +208,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Flush(Kernel::HLERequestContext& ctx) {
|
void Flush(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
// Exists for SDK compatibiltity -- No need to flush file.
|
// Exists for SDK compatibiltity -- No need to flush file.
|
||||||
|
@ -217,7 +217,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSize(Kernel::HLERequestContext& ctx) {
|
void SetSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 size = rp.Pop<u64>();
|
const u64 size = rp.Pop<u64>();
|
||||||
LOG_DEBUG(Service_FS, "called, size={}", size);
|
LOG_DEBUG(Service_FS, "called, size={}", size);
|
||||||
|
@ -228,7 +228,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSize(Kernel::HLERequestContext& ctx) {
|
void GetSize(HLERequestContext& ctx) {
|
||||||
const u64 size = backend->GetSize();
|
const u64 size = backend->GetSize();
|
||||||
LOG_DEBUG(Service_FS, "called, size={}", size);
|
LOG_DEBUG(Service_FS, "called, size={}", size);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ private:
|
||||||
std::vector<FileSys::Entry> entries;
|
std::vector<FileSys::Entry> entries;
|
||||||
u64 next_entry_index = 0;
|
u64 next_entry_index = 0;
|
||||||
|
|
||||||
void Read(Kernel::HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called.");
|
LOG_DEBUG(Service_FS, "called.");
|
||||||
|
|
||||||
// Calculate how many entries we can fit in the output buffer
|
// Calculate how many entries we can fit in the output buffer
|
||||||
|
@ -294,7 +294,7 @@ private:
|
||||||
rb.Push(actual_entries);
|
rb.Push(actual_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetEntryCount(Kernel::HLERequestContext& ctx) {
|
void GetEntryCount(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
u64 count = entries.size() - next_entry_index;
|
u64 count = entries.size() - next_entry_index;
|
||||||
|
@ -331,7 +331,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateFile(Kernel::HLERequestContext& ctx) {
|
void CreateFile(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
|
@ -347,7 +347,7 @@ public:
|
||||||
rb.Push(backend.CreateFile(name, file_size));
|
rb.Push(backend.CreateFile(name, file_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteFile(Kernel::HLERequestContext& ctx) {
|
void DeleteFile(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ public:
|
||||||
rb.Push(backend.DeleteFile(name));
|
rb.Push(backend.DeleteFile(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDirectory(Kernel::HLERequestContext& ctx) {
|
void CreateDirectory(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ public:
|
||||||
rb.Push(backend.CreateDirectory(name));
|
rb.Push(backend.CreateDirectory(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteDirectory(Kernel::HLERequestContext& ctx) {
|
void DeleteDirectory(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ public:
|
||||||
rb.Push(backend.DeleteDirectory(name));
|
rb.Push(backend.DeleteDirectory(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) {
|
void DeleteDirectoryRecursively(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ public:
|
||||||
rb.Push(backend.DeleteDirectoryRecursively(name));
|
rb.Push(backend.DeleteDirectoryRecursively(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CleanDirectoryRecursively(Kernel::HLERequestContext& ctx) {
|
void CleanDirectoryRecursively(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ public:
|
||||||
rb.Push(backend.CleanDirectoryRecursively(name));
|
rb.Push(backend.CleanDirectoryRecursively(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenameFile(Kernel::HLERequestContext& ctx) {
|
void RenameFile(HLERequestContext& ctx) {
|
||||||
const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0));
|
const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0));
|
||||||
const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1));
|
const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1));
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ public:
|
||||||
rb.Push(backend.RenameFile(src_name, dst_name));
|
rb.Push(backend.RenameFile(src_name, dst_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenFile(Kernel::HLERequestContext& ctx) {
|
void OpenFile(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
|
@ -431,7 +431,7 @@ public:
|
||||||
rb.PushIpcInterface<IFile>(std::move(file));
|
rb.PushIpcInterface<IFile>(std::move(file));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenDirectory(Kernel::HLERequestContext& ctx) {
|
void OpenDirectory(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
|
@ -456,7 +456,7 @@ public:
|
||||||
rb.PushIpcInterface<IDirectory>(std::move(directory));
|
rb.PushIpcInterface<IDirectory>(std::move(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetEntryType(Kernel::HLERequestContext& ctx) {
|
void GetEntryType(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -474,14 +474,14 @@ public:
|
||||||
rb.Push<u32>(static_cast<u32>(*result));
|
rb.Push<u32>(static_cast<u32>(*result));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Commit(Kernel::HLERequestContext& ctx) {
|
void Commit(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) {
|
void GetFreeSpaceSize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -489,7 +489,7 @@ public:
|
||||||
rb.Push(size.get_free_size());
|
rb.Push(size.get_free_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTotalSpaceSize(Kernel::HLERequestContext& ctx) {
|
void GetTotalSpaceSize(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -497,7 +497,7 @@ public:
|
||||||
rb.Push(size.get_total_size());
|
rb.Push(size.get_total_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFileTimeStampRaw(Kernel::HLERequestContext& ctx) {
|
void GetFileTimeStampRaw(HLERequestContext& ctx) {
|
||||||
const auto file_buffer = ctx.ReadBuffer();
|
const auto file_buffer = ctx.ReadBuffer();
|
||||||
const std::string name = Common::StringFromBuffer(file_buffer);
|
const std::string name = Common::StringFromBuffer(file_buffer);
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ public:
|
||||||
FindAllSaves(space);
|
FindAllSaves(space);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadSaveDataInfo(Kernel::HLERequestContext& ctx) {
|
void ReadSaveDataInfo(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
// Calculate how many entries we can fit in the output buffer
|
// Calculate how many entries we can fit in the output buffer
|
||||||
|
@ -811,7 +811,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
||||||
|
|
||||||
FSP_SRV::~FSP_SRV() = default;
|
FSP_SRV::~FSP_SRV() = default;
|
||||||
|
|
||||||
void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::SetCurrentProcess(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
current_process_id = rp.Pop<u64>();
|
current_process_id = rp.Pop<u64>();
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenFileSystemWithPatch(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto type = rp.PopRaw<FileSystemType>();
|
const auto type = rp.PopRaw<FileSystemType>();
|
||||||
|
@ -832,7 +832,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultUnknown);
|
rb.Push(ResultUnknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenSdCardFileSystem(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
auto filesystem =
|
auto filesystem =
|
||||||
|
@ -844,7 +844,7 @@ void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::CreateSaveDataFileSystem(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>();
|
auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>();
|
||||||
|
@ -860,7 +860,7 @@ void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenSaveDataFileSystem(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
|
@ -905,12 +905,12 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
||||||
OpenSaveDataFileSystem(ctx);
|
OpenSaveDataFileSystem(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>();
|
const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>();
|
||||||
LOG_INFO(Service_FS, "called, space={}", space);
|
LOG_INFO(Service_FS, "called, space={}", space);
|
||||||
|
@ -921,15 +921,14 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext&
|
||||||
std::make_shared<ISaveDataInfoReader>(system, space, fsc));
|
std::make_shared<ISaveDataInfoReader>(system, space, fsc));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx) {
|
||||||
Kernel::HLERequestContext& ctx) {
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
|
@ -955,7 +954,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
||||||
rb.Push(flags);
|
rb.Push(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
||||||
|
@ -974,7 +973,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
||||||
const auto unknown = rp.PopRaw<u32>();
|
const auto unknown = rp.PopRaw<u32>();
|
||||||
|
@ -1014,7 +1013,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
||||||
|
@ -1026,7 +1025,7 @@ void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ct
|
||||||
rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND);
|
rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenDataStorageWithProgramIndex(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto program_index = rp.PopRaw<u8>();
|
const auto program_index = rp.PopRaw<u8>();
|
||||||
|
@ -1053,7 +1052,7 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage));
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::DisableAutoSaveDataCreation(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
fsc.SetAutoSaveDataCreation(false);
|
fsc.SetAutoSaveDataCreation(false);
|
||||||
|
@ -1062,7 +1061,7 @@ void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::SetGlobalAccessLogMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
access_log_mode = rp.PopEnum<AccessLogMode>();
|
access_log_mode = rp.PopEnum<AccessLogMode>();
|
||||||
|
|
||||||
|
@ -1072,7 +1071,7 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetGlobalAccessLogMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -1080,7 +1079,7 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(access_log_mode);
|
rb.PushEnum(access_log_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OutputAccessLogToSdCard(HLERequestContext& ctx) {
|
||||||
const auto raw = ctx.ReadBufferCopy();
|
const auto raw = ctx.ReadBufferCopy();
|
||||||
auto log = Common::StringFromFixedZeroTerminatedBuffer(
|
auto log = Common::StringFromFixedZeroTerminatedBuffer(
|
||||||
reinterpret_cast<const char*>(raw.data()), raw.size());
|
reinterpret_cast<const char*>(raw.data()), raw.size());
|
||||||
|
@ -1093,7 +1092,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetProgramIndexForAccessLog(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
@ -1102,7 +1101,7 @@ void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(access_log_program_index);
|
rb.Push(access_log_program_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSP_SRV::GetCacheStorageSize(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetCacheStorageSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto index{rp.Pop<s32>()};
|
const auto index{rp.Pop<s32>()};
|
||||||
|
|
||||||
|
@ -1128,14 +1127,14 @@ public:
|
||||||
private:
|
private:
|
||||||
FileSys::VirtualFile backend;
|
FileSys::VirtualFile backend;
|
||||||
|
|
||||||
void Add(Kernel::HLERequestContext& ctx) {
|
void Add(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Commit(Kernel::HLERequestContext& ctx) {
|
void Commit(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -1143,7 +1142,7 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void FSP_SRV::OpenMultiCommitManager(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -35,26 +35,26 @@ public:
|
||||||
~FSP_SRV() override;
|
~FSP_SRV() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetCurrentProcess(Kernel::HLERequestContext& ctx);
|
void SetCurrentProcess(HLERequestContext& ctx);
|
||||||
void OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx);
|
void OpenFileSystemWithPatch(HLERequestContext& ctx);
|
||||||
void OpenSdCardFileSystem(Kernel::HLERequestContext& ctx);
|
void OpenSdCardFileSystem(HLERequestContext& ctx);
|
||||||
void CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx);
|
void CreateSaveDataFileSystem(HLERequestContext& ctx);
|
||||||
void OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx);
|
void OpenSaveDataFileSystem(HLERequestContext& ctx);
|
||||||
void OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx);
|
void OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx);
|
||||||
void OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx);
|
void OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx);
|
||||||
void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx);
|
void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx);
|
||||||
void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(Kernel::HLERequestContext& ctx);
|
void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx);
|
||||||
void OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx);
|
void OpenDataStorageByCurrentProcess(HLERequestContext& ctx);
|
||||||
void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx);
|
void OpenDataStorageByDataId(HLERequestContext& ctx);
|
||||||
void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx);
|
void OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx);
|
||||||
void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx);
|
void OpenDataStorageWithProgramIndex(HLERequestContext& ctx);
|
||||||
void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx);
|
void DisableAutoSaveDataCreation(HLERequestContext& ctx);
|
||||||
void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
|
void SetGlobalAccessLogMode(HLERequestContext& ctx);
|
||||||
void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
|
void GetGlobalAccessLogMode(HLERequestContext& ctx);
|
||||||
void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx);
|
void OutputAccessLogToSdCard(HLERequestContext& ctx);
|
||||||
void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx);
|
void GetProgramIndexForAccessLog(HLERequestContext& ctx);
|
||||||
void OpenMultiCommitManager(Kernel::HLERequestContext& ctx);
|
void OpenMultiCommitManager(HLERequestContext& ctx);
|
||||||
void GetCacheStorageSize(Kernel::HLERequestContext& ctx);
|
void GetCacheStorageSize(HLERequestContext& ctx);
|
||||||
|
|
||||||
FileSystemController& fsc;
|
FileSystemController& fsc;
|
||||||
const FileSys::ContentProvider& content_provider;
|
const FileSys::ContentProvider& content_provider;
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/uuid.h"
|
#include "common/uuid.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/service/friend/errors.h"
|
#include "core/hle/service/friend/errors.h"
|
||||||
#include "core/hle/service/friend/friend.h"
|
#include "core/hle/service/friend/friend.h"
|
||||||
#include "core/hle/service/friend/friend_interface.h"
|
#include "core/hle/service/friend/friend_interface.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/kernel_helpers.h"
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ private:
|
||||||
};
|
};
|
||||||
static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size");
|
static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size");
|
||||||
|
|
||||||
void GetCompletionEvent(Kernel::HLERequestContext& ctx) {
|
void GetCompletionEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -144,7 +144,7 @@ private:
|
||||||
rb.PushCopyObjects(completion_event->GetReadableEvent());
|
rb.PushCopyObjects(completion_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBlockedUserListIds(Kernel::HLERequestContext& ctx) {
|
void GetBlockedUserListIds(HLERequestContext& ctx) {
|
||||||
// This is safe to stub, as there should be no adverse consequences from reporting no
|
// This is safe to stub, as there should be no adverse consequences from reporting no
|
||||||
// blocked users.
|
// blocked users.
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
|
@ -153,21 +153,21 @@ private:
|
||||||
rb.Push<u32>(0); // Indicates there are no blocked users
|
rb.Push<u32>(0); // Indicates there are no blocked users
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) {
|
void DeclareCloseOnlinePlaySession(HLERequestContext& ctx) {
|
||||||
// Stub used by Splatoon 2
|
// Stub used by Splatoon 2
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateUserPresence(Kernel::HLERequestContext& ctx) {
|
void UpdateUserPresence(HLERequestContext& ctx) {
|
||||||
// Stub used by Retro City Rampage
|
// Stub used by Retro City Rampage
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPlayHistoryRegistrationKey(Kernel::HLERequestContext& ctx) {
|
void GetPlayHistoryRegistrationKey(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto local_play = rp.Pop<bool>();
|
const auto local_play = rp.Pop<bool>();
|
||||||
const auto uuid = rp.PopRaw<Common::UUID>();
|
const auto uuid = rp.PopRaw<Common::UUID>();
|
||||||
|
@ -179,7 +179,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFriendList(Kernel::HLERequestContext& ctx) {
|
void GetFriendList(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto friend_offset = rp.Pop<u32>();
|
const auto friend_offset = rp.Pop<u32>();
|
||||||
const auto uuid = rp.PopRaw<Common::UUID>();
|
const auto uuid = rp.PopRaw<Common::UUID>();
|
||||||
|
@ -195,7 +195,7 @@ private:
|
||||||
// TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId"
|
// TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId"
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckFriendListAvailability(Kernel::HLERequestContext& ctx) {
|
void CheckFriendListAvailability(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto uuid{rp.PopRaw<Common::UUID>()};
|
const auto uuid{rp.PopRaw<Common::UUID>()};
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetEvent(Kernel::HLERequestContext& ctx) {
|
void GetEvent(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -242,7 +242,7 @@ private:
|
||||||
rb.PushCopyObjects(notification_event->GetReadableEvent());
|
rb.PushCopyObjects(notification_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear(Kernel::HLERequestContext& ctx) {
|
void Clear(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
while (!notifications.empty()) {
|
while (!notifications.empty()) {
|
||||||
notifications.pop();
|
notifications.pop();
|
||||||
|
@ -253,7 +253,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pop(Kernel::HLERequestContext& ctx) {
|
void Pop(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
|
|
||||||
if (notifications.empty()) {
|
if (notifications.empty()) {
|
||||||
|
@ -312,14 +312,14 @@ private:
|
||||||
States states{};
|
States states{};
|
||||||
};
|
};
|
||||||
|
|
||||||
void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CreateFriendService(HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IFriendService>(system);
|
rb.PushIpcInterface<IFriendService>(system);
|
||||||
LOG_DEBUG(Service_Friend, "called");
|
LOG_DEBUG(Service_Friend, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::CreateNotificationService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CreateNotificationService(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto uuid = rp.PopRaw<Common::UUID>();
|
auto uuid = rp.PopRaw<Common::UUID>();
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ public:
|
||||||
const char* name);
|
const char* name);
|
||||||
~Interface() override;
|
~Interface() override;
|
||||||
|
|
||||||
void CreateFriendService(Kernel::HLERequestContext& ctx);
|
void CreateFriendService(HLERequestContext& ctx);
|
||||||
void CreateNotificationService(Kernel::HLERequestContext& ctx);
|
void CreateNotificationService(HLERequestContext& ctx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<Module> module;
|
std::shared_ptr<Module> module;
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_process.h"
|
#include "core/hle/kernel/k_process.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
#include "core/hle/service/glue/arp.h"
|
#include "core/hle/service/glue/arp.h"
|
||||||
#include "core/hle/service/glue/errors.h"
|
#include "core/hle/service/glue/errors.h"
|
||||||
#include "core/hle/service/glue/glue_manager.h"
|
#include "core/hle/service/glue/glue_manager.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Glue {
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ ARP_R::ARP_R(Core::System& system_, const ARPManager& manager_)
|
||||||
|
|
||||||
ARP_R::~ARP_R() = default;
|
ARP_R::~ARP_R() = default;
|
||||||
|
|
||||||
void ARP_R::GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
void ARP_R::GetApplicationLaunchProperty(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void ARP_R::GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(*res);
|
rb.PushRaw(*res);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARP_R::GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestContext& ctx) {
|
void ARP_R::GetApplicationLaunchPropertyWithApplicationId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ void ARP_R::GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestCont
|
||||||
rb.PushRaw(*res);
|
rb.PushRaw(*res);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARP_R::GetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
void ARP_R::GetApplicationControlProperty(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ void ARP_R::GetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARP_R::GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx) {
|
void ARP_R::GetApplicationControlPropertyWithApplicationId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto title_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Issue(Kernel::HLERequestContext& ctx) {
|
void Issue(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetApplicationLaunchProperty(Kernel::HLERequestContext& ctx) {
|
void SetApplicationLaunchProperty(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ARP, "called");
|
LOG_DEBUG(Service_ARP, "called");
|
||||||
|
|
||||||
if (issued) {
|
if (issued) {
|
||||||
|
@ -216,7 +216,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetApplicationControlProperty(Kernel::HLERequestContext& ctx) {
|
void SetApplicationControlProperty(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ARP, "called");
|
LOG_DEBUG(Service_ARP, "called");
|
||||||
|
|
||||||
if (issued) {
|
if (issued) {
|
||||||
|
@ -256,7 +256,7 @@ ARP_W::ARP_W(Core::System& system_, ARPManager& manager_)
|
||||||
|
|
||||||
ARP_W::~ARP_W() = default;
|
ARP_W::~ARP_W() = default;
|
||||||
|
|
||||||
void ARP_W::AcquireRegistrar(Kernel::HLERequestContext& ctx) {
|
void ARP_W::AcquireRegistrar(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_ARP, "called");
|
LOG_DEBUG(Service_ARP, "called");
|
||||||
|
|
||||||
registrar = std::make_shared<IRegistrar>(
|
registrar = std::make_shared<IRegistrar>(
|
||||||
|
@ -274,7 +274,7 @@ void ARP_W::AcquireRegistrar(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface(registrar);
|
rb.PushIpcInterface(registrar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARP_W::UnregisterApplicationInstance(Kernel::HLERequestContext& ctx) {
|
void ARP_W::UnregisterApplicationInstance(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@ public:
|
||||||
~ARP_R() override;
|
~ARP_R() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetApplicationLaunchProperty(Kernel::HLERequestContext& ctx);
|
void GetApplicationLaunchProperty(HLERequestContext& ctx);
|
||||||
void GetApplicationLaunchPropertyWithApplicationId(Kernel::HLERequestContext& ctx);
|
void GetApplicationLaunchPropertyWithApplicationId(HLERequestContext& ctx);
|
||||||
void GetApplicationControlProperty(Kernel::HLERequestContext& ctx);
|
void GetApplicationControlProperty(HLERequestContext& ctx);
|
||||||
void GetApplicationControlPropertyWithApplicationId(Kernel::HLERequestContext& ctx);
|
void GetApplicationControlPropertyWithApplicationId(HLERequestContext& ctx);
|
||||||
|
|
||||||
const ARPManager& manager;
|
const ARPManager& manager;
|
||||||
};
|
};
|
||||||
|
@ -30,8 +30,8 @@ public:
|
||||||
~ARP_W() override;
|
~ARP_W() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AcquireRegistrar(Kernel::HLERequestContext& ctx);
|
void AcquireRegistrar(HLERequestContext& ctx);
|
||||||
void UnregisterApplicationInstance(Kernel::HLERequestContext& ctx);
|
void UnregisterApplicationInstance(HLERequestContext& ctx);
|
||||||
|
|
||||||
ARPManager& manager;
|
ARPManager& manager;
|
||||||
std::shared_ptr<IRegistrar> registrar;
|
std::shared_ptr<IRegistrar> registrar;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/glue/bgtc.h"
|
#include "core/hle/service/glue/bgtc.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Glue {
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} {
|
||||||
|
|
||||||
BGTC_T::~BGTC_T() = default;
|
BGTC_T::~BGTC_T() = default;
|
||||||
|
|
||||||
void BGTC_T::OpenTaskService(Kernel::HLERequestContext& ctx) {
|
void BGTC_T::OpenTaskService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_BGTC, "called");
|
LOG_DEBUG(Service_BGTC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -16,7 +16,7 @@ public:
|
||||||
explicit BGTC_T(Core::System& system_);
|
explicit BGTC_T(Core::System& system_);
|
||||||
~BGTC_T() override;
|
~BGTC_T() override;
|
||||||
|
|
||||||
void OpenTaskService(Kernel::HLERequestContext& ctx);
|
void OpenTaskService(HLERequestContext& ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
class ITaskService final : public ServiceFramework<ITaskService> {
|
class ITaskService final : public ServiceFramework<ITaskService> {
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/service/glue/notif.h"
|
#include "core/hle/service/glue/notif.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::Glue {
|
namespace Service::Glue {
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ NOTIF_A::NOTIF_A(Core::System& system_) : ServiceFramework{system_, "notif:a"} {
|
||||||
|
|
||||||
NOTIF_A::~NOTIF_A() = default;
|
NOTIF_A::~NOTIF_A() = default;
|
||||||
|
|
||||||
void NOTIF_A::RegisterAlarmSetting(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::RegisterAlarmSetting(HLERequestContext& ctx) {
|
||||||
const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0);
|
const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0);
|
||||||
const auto application_parameter_size = ctx.GetReadBufferSize(1);
|
const auto application_parameter_size = ctx.GetReadBufferSize(1);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void NOTIF_A::RegisterAlarmSetting(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(new_alarm.alarm_setting_id);
|
rb.Push(new_alarm.alarm_setting_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOTIF_A::UpdateAlarmSetting(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::UpdateAlarmSetting(HLERequestContext& ctx) {
|
||||||
const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0);
|
const auto alarm_setting_buffer_size = ctx.GetReadBufferSize(0);
|
||||||
const auto application_parameter_size = ctx.GetReadBufferSize(1);
|
const auto application_parameter_size = ctx.GetReadBufferSize(1);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ void NOTIF_A::UpdateAlarmSetting(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::ListAlarmSettings(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NOTIF, "called, alarm_count={}", alarms.size());
|
LOG_INFO(Service_NOTIF, "called, alarm_count={}", alarms.size());
|
||||||
|
|
||||||
// TODO: Only return alarms of this game id
|
// TODO: Only return alarms of this game id
|
||||||
|
@ -102,7 +102,7 @@ void NOTIF_A::ListAlarmSettings(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u32>(alarms.size()));
|
rb.Push(static_cast<u32>(alarms.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOTIF_A::LoadApplicationParameter(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::LoadApplicationParameter(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto alarm_setting_id{rp.Pop<AlarmSettingId>()};
|
const auto alarm_setting_id{rp.Pop<AlarmSettingId>()};
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void NOTIF_A::LoadApplicationParameter(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u32>(application_parameter.size()));
|
rb.Push(static_cast<u32>(application_parameter.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOTIF_A::DeleteAlarmSetting(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::DeleteAlarmSetting(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto alarm_setting_id{rp.Pop<AlarmSettingId>()};
|
const auto alarm_setting_id{rp.Pop<AlarmSettingId>()};
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ void NOTIF_A::DeleteAlarmSetting(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOTIF_A::Initialize(Kernel::HLERequestContext& ctx) {
|
void NOTIF_A::Initialize(HLERequestContext& ctx) {
|
||||||
// TODO: Load previous alarms from config
|
// TODO: Load previous alarms from config
|
||||||
|
|
||||||
LOG_WARNING(Service_NOTIF, "(STUBBED) called");
|
LOG_WARNING(Service_NOTIF, "(STUBBED) called");
|
||||||
|
|
|
@ -56,12 +56,12 @@ private:
|
||||||
};
|
};
|
||||||
static_assert(sizeof(AlarmSetting) == 0x40, "AlarmSetting is an invalid size");
|
static_assert(sizeof(AlarmSetting) == 0x40, "AlarmSetting is an invalid size");
|
||||||
|
|
||||||
void RegisterAlarmSetting(Kernel::HLERequestContext& ctx);
|
void RegisterAlarmSetting(HLERequestContext& ctx);
|
||||||
void UpdateAlarmSetting(Kernel::HLERequestContext& ctx);
|
void UpdateAlarmSetting(HLERequestContext& ctx);
|
||||||
void ListAlarmSettings(Kernel::HLERequestContext& ctx);
|
void ListAlarmSettings(HLERequestContext& ctx);
|
||||||
void LoadApplicationParameter(Kernel::HLERequestContext& ctx);
|
void LoadApplicationParameter(HLERequestContext& ctx);
|
||||||
void DeleteAlarmSetting(Kernel::HLERequestContext& ctx);
|
void DeleteAlarmSetting(HLERequestContext& ctx);
|
||||||
void Initialize(Kernel::HLERequestContext& ctx);
|
void Initialize(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::vector<AlarmSetting>::iterator GetAlarmFromId(AlarmSettingId alarm_setting_id);
|
std::vector<AlarmSetting>::iterator GetAlarmFromId(AlarmSettingId alarm_setting_id);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hid/hid_core.h"
|
#include "core/hid/hid_core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_readable_event.h"
|
#include "core/hle/kernel/k_readable_event.h"
|
||||||
#include "core/hle/kernel/k_shared_memory.h"
|
#include "core/hle/kernel/k_shared_memory.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.h"
|
#include "core/hle/kernel/k_transfer_memory.h"
|
||||||
|
@ -18,6 +17,7 @@
|
||||||
#include "core/hle/service/hid/hidbus.h"
|
#include "core/hle/service/hid/hidbus.h"
|
||||||
#include "core/hle/service/hid/irs.h"
|
#include "core/hle/service/hid/irs.h"
|
||||||
#include "core/hle/service/hid/xcd.h"
|
#include "core/hle/service/hid/xcd.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ IAppletResource::~IAppletResource() {
|
||||||
system.CoreTiming().UnscheduleEvent(motion_update_event, 0);
|
system.CoreTiming().UnscheduleEvent(motion_update_event, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
void IAppletResource::GetSharedMemoryHandle(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -203,7 +203,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitializeVibrationDevice(Kernel::HLERequestContext& ctx) {
|
void InitializeVibrationDevice(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ Hid::Hid(Core::System& system_)
|
||||||
|
|
||||||
Hid::~Hid() = default;
|
Hid::~Hid() = default;
|
||||||
|
|
||||||
void Hid::CreateAppletResource(Kernel::HLERequestContext& ctx) {
|
void Hid::CreateAppletResource(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ void Hid::CreateAppletResource(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IAppletResource>(applet_resource);
|
rb.PushIpcInterface<IAppletResource>(applet_resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateDebugPad(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateDebugPad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ void Hid::ActivateDebugPad(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateTouchScreen(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ void Hid::ActivateTouchScreen(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateMouse(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ void Hid::ActivateMouse(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateKeyboard(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ void Hid::ActivateKeyboard(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
void Hid::SendKeyboardLockKeyEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto flags{rp.Pop<u32>()};
|
const auto flags{rp.Pop<u32>()};
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ void Hid::SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateXpad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 basic_xpad_id;
|
u32 basic_xpad_id;
|
||||||
|
@ -475,7 +475,7 @@ void Hid::ActivateXpad(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) {
|
void Hid::GetXpadIDs(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ void Hid::GetXpadIDs(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(0);
|
rb.Push(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 basic_xpad_id;
|
u32 basic_xpad_id;
|
||||||
|
@ -506,7 +506,7 @@ void Hid::ActivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::DeactivateSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 basic_xpad_id;
|
u32 basic_xpad_id;
|
||||||
|
@ -526,7 +526,7 @@ void Hid::DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -549,7 +549,7 @@ void Hid::StartSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -572,7 +572,7 @@ void Hid::StopSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx) {
|
void Hid::IsSixAxisSensorFusionEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -598,7 +598,7 @@ void Hid::IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(is_enabled);
|
rb.Push(is_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) {
|
void Hid::EnableSixAxisSensorFusion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool enable_sixaxis_sensor_fusion;
|
bool enable_sixaxis_sensor_fusion;
|
||||||
|
@ -625,7 +625,7 @@ void Hid::EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
void Hid::SetSixAxisSensorFusionParameters(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -652,7 +652,7 @@ void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
void Hid::GetSixAxisSensorFusionParameters(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -679,7 +679,7 @@ void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(fusion_parameters);
|
rb.PushRaw(fusion_parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetSixAxisSensorFusionParameters(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -713,7 +713,7 @@ void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result2);
|
rb.Push(result2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetGyroscopeZeroDriftMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto sixaxis_handle{rp.PopRaw<Core::HID::SixAxisSensorHandle>()};
|
const auto sixaxis_handle{rp.PopRaw<Core::HID::SixAxisSensorHandle>()};
|
||||||
const auto drift_mode{rp.PopEnum<Core::HID::GyroscopeZeroDriftMode>()};
|
const auto drift_mode{rp.PopEnum<Core::HID::GyroscopeZeroDriftMode>()};
|
||||||
|
@ -732,7 +732,7 @@ void Hid::SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetGyroscopeZeroDriftMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -757,7 +757,7 @@ void Hid::GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(drift_mode);
|
rb.PushEnum(drift_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetGyroscopeZeroDriftMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -781,7 +781,7 @@ void Hid::ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) {
|
void Hid::IsSixAxisSensorAtRest(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -806,7 +806,7 @@ void Hid::IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(is_at_rest);
|
rb.Push(is_at_rest);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -833,7 +833,7 @@ void Hid::IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& c
|
||||||
rb.Push(is_firmware_available);
|
rb.Push(is_firmware_available);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx) {
|
void Hid::EnableSixAxisSensorUnalteredPassthrough(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
@ -859,7 +859,7 @@ void Hid::EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext& ctx) {
|
void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -886,7 +886,7 @@ void Hid::IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext&
|
||||||
rb.Push(is_unaltered_sisxaxis_enabled);
|
rb.Push(is_unaltered_sisxaxis_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx) {
|
void Hid::LoadSixAxisSensorCalibrationParameter(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -916,7 +916,7 @@ void Hid::LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx)
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx) {
|
void Hid::GetSixAxisSensorIcInformation(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -946,7 +946,7 @@ void Hid::GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
Core::HID::SixAxisSensorHandle sixaxis_handle;
|
||||||
|
@ -971,7 +971,7 @@ void Hid::ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateGesture(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u32 unknown;
|
u32 unknown;
|
||||||
|
@ -991,7 +991,7 @@ void Hid::ActivateGesture(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
void Hid::SetSupportedNpadStyleSet(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadStyleSet supported_styleset;
|
Core::HID::NpadStyleSet supported_styleset;
|
||||||
|
@ -1012,7 +1012,7 @@ void Hid::SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
void Hid::GetSupportedNpadStyleSet(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1025,7 +1025,7 @@ void Hid::GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) {
|
||||||
.raw);
|
.raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) {
|
void Hid::SetSupportedNpadIdType(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1038,7 +1038,7 @@ void Hid::SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateNpad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1050,7 +1050,7 @@ void Hid::ActivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) {
|
void Hid::DeactivateNpad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1062,7 +1062,7 @@ void Hid::DeactivateNpad(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
|
void Hid::AcquireNpadStyleSetUpdateEventHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1087,7 +1087,7 @@ void Hid::AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
.GetStyleSetChangedEvent(parameters.npad_id));
|
.GetStyleSetChangedEvent(parameters.npad_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::DisconnectNpad(Kernel::HLERequestContext& ctx) {
|
void Hid::DisconnectNpad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1108,7 +1108,7 @@ void Hid::DisconnectNpad(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPlayerLedPattern(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ void Hid::GetPlayerLedPattern(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(pattern.raw);
|
rb.Push(pattern.raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateNpadWithRevision(HLERequestContext& ctx) {
|
||||||
// Should have no effect with how our npad sets up the data
|
// Should have no effect with how our npad sets up the data
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
|
@ -1144,7 +1144,7 @@ void Hid::ActivateNpadWithRevision(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyHoldType(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
const auto hold_type{rp.PopEnum<Controller_NPad::NpadJoyHoldType>()};
|
const auto hold_type{rp.PopEnum<Controller_NPad::NpadJoyHoldType>()};
|
||||||
|
@ -1158,7 +1158,7 @@ void Hid::SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadJoyHoldType(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1169,7 +1169,7 @@ void Hid::GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType());
|
rb.PushEnum(applet_resource->GetController<Controller_NPad>(HidController::NPad).GetHoldType());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyAssignmentModeSingleByDefault(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1191,7 +1191,7 @@ void Hid::SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyAssignmentModeSingle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1215,7 +1215,7 @@ void Hid::SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadJoyAssignmentModeDual(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1236,7 +1236,7 @@ void Hid::SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) {
|
void Hid::MergeSingleJoyAsDualJoy(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
|
@ -1252,7 +1252,7 @@ void Hid::MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
void Hid::StartLrAssignmentMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1264,7 +1264,7 @@ void Hid::StartLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
void Hid::StopLrAssignmentMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1276,7 +1276,7 @@ void Hid::StopLrAssignmentMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadHandheldActivationMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
const auto activation_mode{rp.PopEnum<Controller_NPad::NpadHandheldActivationMode>()};
|
const auto activation_mode{rp.PopEnum<Controller_NPad::NpadHandheldActivationMode>()};
|
||||||
|
@ -1291,7 +1291,7 @@ void Hid::SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadHandheldActivationMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1303,7 +1303,7 @@ void Hid::GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) {
|
||||||
.GetNpadHandheldActivationMode());
|
.GetNpadHandheldActivationMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) {
|
void Hid::SwapNpadAssignment(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id_1{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id_2{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
|
@ -1319,7 +1319,7 @@ void Hid::SwapNpadAssignment(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx) {
|
void Hid::IsUnintendedHomeButtonInputProtectionEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1343,7 +1343,7 @@ void Hid::IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext
|
||||||
rb.Push(is_enabled);
|
rb.Push(is_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx) {
|
void Hid::EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool unintended_home_button_input_protection;
|
bool unintended_home_button_input_protection;
|
||||||
|
@ -1369,7 +1369,7 @@ void Hid::EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& c
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadAnalogStickUseCenterClamp(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool analog_stick_use_center_clamp;
|
bool analog_stick_use_center_clamp;
|
||||||
|
@ -1392,7 +1392,7 @@ void Hid::SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadCaptureButtonAssignment(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadStyleSet npad_styleset;
|
Core::HID::NpadStyleSet npad_styleset;
|
||||||
|
@ -1412,7 +1412,7 @@ void Hid::SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) {
|
void Hid::ClearNpadCaptureButtonAssignment(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1423,7 +1423,7 @@ void Hid::ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
void Hid::GetVibrationDeviceInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
|
||||||
const auto& controller =
|
const auto& controller =
|
||||||
|
@ -1483,7 +1483,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(vibration_device_info);
|
rb.PushRaw(vibration_device_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) {
|
void Hid::SendVibrationValue(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
||||||
|
@ -1508,7 +1508,7 @@ void Hid::SendVibrationValue(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) {
|
void Hid::GetActualVibrationValue(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
||||||
|
@ -1531,7 +1531,7 @@ void Hid::GetActualVibrationValue(Kernel::HLERequestContext& ctx) {
|
||||||
.GetLastVibration(parameters.vibration_device_handle));
|
.GetLastVibration(parameters.vibration_device_handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) {
|
void Hid::CreateActiveVibrationDeviceList(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -1539,7 +1539,7 @@ void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource);
|
rb.PushIpcInterface<IActiveVibrationDeviceList>(system, applet_resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::PermitVibration(Kernel::HLERequestContext& ctx) {
|
void Hid::PermitVibration(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto can_vibrate{rp.Pop<bool>()};
|
const auto can_vibrate{rp.Pop<bool>()};
|
||||||
|
|
||||||
|
@ -1553,7 +1553,7 @@ void Hid::PermitVibration(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) {
|
void Hid::IsVibrationPermitted(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
// nnSDK checks if a float is greater than zero. We return the bool we stored earlier
|
// nnSDK checks if a float is greater than zero. We return the bool we stored earlier
|
||||||
|
@ -1564,7 +1564,7 @@ void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(is_enabled);
|
rb.Push(is_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) {
|
void Hid::SendVibrationValues(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1588,7 +1588,7 @@ void Hid::SendVibrationValues(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
void Hid::SendVibrationGcErmCommand(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
||||||
|
@ -1649,7 +1649,7 @@ void Hid::SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
void Hid::GetActualVibrationGcErmCommand(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
||||||
|
@ -1691,7 +1691,7 @@ void Hid::GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(gc_erm_command);
|
rb.PushEnum(gc_erm_command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
void Hid::BeginPermitVibrationSession(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1704,7 +1704,7 @@ void Hid::BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
void Hid::EndPermitVibrationSession(HLERequestContext& ctx) {
|
||||||
applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
applet_resource->GetController<Controller_NPad>(HidController::NPad)
|
||||||
.SetPermitVibrationSession(false);
|
.SetPermitVibrationSession(false);
|
||||||
|
|
||||||
|
@ -1714,7 +1714,7 @@ void Hid::EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) {
|
void Hid::IsVibrationDeviceMounted(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
Core::HID::VibrationDeviceHandle vibration_device_handle;
|
||||||
|
@ -1737,7 +1737,7 @@ void Hid::IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx) {
|
||||||
.IsVibrationDeviceMounted(parameters.vibration_device_handle));
|
.IsVibrationDeviceMounted(parameters.vibration_device_handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateConsoleSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1749,7 +1749,7 @@ void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartConsoleSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle;
|
Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle;
|
||||||
|
@ -1769,7 +1769,7 @@ void Hid::StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopConsoleSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle;
|
Core::HID::ConsoleSixAxisSensorHandle console_sixaxis_handle;
|
||||||
|
@ -1789,7 +1789,7 @@ void Hid::StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::ActivateSevenSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1801,7 +1801,7 @@ void Hid::ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StartSevenSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1812,7 +1812,7 @@ void Hid::StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::StopSevenSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1823,7 +1823,7 @@ void Hid::StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::InitializeSevenSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
const auto t_mem_1_size{rp.Pop<u64>()};
|
const auto t_mem_1_size{rp.Pop<u64>()};
|
||||||
|
@ -1873,7 +1873,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
void Hid::FinalizeSevenSixAxisSensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1884,7 +1884,7 @@ void Hid::FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -1897,7 +1897,7 @@ void Hid::ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx) {
|
void Hid::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
@ -1907,7 +1907,7 @@ void Hid::IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(false);
|
rb.Push(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPalmaConnectionHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -1930,7 +1930,7 @@ void Hid::GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(handle);
|
rb.PushRaw(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::InitializePalma(Kernel::HLERequestContext& ctx) {
|
void Hid::InitializePalma(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -1943,7 +1943,7 @@ void Hid::InitializePalma(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx) {
|
void Hid::AcquirePalmaOperationCompleteEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -1956,7 +1956,7 @@ void Hid::AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(controller.AcquirePalmaOperationCompleteEvent(connection_handle));
|
rb.PushCopyObjects(controller.AcquirePalmaOperationCompleteEvent(connection_handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPalmaOperationInfo(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPalmaOperationInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -1978,7 +1978,7 @@ void Hid::GetPalmaOperationInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u64>(operation_type));
|
rb.Push(static_cast<u64>(operation_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::PlayPalmaActivity(Kernel::HLERequestContext& ctx) {
|
void Hid::PlayPalmaActivity(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
const auto palma_activity{rp.Pop<u64>()};
|
const auto palma_activity{rp.Pop<u64>()};
|
||||||
|
@ -1993,7 +1993,7 @@ void Hid::PlayPalmaActivity(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaFrModeType(Kernel::HLERequestContext& ctx) {
|
void Hid::SetPalmaFrModeType(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
const auto fr_mode{rp.PopEnum<Controller_Palma::PalmaFrModeType>()};
|
const auto fr_mode{rp.PopEnum<Controller_Palma::PalmaFrModeType>()};
|
||||||
|
@ -2008,7 +2008,7 @@ void Hid::SetPalmaFrModeType(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ReadPalmaStep(Kernel::HLERequestContext& ctx) {
|
void Hid::ReadPalmaStep(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2021,7 +2021,7 @@ void Hid::ReadPalmaStep(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnablePalmaStep(Kernel::HLERequestContext& ctx) {
|
void Hid::EnablePalmaStep(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool is_enabled;
|
bool is_enabled;
|
||||||
|
@ -2043,7 +2043,7 @@ void Hid::EnablePalmaStep(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetPalmaStep(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetPalmaStep(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2056,21 +2056,21 @@ void Hid::ResetPalmaStep(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ReadPalmaApplicationSection(Kernel::HLERequestContext& ctx) {
|
void Hid::ReadPalmaApplicationSection(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::WritePalmaApplicationSection(Kernel::HLERequestContext& ctx) {
|
void Hid::WritePalmaApplicationSection(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx) {
|
void Hid::ReadPalmaUniqueCode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2083,7 +2083,7 @@ void Hid::ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx) {
|
void Hid::SetPalmaUniqueCodeInvalid(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2096,14 +2096,14 @@ void Hid::SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::WritePalmaActivityEntry(Kernel::HLERequestContext& ctx) {
|
void Hid::WritePalmaActivityEntry(HLERequestContext& ctx) {
|
||||||
LOG_CRITICAL(Service_HID, "(STUBBED) called");
|
LOG_CRITICAL(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx) {
|
void Hid::WritePalmaRgbLedPatternEntry(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
const auto unknown{rp.Pop<u64>()};
|
const auto unknown{rp.Pop<u64>()};
|
||||||
|
@ -2120,7 +2120,7 @@ void Hid::WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::WritePalmaWaveEntry(Kernel::HLERequestContext& ctx) {
|
void Hid::WritePalmaWaveEntry(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
const auto wave_set{rp.PopEnum<Controller_Palma::PalmaWaveSet>()};
|
const auto wave_set{rp.PopEnum<Controller_Palma::PalmaWaveSet>()};
|
||||||
|
@ -2155,7 +2155,7 @@ void Hid::WritePalmaWaveEntry(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) {
|
void Hid::SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
s32 database_id_version;
|
s32 database_id_version;
|
||||||
|
@ -2177,7 +2177,7 @@ void Hid::SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx)
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2190,14 +2190,14 @@ void Hid::GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx)
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SuspendPalmaFeature(Kernel::HLERequestContext& ctx) {
|
void Hid::SuspendPalmaFeature(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPalmaOperationResult(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPalmaOperationResult(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2210,21 +2210,21 @@ void Hid::GetPalmaOperationResult(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ReadPalmaPlayLog(Kernel::HLERequestContext& ctx) {
|
void Hid::ReadPalmaPlayLog(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::ResetPalmaPlayLog(Kernel::HLERequestContext& ctx) {
|
void Hid::ResetPalmaPlayLog(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
void Hid::SetIsPalmaAllConnectable(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool is_palma_all_connectable;
|
bool is_palma_all_connectable;
|
||||||
|
@ -2246,14 +2246,14 @@ void Hid::SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetIsPalmaPairedConnectable(Kernel::HLERequestContext& ctx) {
|
void Hid::SetIsPalmaPairedConnectable(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::PairPalma(Kernel::HLERequestContext& ctx) {
|
void Hid::PairPalma(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
const auto connection_handle{rp.PopRaw<Controller_Palma::PalmaConnectionHandle>()};
|
||||||
|
|
||||||
|
@ -2266,7 +2266,7 @@ void Hid::PairPalma(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetPalmaBoostMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto palma_boost_mode{rp.Pop<bool>()};
|
const auto palma_boost_mode{rp.Pop<bool>()};
|
||||||
|
|
||||||
|
@ -2279,35 +2279,35 @@ void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::CancelWritePalmaWaveEntry(Kernel::HLERequestContext& ctx) {
|
void Hid::CancelWritePalmaWaveEntry(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::EnablePalmaBoostMode(Kernel::HLERequestContext& ctx) {
|
void Hid::EnablePalmaBoostMode(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetPalmaBluetoothAddress(Kernel::HLERequestContext& ctx) {
|
void Hid::GetPalmaBluetoothAddress(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetDisallowedPalmaConnection(Kernel::HLERequestContext& ctx) {
|
void Hid::SetDisallowedPalmaConnection(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::SetNpadCommunicationMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
const auto communication_mode{rp.PopEnum<Controller_NPad::NpadCommunicationMode>()};
|
const auto communication_mode{rp.PopEnum<Controller_NPad::NpadCommunicationMode>()};
|
||||||
|
@ -2322,7 +2322,7 @@ void Hid::SetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
void Hid::GetNpadCommunicationMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
@ -2333,7 +2333,7 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
.GetNpadCommunicationMode());
|
.GetNpadCommunicationMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) {
|
void Hid::SetTouchScreenConfiguration(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()};
|
const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
@ -2345,7 +2345,7 @@ void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hid::IsFirmwareUpdateNeededForNotification(Kernel::HLERequestContext& ctx) {
|
void Hid::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
s32 unknown;
|
s32 unknown;
|
||||||
|
@ -2719,7 +2719,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ApplyNpadSystemCommonPolicy(Kernel::HLERequestContext& ctx) {
|
void ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) {
|
||||||
// We already do this for homebrew so we can just stub it out
|
// We already do this for homebrew so we can just stub it out
|
||||||
LOG_WARNING(Service_HID, "called");
|
LOG_WARNING(Service_HID, "called");
|
||||||
|
|
||||||
|
@ -2727,7 +2727,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetUniquePadsFromNpad(Kernel::HLERequestContext& ctx) {
|
void GetUniquePadsFromNpad(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto npad_id_type{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id_type{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
std::make_unique<T>(system.HIDCore(), shared_memory, service_context);
|
std::make_unique<T>(system.HIDCore(), shared_memory, service_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx);
|
void GetSharedMemoryHandle(HLERequestContext& ctx);
|
||||||
void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
||||||
void UpdateNpad(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
void UpdateNpad(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
||||||
void UpdateMouseKeyboard(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
void UpdateMouseKeyboard(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
||||||
|
@ -101,115 +101,115 @@ public:
|
||||||
std::shared_ptr<IAppletResource> GetAppletResource();
|
std::shared_ptr<IAppletResource> GetAppletResource();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateAppletResource(Kernel::HLERequestContext& ctx);
|
void CreateAppletResource(HLERequestContext& ctx);
|
||||||
void ActivateDebugPad(Kernel::HLERequestContext& ctx);
|
void ActivateDebugPad(HLERequestContext& ctx);
|
||||||
void ActivateTouchScreen(Kernel::HLERequestContext& ctx);
|
void ActivateTouchScreen(HLERequestContext& ctx);
|
||||||
void ActivateMouse(Kernel::HLERequestContext& ctx);
|
void ActivateMouse(HLERequestContext& ctx);
|
||||||
void ActivateKeyboard(Kernel::HLERequestContext& ctx);
|
void ActivateKeyboard(HLERequestContext& ctx);
|
||||||
void SendKeyboardLockKeyEvent(Kernel::HLERequestContext& ctx);
|
void SendKeyboardLockKeyEvent(HLERequestContext& ctx);
|
||||||
void ActivateXpad(Kernel::HLERequestContext& ctx);
|
void ActivateXpad(HLERequestContext& ctx);
|
||||||
void GetXpadIDs(Kernel::HLERequestContext& ctx);
|
void GetXpadIDs(HLERequestContext& ctx);
|
||||||
void ActivateSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void ActivateSixAxisSensor(HLERequestContext& ctx);
|
||||||
void DeactivateSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void DeactivateSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StartSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StartSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StopSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StopSixAxisSensor(HLERequestContext& ctx);
|
||||||
void IsSixAxisSensorFusionEnabled(Kernel::HLERequestContext& ctx);
|
void IsSixAxisSensorFusionEnabled(HLERequestContext& ctx);
|
||||||
void EnableSixAxisSensorFusion(Kernel::HLERequestContext& ctx);
|
void EnableSixAxisSensorFusion(HLERequestContext& ctx);
|
||||||
void SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx);
|
void SetSixAxisSensorFusionParameters(HLERequestContext& ctx);
|
||||||
void GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx);
|
void GetSixAxisSensorFusionParameters(HLERequestContext& ctx);
|
||||||
void ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx);
|
void ResetSixAxisSensorFusionParameters(HLERequestContext& ctx);
|
||||||
void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void SetGyroscopeZeroDriftMode(HLERequestContext& ctx);
|
||||||
void GetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void GetGyroscopeZeroDriftMode(HLERequestContext& ctx);
|
||||||
void ResetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx);
|
void ResetGyroscopeZeroDriftMode(HLERequestContext& ctx);
|
||||||
void IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx);
|
void IsSixAxisSensorAtRest(HLERequestContext& ctx);
|
||||||
void IsFirmwareUpdateAvailableForSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void IsFirmwareUpdateAvailableForSixAxisSensor(HLERequestContext& ctx);
|
||||||
void EnableSixAxisSensorUnalteredPassthrough(Kernel::HLERequestContext& ctx);
|
void EnableSixAxisSensorUnalteredPassthrough(HLERequestContext& ctx);
|
||||||
void IsSixAxisSensorUnalteredPassthroughEnabled(Kernel::HLERequestContext& ctx);
|
void IsSixAxisSensorUnalteredPassthroughEnabled(HLERequestContext& ctx);
|
||||||
void LoadSixAxisSensorCalibrationParameter(Kernel::HLERequestContext& ctx);
|
void LoadSixAxisSensorCalibrationParameter(HLERequestContext& ctx);
|
||||||
void GetSixAxisSensorIcInformation(Kernel::HLERequestContext& ctx);
|
void GetSixAxisSensorIcInformation(HLERequestContext& ctx);
|
||||||
void ResetIsSixAxisSensorDeviceNewlyAssigned(Kernel::HLERequestContext& ctx);
|
void ResetIsSixAxisSensorDeviceNewlyAssigned(HLERequestContext& ctx);
|
||||||
void ActivateGesture(Kernel::HLERequestContext& ctx);
|
void ActivateGesture(HLERequestContext& ctx);
|
||||||
void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx);
|
void SetSupportedNpadStyleSet(HLERequestContext& ctx);
|
||||||
void GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx);
|
void GetSupportedNpadStyleSet(HLERequestContext& ctx);
|
||||||
void SetSupportedNpadIdType(Kernel::HLERequestContext& ctx);
|
void SetSupportedNpadIdType(HLERequestContext& ctx);
|
||||||
void ActivateNpad(Kernel::HLERequestContext& ctx);
|
void ActivateNpad(HLERequestContext& ctx);
|
||||||
void DeactivateNpad(Kernel::HLERequestContext& ctx);
|
void DeactivateNpad(HLERequestContext& ctx);
|
||||||
void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx);
|
void AcquireNpadStyleSetUpdateEventHandle(HLERequestContext& ctx);
|
||||||
void DisconnectNpad(Kernel::HLERequestContext& ctx);
|
void DisconnectNpad(HLERequestContext& ctx);
|
||||||
void GetPlayerLedPattern(Kernel::HLERequestContext& ctx);
|
void GetPlayerLedPattern(HLERequestContext& ctx);
|
||||||
void ActivateNpadWithRevision(Kernel::HLERequestContext& ctx);
|
void ActivateNpadWithRevision(HLERequestContext& ctx);
|
||||||
void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx);
|
void SetNpadJoyHoldType(HLERequestContext& ctx);
|
||||||
void GetNpadJoyHoldType(Kernel::HLERequestContext& ctx);
|
void GetNpadJoyHoldType(HLERequestContext& ctx);
|
||||||
void SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx);
|
void SetNpadJoyAssignmentModeSingleByDefault(HLERequestContext& ctx);
|
||||||
void SetNpadJoyAssignmentModeSingle(Kernel::HLERequestContext& ctx);
|
void SetNpadJoyAssignmentModeSingle(HLERequestContext& ctx);
|
||||||
void SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx);
|
void SetNpadJoyAssignmentModeDual(HLERequestContext& ctx);
|
||||||
void MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx);
|
void MergeSingleJoyAsDualJoy(HLERequestContext& ctx);
|
||||||
void StartLrAssignmentMode(Kernel::HLERequestContext& ctx);
|
void StartLrAssignmentMode(HLERequestContext& ctx);
|
||||||
void StopLrAssignmentMode(Kernel::HLERequestContext& ctx);
|
void StopLrAssignmentMode(HLERequestContext& ctx);
|
||||||
void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx);
|
void SetNpadHandheldActivationMode(HLERequestContext& ctx);
|
||||||
void GetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx);
|
void GetNpadHandheldActivationMode(HLERequestContext& ctx);
|
||||||
void SwapNpadAssignment(Kernel::HLERequestContext& ctx);
|
void SwapNpadAssignment(HLERequestContext& ctx);
|
||||||
void IsUnintendedHomeButtonInputProtectionEnabled(Kernel::HLERequestContext& ctx);
|
void IsUnintendedHomeButtonInputProtectionEnabled(HLERequestContext& ctx);
|
||||||
void EnableUnintendedHomeButtonInputProtection(Kernel::HLERequestContext& ctx);
|
void EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx);
|
||||||
void SetNpadAnalogStickUseCenterClamp(Kernel::HLERequestContext& ctx);
|
void SetNpadAnalogStickUseCenterClamp(HLERequestContext& ctx);
|
||||||
void SetNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx);
|
void SetNpadCaptureButtonAssignment(HLERequestContext& ctx);
|
||||||
void ClearNpadCaptureButtonAssignment(Kernel::HLERequestContext& ctx);
|
void ClearNpadCaptureButtonAssignment(HLERequestContext& ctx);
|
||||||
void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx);
|
void GetVibrationDeviceInfo(HLERequestContext& ctx);
|
||||||
void SendVibrationValue(Kernel::HLERequestContext& ctx);
|
void SendVibrationValue(HLERequestContext& ctx);
|
||||||
void GetActualVibrationValue(Kernel::HLERequestContext& ctx);
|
void GetActualVibrationValue(HLERequestContext& ctx);
|
||||||
void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx);
|
void CreateActiveVibrationDeviceList(HLERequestContext& ctx);
|
||||||
void PermitVibration(Kernel::HLERequestContext& ctx);
|
void PermitVibration(HLERequestContext& ctx);
|
||||||
void IsVibrationPermitted(Kernel::HLERequestContext& ctx);
|
void IsVibrationPermitted(HLERequestContext& ctx);
|
||||||
void SendVibrationValues(Kernel::HLERequestContext& ctx);
|
void SendVibrationValues(HLERequestContext& ctx);
|
||||||
void SendVibrationGcErmCommand(Kernel::HLERequestContext& ctx);
|
void SendVibrationGcErmCommand(HLERequestContext& ctx);
|
||||||
void GetActualVibrationGcErmCommand(Kernel::HLERequestContext& ctx);
|
void GetActualVibrationGcErmCommand(HLERequestContext& ctx);
|
||||||
void BeginPermitVibrationSession(Kernel::HLERequestContext& ctx);
|
void BeginPermitVibrationSession(HLERequestContext& ctx);
|
||||||
void EndPermitVibrationSession(Kernel::HLERequestContext& ctx);
|
void EndPermitVibrationSession(HLERequestContext& ctx);
|
||||||
void IsVibrationDeviceMounted(Kernel::HLERequestContext& ctx);
|
void IsVibrationDeviceMounted(HLERequestContext& ctx);
|
||||||
void ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void ActivateConsoleSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StartConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StartConsoleSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StopConsoleSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StopConsoleSixAxisSensor(HLERequestContext& ctx);
|
||||||
void ActivateSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void ActivateSevenSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StartSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StartSevenSixAxisSensor(HLERequestContext& ctx);
|
||||||
void StopSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void StopSevenSixAxisSensor(HLERequestContext& ctx);
|
||||||
void InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void InitializeSevenSixAxisSensor(HLERequestContext& ctx);
|
||||||
void FinalizeSevenSixAxisSensor(Kernel::HLERequestContext& ctx);
|
void FinalizeSevenSixAxisSensor(HLERequestContext& ctx);
|
||||||
void ResetSevenSixAxisSensorTimestamp(Kernel::HLERequestContext& ctx);
|
void ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx);
|
||||||
void IsUsbFullKeyControllerEnabled(Kernel::HLERequestContext& ctx);
|
void IsUsbFullKeyControllerEnabled(HLERequestContext& ctx);
|
||||||
void GetPalmaConnectionHandle(Kernel::HLERequestContext& ctx);
|
void GetPalmaConnectionHandle(HLERequestContext& ctx);
|
||||||
void InitializePalma(Kernel::HLERequestContext& ctx);
|
void InitializePalma(HLERequestContext& ctx);
|
||||||
void AcquirePalmaOperationCompleteEvent(Kernel::HLERequestContext& ctx);
|
void AcquirePalmaOperationCompleteEvent(HLERequestContext& ctx);
|
||||||
void GetPalmaOperationInfo(Kernel::HLERequestContext& ctx);
|
void GetPalmaOperationInfo(HLERequestContext& ctx);
|
||||||
void PlayPalmaActivity(Kernel::HLERequestContext& ctx);
|
void PlayPalmaActivity(HLERequestContext& ctx);
|
||||||
void SetPalmaFrModeType(Kernel::HLERequestContext& ctx);
|
void SetPalmaFrModeType(HLERequestContext& ctx);
|
||||||
void ReadPalmaStep(Kernel::HLERequestContext& ctx);
|
void ReadPalmaStep(HLERequestContext& ctx);
|
||||||
void EnablePalmaStep(Kernel::HLERequestContext& ctx);
|
void EnablePalmaStep(HLERequestContext& ctx);
|
||||||
void ResetPalmaStep(Kernel::HLERequestContext& ctx);
|
void ResetPalmaStep(HLERequestContext& ctx);
|
||||||
void ReadPalmaApplicationSection(Kernel::HLERequestContext& ctx);
|
void ReadPalmaApplicationSection(HLERequestContext& ctx);
|
||||||
void WritePalmaApplicationSection(Kernel::HLERequestContext& ctx);
|
void WritePalmaApplicationSection(HLERequestContext& ctx);
|
||||||
void ReadPalmaUniqueCode(Kernel::HLERequestContext& ctx);
|
void ReadPalmaUniqueCode(HLERequestContext& ctx);
|
||||||
void SetPalmaUniqueCodeInvalid(Kernel::HLERequestContext& ctx);
|
void SetPalmaUniqueCodeInvalid(HLERequestContext& ctx);
|
||||||
void WritePalmaActivityEntry(Kernel::HLERequestContext& ctx);
|
void WritePalmaActivityEntry(HLERequestContext& ctx);
|
||||||
void WritePalmaRgbLedPatternEntry(Kernel::HLERequestContext& ctx);
|
void WritePalmaRgbLedPatternEntry(HLERequestContext& ctx);
|
||||||
void WritePalmaWaveEntry(Kernel::HLERequestContext& ctx);
|
void WritePalmaWaveEntry(HLERequestContext& ctx);
|
||||||
void SetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx);
|
void SetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx);
|
||||||
void GetPalmaDataBaseIdentificationVersion(Kernel::HLERequestContext& ctx);
|
void GetPalmaDataBaseIdentificationVersion(HLERequestContext& ctx);
|
||||||
void SuspendPalmaFeature(Kernel::HLERequestContext& ctx);
|
void SuspendPalmaFeature(HLERequestContext& ctx);
|
||||||
void GetPalmaOperationResult(Kernel::HLERequestContext& ctx);
|
void GetPalmaOperationResult(HLERequestContext& ctx);
|
||||||
void ReadPalmaPlayLog(Kernel::HLERequestContext& ctx);
|
void ReadPalmaPlayLog(HLERequestContext& ctx);
|
||||||
void ResetPalmaPlayLog(Kernel::HLERequestContext& ctx);
|
void ResetPalmaPlayLog(HLERequestContext& ctx);
|
||||||
void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx);
|
void SetIsPalmaAllConnectable(HLERequestContext& ctx);
|
||||||
void SetIsPalmaPairedConnectable(Kernel::HLERequestContext& ctx);
|
void SetIsPalmaPairedConnectable(HLERequestContext& ctx);
|
||||||
void PairPalma(Kernel::HLERequestContext& ctx);
|
void PairPalma(HLERequestContext& ctx);
|
||||||
void SetPalmaBoostMode(Kernel::HLERequestContext& ctx);
|
void SetPalmaBoostMode(HLERequestContext& ctx);
|
||||||
void CancelWritePalmaWaveEntry(Kernel::HLERequestContext& ctx);
|
void CancelWritePalmaWaveEntry(HLERequestContext& ctx);
|
||||||
void EnablePalmaBoostMode(Kernel::HLERequestContext& ctx);
|
void EnablePalmaBoostMode(HLERequestContext& ctx);
|
||||||
void GetPalmaBluetoothAddress(Kernel::HLERequestContext& ctx);
|
void GetPalmaBluetoothAddress(HLERequestContext& ctx);
|
||||||
void SetDisallowedPalmaConnection(Kernel::HLERequestContext& ctx);
|
void SetDisallowedPalmaConnection(HLERequestContext& ctx);
|
||||||
void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
void SetNpadCommunicationMode(HLERequestContext& ctx);
|
||||||
void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
void GetNpadCommunicationMode(HLERequestContext& ctx);
|
||||||
void SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx);
|
void SetTouchScreenConfiguration(HLERequestContext& ctx);
|
||||||
void IsFirmwareUpdateNeededForNotification(Kernel::HLERequestContext& ctx);
|
void IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<IAppletResource> applet_resource;
|
std::shared_ptr<IAppletResource> applet_resource;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/core_timing_util.h"
|
#include "core/core_timing_util.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/kernel/k_readable_event.h"
|
#include "core/hle/kernel/k_readable_event.h"
|
||||||
#include "core/hle/kernel/k_shared_memory.h"
|
#include "core/hle/kernel/k_shared_memory.h"
|
||||||
|
@ -16,6 +15,7 @@
|
||||||
#include "core/hle/service/hid/hidbus/ringcon.h"
|
#include "core/hle/service/hid/hidbus/ringcon.h"
|
||||||
#include "core/hle/service/hid/hidbus/starlink.h"
|
#include "core/hle/service/hid/hidbus/starlink.h"
|
||||||
#include "core/hle/service/hid/hidbus/stubbed.h"
|
#include "core/hle/service/hid/hidbus/stubbed.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ std::optional<std::size_t> HidBus::GetDeviceIndexFromHandle(BusHandle handle) co
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::GetBusHandle(Kernel::HLERequestContext& ctx) {
|
void HidBus::GetBusHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::HID::NpadIdType npad_id;
|
Core::HID::NpadIdType npad_id;
|
||||||
|
@ -165,7 +165,7 @@ void HidBus::GetBusHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(out_data);
|
rb.PushRaw(out_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::IsExternalDeviceConnected(Kernel::HLERequestContext& ctx) {
|
void HidBus::IsExternalDeviceConnected(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ void HidBus::IsExternalDeviceConnected(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::Initialize(Kernel::HLERequestContext& ctx) {
|
void HidBus::Initialize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
@ -245,7 +245,7 @@ void HidBus::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::Finalize(Kernel::HLERequestContext& ctx) {
|
void HidBus::Finalize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
@ -284,7 +284,7 @@ void HidBus::Finalize(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::EnableExternalDevice(Kernel::HLERequestContext& ctx) {
|
void HidBus::EnableExternalDevice(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
bool enable;
|
bool enable;
|
||||||
|
@ -322,7 +322,7 @@ void HidBus::EnableExternalDevice(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::GetExternalDeviceId(Kernel::HLERequestContext& ctx) {
|
void HidBus::GetExternalDeviceId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ void HidBus::GetExternalDeviceId(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::SendCommandAsync(Kernel::HLERequestContext& ctx) {
|
void HidBus::SendCommandAsync(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto data = ctx.ReadBuffer();
|
const auto data = ctx.ReadBuffer();
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
@ -377,7 +377,7 @@ void HidBus::SendCommandAsync(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
void HidBus::GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx) {
|
void HidBus::GetSendCommandAsynceResult(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ void HidBus::GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
void HidBus::SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx) {
|
void HidBus::SetEventForSendCommandAsycResult(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ void HidBus::SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
void HidBus::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
void HidBus::GetSharedMemoryHandle(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_HID, "called");
|
LOG_DEBUG(Service_HID, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -440,7 +440,7 @@ void HidBus::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(&system.Kernel().GetHidBusSharedMem());
|
rb.PushCopyObjects(&system.Kernel().GetHidBusSharedMem());
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) {
|
void HidBus::EnableJoyPollingReceiveMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto t_mem_size{rp.Pop<u32>()};
|
const auto t_mem_size{rp.Pop<u32>()};
|
||||||
const auto t_mem_handle{ctx.GetCopyHandle(0)};
|
const auto t_mem_handle{ctx.GetCopyHandle(0)};
|
||||||
|
@ -485,7 +485,7 @@ void HidBus::EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) {
|
void HidBus::DisableJoyPollingReceiveMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
const auto bus_handle_{rp.PopRaw<BusHandle>()};
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ void HidBus::DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HidBus::SetStatusManagerType(Kernel::HLERequestContext& ctx) {
|
void HidBus::SetStatusManagerType(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto manager_type{rp.PopEnum<StatusManagerType>()};
|
const auto manager_type{rp.PopEnum<StatusManagerType>()};
|
||||||
|
|
||||||
|
|
|
@ -94,19 +94,19 @@ private:
|
||||||
std::unique_ptr<HidbusBase> device{nullptr};
|
std::unique_ptr<HidbusBase> device{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
void GetBusHandle(Kernel::HLERequestContext& ctx);
|
void GetBusHandle(HLERequestContext& ctx);
|
||||||
void IsExternalDeviceConnected(Kernel::HLERequestContext& ctx);
|
void IsExternalDeviceConnected(HLERequestContext& ctx);
|
||||||
void Initialize(Kernel::HLERequestContext& ctx);
|
void Initialize(HLERequestContext& ctx);
|
||||||
void Finalize(Kernel::HLERequestContext& ctx);
|
void Finalize(HLERequestContext& ctx);
|
||||||
void EnableExternalDevice(Kernel::HLERequestContext& ctx);
|
void EnableExternalDevice(HLERequestContext& ctx);
|
||||||
void GetExternalDeviceId(Kernel::HLERequestContext& ctx);
|
void GetExternalDeviceId(HLERequestContext& ctx);
|
||||||
void SendCommandAsync(Kernel::HLERequestContext& ctx);
|
void SendCommandAsync(HLERequestContext& ctx);
|
||||||
void GetSendCommandAsynceResult(Kernel::HLERequestContext& ctx);
|
void GetSendCommandAsynceResult(HLERequestContext& ctx);
|
||||||
void SetEventForSendCommandAsycResult(Kernel::HLERequestContext& ctx);
|
void SetEventForSendCommandAsycResult(HLERequestContext& ctx);
|
||||||
void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx);
|
void GetSharedMemoryHandle(HLERequestContext& ctx);
|
||||||
void EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx);
|
void EnableJoyPollingReceiveMode(HLERequestContext& ctx);
|
||||||
void DisableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx);
|
void DisableJoyPollingReceiveMode(HLERequestContext& ctx);
|
||||||
void SetStatusManagerType(Kernel::HLERequestContext& ctx);
|
void SetStatusManagerType(HLERequestContext& ctx);
|
||||||
|
|
||||||
void UpdateHidbus(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
void UpdateHidbus(std::uintptr_t user_data, std::chrono::nanoseconds ns_late);
|
||||||
std::optional<std::size_t> GetDeviceIndexFromHandle(BusHandle handle) const;
|
std::optional<std::size_t> GetDeviceIndexFromHandle(BusHandle handle) const;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hid/emulated_controller.h"
|
#include "core/hid/emulated_controller.h"
|
||||||
#include "core/hid/hid_core.h"
|
#include "core/hid/hid_core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_shared_memory.h"
|
#include "core/hle/kernel/k_shared_memory.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.h"
|
#include "core/hle/kernel/k_transfer_memory.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
@ -20,6 +19,7 @@
|
||||||
#include "core/hle/service/hid/irsensor/moment_processor.h"
|
#include "core/hle/service/hid/irsensor/moment_processor.h"
|
||||||
#include "core/hle/service/hid/irsensor/pointing_processor.h"
|
#include "core/hle/service/hid/irsensor/pointing_processor.h"
|
||||||
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
namespace Service::IRS {
|
namespace Service::IRS {
|
||||||
|
@ -56,7 +56,7 @@ IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} {
|
||||||
}
|
}
|
||||||
IRS::~IRS() = default;
|
IRS::~IRS() = default;
|
||||||
|
|
||||||
void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {
|
void IRS::ActivateIrsensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
|
void IRS::DeactivateIrsensor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void IRS::DeactivateIrsensor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
void IRS::GetIrsensorSharedMemoryHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void IRS::GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem());
|
rb.PushCopyObjects(&system.Kernel().GetIrsSharedMem());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::StopImageProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -117,7 +117,7 @@ void IRS::StopImageProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunMomentProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -149,7 +149,7 @@ void IRS::RunMomentProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunClusteringProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -182,7 +182,7 @@ void IRS::RunClusteringProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunImageTransferProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -231,7 +231,7 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
|
void IRS::GetImageTransferProcessorState(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -272,7 +272,7 @@ void IRS::GetImageTransferProcessorState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(state);
|
rb.PushRaw(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunTeraPluginProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -308,7 +308,7 @@ void IRS::RunTeraPluginProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
|
void IRS::GetNpadIrCameraHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()};
|
const auto npad_id{rp.PopEnum<Core::HID::NpadIdType>()};
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ void IRS::GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushRaw(camera_handle);
|
rb.PushRaw(camera_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunPointingProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
||||||
const auto processor_config{rp.PopRaw<Core::IrSensor::PackedPointingProcessorConfig>()};
|
const auto processor_config{rp.PopRaw<Core::IrSensor::PackedPointingProcessorConfig>()};
|
||||||
|
@ -359,7 +359,7 @@ void IRS::RunPointingProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::SuspendImageProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -385,7 +385,7 @@ void IRS::SuspendImageProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) {
|
void IRS::CheckFirmwareVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
||||||
const auto mcu_version{rp.PopRaw<Core::IrSensor::PackedMcuVersion>()};
|
const auto mcu_version{rp.PopRaw<Core::IrSensor::PackedMcuVersion>()};
|
||||||
|
@ -407,7 +407,7 @@ void IRS::CheckFirmwareVersion(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) {
|
void IRS::SetFunctionLevel(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
||||||
const auto function_level{rp.PopRaw<Core::IrSensor::PackedFunctionLevel>()};
|
const auto function_level{rp.PopRaw<Core::IrSensor::PackedFunctionLevel>()};
|
||||||
|
@ -429,7 +429,7 @@ void IRS::SetFunctionLevel(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunImageTransferExProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -469,7 +469,7 @@ void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) {
|
void IRS::RunIrLedProcessor(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
const auto camera_handle{rp.PopRaw<Core::IrSensor::IrCameraHandle>()};
|
||||||
const auto processor_config{rp.PopRaw<Core::IrSensor::PackedIrLedProcessorConfig>()};
|
const auto processor_config{rp.PopRaw<Core::IrSensor::PackedIrLedProcessorConfig>()};
|
||||||
|
@ -497,7 +497,7 @@ void IRS::RunIrLedProcessor(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) {
|
void IRS::StopImageProcessorAsync(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::IrCameraHandle camera_handle;
|
Core::IrSensor::IrCameraHandle camera_handle;
|
||||||
|
@ -525,7 +525,7 @@ void IRS::StopImageProcessorAsync(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRS::ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx) {
|
void IRS::ActivateIrsensorWithFunctionLevel(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
Core::IrSensor::PackedFunctionLevel function_level;
|
Core::IrSensor::PackedFunctionLevel function_level;
|
||||||
|
|
|
@ -38,24 +38,24 @@ private:
|
||||||
};
|
};
|
||||||
static_assert(sizeof(StatusManager) == 0x8000, "StatusManager is an invalid size");
|
static_assert(sizeof(StatusManager) == 0x8000, "StatusManager is an invalid size");
|
||||||
|
|
||||||
void ActivateIrsensor(Kernel::HLERequestContext& ctx);
|
void ActivateIrsensor(HLERequestContext& ctx);
|
||||||
void DeactivateIrsensor(Kernel::HLERequestContext& ctx);
|
void DeactivateIrsensor(HLERequestContext& ctx);
|
||||||
void GetIrsensorSharedMemoryHandle(Kernel::HLERequestContext& ctx);
|
void GetIrsensorSharedMemoryHandle(HLERequestContext& ctx);
|
||||||
void StopImageProcessor(Kernel::HLERequestContext& ctx);
|
void StopImageProcessor(HLERequestContext& ctx);
|
||||||
void RunMomentProcessor(Kernel::HLERequestContext& ctx);
|
void RunMomentProcessor(HLERequestContext& ctx);
|
||||||
void RunClusteringProcessor(Kernel::HLERequestContext& ctx);
|
void RunClusteringProcessor(HLERequestContext& ctx);
|
||||||
void RunImageTransferProcessor(Kernel::HLERequestContext& ctx);
|
void RunImageTransferProcessor(HLERequestContext& ctx);
|
||||||
void GetImageTransferProcessorState(Kernel::HLERequestContext& ctx);
|
void GetImageTransferProcessorState(HLERequestContext& ctx);
|
||||||
void RunTeraPluginProcessor(Kernel::HLERequestContext& ctx);
|
void RunTeraPluginProcessor(HLERequestContext& ctx);
|
||||||
void GetNpadIrCameraHandle(Kernel::HLERequestContext& ctx);
|
void GetNpadIrCameraHandle(HLERequestContext& ctx);
|
||||||
void RunPointingProcessor(Kernel::HLERequestContext& ctx);
|
void RunPointingProcessor(HLERequestContext& ctx);
|
||||||
void SuspendImageProcessor(Kernel::HLERequestContext& ctx);
|
void SuspendImageProcessor(HLERequestContext& ctx);
|
||||||
void CheckFirmwareVersion(Kernel::HLERequestContext& ctx);
|
void CheckFirmwareVersion(HLERequestContext& ctx);
|
||||||
void SetFunctionLevel(Kernel::HLERequestContext& ctx);
|
void SetFunctionLevel(HLERequestContext& ctx);
|
||||||
void RunImageTransferExProcessor(Kernel::HLERequestContext& ctx);
|
void RunImageTransferExProcessor(HLERequestContext& ctx);
|
||||||
void RunIrLedProcessor(Kernel::HLERequestContext& ctx);
|
void RunIrLedProcessor(HLERequestContext& ctx);
|
||||||
void StopImageProcessorAsync(Kernel::HLERequestContext& ctx);
|
void StopImageProcessorAsync(HLERequestContext& ctx);
|
||||||
void ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx);
|
void ActivateIrsensorWithFunctionLevel(HLERequestContext& ctx);
|
||||||
|
|
||||||
Result IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_handle) const;
|
Result IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_handle) const;
|
||||||
Core::IrSensor::DeviceFormat& GetIrCameraSharedMemoryDeviceEntry(
|
Core::IrSensor::DeviceFormat& GetIrCameraSharedMemoryDeviceEntry(
|
||||||
|
|
532
src/core/hle/service/hle_ipc.cpp
Executable file
532
src/core/hle/service/hle_ipc.cpp
Executable file
|
@ -0,0 +1,532 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
#include <boost/range/algorithm_ext/erase.hpp>
|
||||||
|
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/common_funcs.h"
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "common/scratch_buffer.h"
|
||||||
|
#include "core/hle/kernel/k_auto_object.h"
|
||||||
|
#include "core/hle/kernel/k_handle_table.h"
|
||||||
|
#include "core/hle/kernel/k_process.h"
|
||||||
|
#include "core/hle/kernel/k_server_port.h"
|
||||||
|
#include "core/hle/kernel/k_server_session.h"
|
||||||
|
#include "core/hle/kernel/k_thread.h"
|
||||||
|
#include "core/hle/kernel/kernel.h"
|
||||||
|
#include "core/hle/service/hle_ipc.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
#include "core/memory.h"
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
|
||||||
|
SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_)
|
||||||
|
: kernel{kernel_} {}
|
||||||
|
|
||||||
|
SessionRequestHandler::~SessionRequestHandler() = default;
|
||||||
|
|
||||||
|
SessionRequestManager::SessionRequestManager(Kernel::KernelCore& kernel_,
|
||||||
|
ServerManager& server_manager_)
|
||||||
|
: kernel{kernel_}, server_manager{server_manager_} {}
|
||||||
|
|
||||||
|
SessionRequestManager::~SessionRequestManager() = default;
|
||||||
|
|
||||||
|
bool SessionRequestManager::HasSessionRequestHandler(const HLERequestContext& context) const {
|
||||||
|
if (IsDomain() && context.HasDomainMessageHeader()) {
|
||||||
|
const auto& message_header = context.GetDomainMessageHeader();
|
||||||
|
const auto object_id = message_header.object_id;
|
||||||
|
|
||||||
|
if (object_id > DomainHandlerCount()) {
|
||||||
|
LOG_CRITICAL(IPC, "object_id {} is too big!", object_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !DomainHandler(object_id - 1).expired();
|
||||||
|
} else {
|
||||||
|
return session_handler != nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Result SessionRequestManager::CompleteSyncRequest(Kernel::KServerSession* server_session,
|
||||||
|
HLERequestContext& context) {
|
||||||
|
Result result = ResultSuccess;
|
||||||
|
|
||||||
|
// If the session has been converted to a domain, handle the domain request
|
||||||
|
if (this->HasSessionRequestHandler(context)) {
|
||||||
|
if (IsDomain() && context.HasDomainMessageHeader()) {
|
||||||
|
result = HandleDomainSyncRequest(server_session, context);
|
||||||
|
// If there is no domain header, the regular session handler is used
|
||||||
|
} else if (this->HasSessionHandler()) {
|
||||||
|
// If this manager has an associated HLE handler, forward the request to it.
|
||||||
|
result = this->SessionHandler().HandleSyncRequest(*server_session, context);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ASSERT_MSG(false, "Session handler is invalid, stubbing response!");
|
||||||
|
IPC::ResponseBuilder rb(context, 2);
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (convert_to_domain) {
|
||||||
|
ASSERT_MSG(!IsDomain(), "ServerSession is already a domain instance.");
|
||||||
|
this->ConvertToDomain();
|
||||||
|
convert_to_domain = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Result SessionRequestManager::HandleDomainSyncRequest(Kernel::KServerSession* server_session,
|
||||||
|
HLERequestContext& context) {
|
||||||
|
if (!context.HasDomainMessageHeader()) {
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set domain handlers in HLE context, used for domain objects (IPC interfaces) as inputs
|
||||||
|
ASSERT(context.GetManager().get() == this);
|
||||||
|
|
||||||
|
// If there is a DomainMessageHeader, then this is CommandType "Request"
|
||||||
|
const auto& domain_message_header = context.GetDomainMessageHeader();
|
||||||
|
const u32 object_id{domain_message_header.object_id};
|
||||||
|
switch (domain_message_header.command) {
|
||||||
|
case IPC::DomainMessageHeader::CommandType::SendMessage:
|
||||||
|
if (object_id > this->DomainHandlerCount()) {
|
||||||
|
LOG_CRITICAL(IPC,
|
||||||
|
"object_id {} is too big! This probably means a recent service call "
|
||||||
|
"needed to return a new interface!",
|
||||||
|
object_id);
|
||||||
|
ASSERT(false);
|
||||||
|
return ResultSuccess; // Ignore error if asserts are off
|
||||||
|
}
|
||||||
|
if (auto strong_ptr = this->DomainHandler(object_id - 1).lock()) {
|
||||||
|
return strong_ptr->HandleSyncRequest(*server_session, context);
|
||||||
|
} else {
|
||||||
|
ASSERT(false);
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: {
|
||||||
|
LOG_DEBUG(IPC, "CloseVirtualHandle, object_id=0x{:08X}", object_id);
|
||||||
|
|
||||||
|
this->CloseDomainHandler(object_id - 1);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{context, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_CRITICAL(IPC, "Unknown domain command={}", domain_message_header.command.Value());
|
||||||
|
ASSERT(false);
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
HLERequestContext::HLERequestContext(Kernel::KernelCore& kernel_, Core::Memory::Memory& memory_,
|
||||||
|
Kernel::KServerSession* server_session_,
|
||||||
|
Kernel::KThread* thread_)
|
||||||
|
: server_session(server_session_), thread(thread_), kernel{kernel_}, memory{memory_} {
|
||||||
|
cmd_buf[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HLERequestContext::~HLERequestContext() = default;
|
||||||
|
|
||||||
|
void HLERequestContext::ParseCommandBuffer(const Kernel::KHandleTable& handle_table,
|
||||||
|
u32_le* src_cmdbuf, bool incoming) {
|
||||||
|
IPC::RequestParser rp(src_cmdbuf);
|
||||||
|
command_header = rp.PopRaw<IPC::CommandHeader>();
|
||||||
|
|
||||||
|
if (command_header->IsCloseCommand()) {
|
||||||
|
// Close does not populate the rest of the IPC header
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If handle descriptor is present, add size of it
|
||||||
|
if (command_header->enable_handle_descriptor) {
|
||||||
|
handle_descriptor_header = rp.PopRaw<IPC::HandleDescriptorHeader>();
|
||||||
|
if (handle_descriptor_header->send_current_pid) {
|
||||||
|
pid = rp.Pop<u64>();
|
||||||
|
}
|
||||||
|
if (incoming) {
|
||||||
|
// Populate the object lists with the data in the IPC request.
|
||||||
|
incoming_copy_handles.reserve(handle_descriptor_header->num_handles_to_copy);
|
||||||
|
incoming_move_handles.reserve(handle_descriptor_header->num_handles_to_move);
|
||||||
|
|
||||||
|
for (u32 handle = 0; handle < handle_descriptor_header->num_handles_to_copy; ++handle) {
|
||||||
|
incoming_copy_handles.push_back(rp.Pop<Handle>());
|
||||||
|
}
|
||||||
|
for (u32 handle = 0; handle < handle_descriptor_header->num_handles_to_move; ++handle) {
|
||||||
|
incoming_move_handles.push_back(rp.Pop<Handle>());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// For responses we just ignore the handles, they're empty and will be populated when
|
||||||
|
// translating the response.
|
||||||
|
rp.Skip(handle_descriptor_header->num_handles_to_copy, false);
|
||||||
|
rp.Skip(handle_descriptor_header->num_handles_to_move, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer_x_desciptors.reserve(command_header->num_buf_x_descriptors);
|
||||||
|
buffer_a_desciptors.reserve(command_header->num_buf_a_descriptors);
|
||||||
|
buffer_b_desciptors.reserve(command_header->num_buf_b_descriptors);
|
||||||
|
buffer_w_desciptors.reserve(command_header->num_buf_w_descriptors);
|
||||||
|
|
||||||
|
for (u32 i = 0; i < command_header->num_buf_x_descriptors; ++i) {
|
||||||
|
buffer_x_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorX>());
|
||||||
|
}
|
||||||
|
for (u32 i = 0; i < command_header->num_buf_a_descriptors; ++i) {
|
||||||
|
buffer_a_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>());
|
||||||
|
}
|
||||||
|
for (u32 i = 0; i < command_header->num_buf_b_descriptors; ++i) {
|
||||||
|
buffer_b_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>());
|
||||||
|
}
|
||||||
|
for (u32 i = 0; i < command_header->num_buf_w_descriptors; ++i) {
|
||||||
|
buffer_w_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>());
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto buffer_c_offset = rp.GetCurrentOffset() + command_header->data_size;
|
||||||
|
|
||||||
|
if (!command_header->IsTipc()) {
|
||||||
|
// Padding to align to 16 bytes
|
||||||
|
rp.AlignWithPadding();
|
||||||
|
|
||||||
|
if (GetManager()->IsDomain() &&
|
||||||
|
((command_header->type == IPC::CommandType::Request ||
|
||||||
|
command_header->type == IPC::CommandType::RequestWithContext) ||
|
||||||
|
!incoming)) {
|
||||||
|
// If this is an incoming message, only CommandType "Request" has a domain header
|
||||||
|
// All outgoing domain messages have the domain header, if only incoming has it
|
||||||
|
if (incoming || domain_message_header) {
|
||||||
|
domain_message_header = rp.PopRaw<IPC::DomainMessageHeader>();
|
||||||
|
} else {
|
||||||
|
if (GetManager()->IsDomain()) {
|
||||||
|
LOG_WARNING(IPC, "Domain request has no DomainMessageHeader!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data_payload_header = rp.PopRaw<IPC::DataPayloadHeader>();
|
||||||
|
|
||||||
|
data_payload_offset = rp.GetCurrentOffset();
|
||||||
|
|
||||||
|
if (domain_message_header &&
|
||||||
|
domain_message_header->command ==
|
||||||
|
IPC::DomainMessageHeader::CommandType::CloseVirtualHandle) {
|
||||||
|
// CloseVirtualHandle command does not have SFC* or any data
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (incoming) {
|
||||||
|
ASSERT(data_payload_header->magic == Common::MakeMagic('S', 'F', 'C', 'I'));
|
||||||
|
} else {
|
||||||
|
ASSERT(data_payload_header->magic == Common::MakeMagic('S', 'F', 'C', 'O'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rp.SetCurrentOffset(buffer_c_offset);
|
||||||
|
|
||||||
|
// For Inline buffers, the response data is written directly to buffer_c_offset
|
||||||
|
// and in this case we don't have any BufferDescriptorC on the request.
|
||||||
|
if (command_header->buf_c_descriptor_flags >
|
||||||
|
IPC::CommandHeader::BufferDescriptorCFlag::InlineDescriptor) {
|
||||||
|
if (command_header->buf_c_descriptor_flags ==
|
||||||
|
IPC::CommandHeader::BufferDescriptorCFlag::OneDescriptor) {
|
||||||
|
buffer_c_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorC>());
|
||||||
|
} else {
|
||||||
|
u32 num_buf_c_descriptors =
|
||||||
|
static_cast<u32>(command_header->buf_c_descriptor_flags.Value()) - 2;
|
||||||
|
|
||||||
|
// This is used to detect possible underflows, in case something is broken
|
||||||
|
// with the two ifs above and the flags value is == 0 || == 1.
|
||||||
|
ASSERT(num_buf_c_descriptors < 14);
|
||||||
|
|
||||||
|
for (u32 i = 0; i < num_buf_c_descriptors; ++i) {
|
||||||
|
buffer_c_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorC>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rp.SetCurrentOffset(data_payload_offset);
|
||||||
|
|
||||||
|
command = rp.Pop<u32_le>();
|
||||||
|
rp.Skip(1, false); // The command is actually an u64, but we don't use the high part.
|
||||||
|
}
|
||||||
|
|
||||||
|
Result HLERequestContext::PopulateFromIncomingCommandBuffer(
|
||||||
|
const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf) {
|
||||||
|
ParseCommandBuffer(handle_table, src_cmdbuf, true);
|
||||||
|
|
||||||
|
if (command_header->IsCloseCommand()) {
|
||||||
|
// Close does not populate the rest of the IPC header
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::copy_n(src_cmdbuf, IPC::COMMAND_BUFFER_LENGTH, cmd_buf.begin());
|
||||||
|
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
Result HLERequestContext::WriteToOutgoingCommandBuffer(Kernel::KThread& requesting_thread) {
|
||||||
|
auto current_offset = handles_offset;
|
||||||
|
auto& owner_process = *requesting_thread.GetOwnerProcess();
|
||||||
|
auto& handle_table = owner_process.GetHandleTable();
|
||||||
|
|
||||||
|
for (auto& object : outgoing_copy_objects) {
|
||||||
|
Handle handle{};
|
||||||
|
if (object) {
|
||||||
|
R_TRY(handle_table.Add(&handle, object));
|
||||||
|
}
|
||||||
|
cmd_buf[current_offset++] = handle;
|
||||||
|
}
|
||||||
|
for (auto& object : outgoing_move_objects) {
|
||||||
|
Handle handle{};
|
||||||
|
if (object) {
|
||||||
|
R_TRY(handle_table.Add(&handle, object));
|
||||||
|
|
||||||
|
// Close our reference to the object, as it is being moved to the caller.
|
||||||
|
object->Close();
|
||||||
|
}
|
||||||
|
cmd_buf[current_offset++] = handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the domain objects to the command buffer, these go after the raw untranslated data.
|
||||||
|
// TODO(Subv): This completely ignores C buffers.
|
||||||
|
|
||||||
|
if (GetManager()->IsDomain()) {
|
||||||
|
current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size());
|
||||||
|
for (auto& object : outgoing_domain_objects) {
|
||||||
|
GetManager()->AppendDomainHandler(std::move(object));
|
||||||
|
cmd_buf[current_offset++] = static_cast<u32_le>(GetManager()->DomainHandlerCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the translated command buffer back into the thread's command buffer area.
|
||||||
|
memory.WriteBlock(owner_process, requesting_thread.GetTLSAddress(), cmd_buf.data(),
|
||||||
|
write_size * sizeof(u32));
|
||||||
|
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<u8> HLERequestContext::ReadBufferCopy(std::size_t buffer_index) const {
|
||||||
|
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
||||||
|
BufferDescriptorA()[buffer_index].Size()};
|
||||||
|
if (is_buffer_a) {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorA().size() > buffer_index, { return {}; },
|
||||||
|
"BufferDescriptorA invalid buffer_index {}", buffer_index);
|
||||||
|
std::vector<u8> buffer(BufferDescriptorA()[buffer_index].Size());
|
||||||
|
memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size());
|
||||||
|
return buffer;
|
||||||
|
} else {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorX().size() > buffer_index, { return {}; },
|
||||||
|
"BufferDescriptorX invalid buffer_index {}", buffer_index);
|
||||||
|
std::vector<u8> buffer(BufferDescriptorX()[buffer_index].Size());
|
||||||
|
memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size());
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::span<const u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const {
|
||||||
|
static thread_local std::array<Common::ScratchBuffer<u8>, 2> read_buffer_a;
|
||||||
|
static thread_local std::array<Common::ScratchBuffer<u8>, 2> read_buffer_x;
|
||||||
|
|
||||||
|
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
||||||
|
BufferDescriptorA()[buffer_index].Size()};
|
||||||
|
if (is_buffer_a) {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorA().size() > buffer_index, { return {}; },
|
||||||
|
"BufferDescriptorA invalid buffer_index {}", buffer_index);
|
||||||
|
auto& read_buffer = read_buffer_a[buffer_index];
|
||||||
|
read_buffer.resize_destructive(BufferDescriptorA()[buffer_index].Size());
|
||||||
|
memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), read_buffer.data(),
|
||||||
|
read_buffer.size());
|
||||||
|
return read_buffer;
|
||||||
|
} else {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorX().size() > buffer_index, { return {}; },
|
||||||
|
"BufferDescriptorX invalid buffer_index {}", buffer_index);
|
||||||
|
auto& read_buffer = read_buffer_x[buffer_index];
|
||||||
|
read_buffer.resize_destructive(BufferDescriptorX()[buffer_index].Size());
|
||||||
|
memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), read_buffer.data(),
|
||||||
|
read_buffer.size());
|
||||||
|
return read_buffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index) const {
|
||||||
|
if (size == 0) {
|
||||||
|
LOG_WARNING(Core, "skip empty buffer write");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const bool is_buffer_b{BufferDescriptorB().size() > buffer_index &&
|
||||||
|
BufferDescriptorB()[buffer_index].Size()};
|
||||||
|
const std::size_t buffer_size{GetWriteBufferSize(buffer_index)};
|
||||||
|
if (size > buffer_size) {
|
||||||
|
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size,
|
||||||
|
buffer_size);
|
||||||
|
size = buffer_size; // TODO(bunnei): This needs to be HW tested
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_buffer_b) {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorB().size() > buffer_index &&
|
||||||
|
BufferDescriptorB()[buffer_index].Size() >= size,
|
||||||
|
{ return 0; }, "BufferDescriptorB is invalid, index={}, size={}", buffer_index, size);
|
||||||
|
WriteBufferB(buffer, size, buffer_index);
|
||||||
|
} else {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorC().size() > buffer_index &&
|
||||||
|
BufferDescriptorC()[buffer_index].Size() >= size,
|
||||||
|
{ return 0; }, "BufferDescriptorC is invalid, index={}, size={}", buffer_index, size);
|
||||||
|
WriteBufferC(buffer, size, buffer_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t HLERequestContext::WriteBufferB(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index) const {
|
||||||
|
if (buffer_index >= BufferDescriptorB().size() || size == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto buffer_size{BufferDescriptorB()[buffer_index].Size()};
|
||||||
|
if (size > buffer_size) {
|
||||||
|
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size,
|
||||||
|
buffer_size);
|
||||||
|
size = buffer_size; // TODO(bunnei): This needs to be HW tested
|
||||||
|
}
|
||||||
|
|
||||||
|
memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t HLERequestContext::WriteBufferC(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index) const {
|
||||||
|
if (buffer_index >= BufferDescriptorC().size() || size == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto buffer_size{BufferDescriptorC()[buffer_index].Size()};
|
||||||
|
if (size > buffer_size) {
|
||||||
|
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size,
|
||||||
|
buffer_size);
|
||||||
|
size = buffer_size; // TODO(bunnei): This needs to be HW tested
|
||||||
|
}
|
||||||
|
|
||||||
|
memory.WriteBlock(BufferDescriptorC()[buffer_index].Address(), buffer, size);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t HLERequestContext::GetReadBufferSize(std::size_t buffer_index) const {
|
||||||
|
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
||||||
|
BufferDescriptorA()[buffer_index].Size()};
|
||||||
|
if (is_buffer_a) {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorA().size() > buffer_index, { return 0; },
|
||||||
|
"BufferDescriptorA invalid buffer_index {}", buffer_index);
|
||||||
|
return BufferDescriptorA()[buffer_index].Size();
|
||||||
|
} else {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorX().size() > buffer_index, { return 0; },
|
||||||
|
"BufferDescriptorX invalid buffer_index {}", buffer_index);
|
||||||
|
return BufferDescriptorX()[buffer_index].Size();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t HLERequestContext::GetWriteBufferSize(std::size_t buffer_index) const {
|
||||||
|
const bool is_buffer_b{BufferDescriptorB().size() > buffer_index &&
|
||||||
|
BufferDescriptorB()[buffer_index].Size()};
|
||||||
|
if (is_buffer_b) {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorB().size() > buffer_index, { return 0; },
|
||||||
|
"BufferDescriptorB invalid buffer_index {}", buffer_index);
|
||||||
|
return BufferDescriptorB()[buffer_index].Size();
|
||||||
|
} else {
|
||||||
|
ASSERT_OR_EXECUTE_MSG(
|
||||||
|
BufferDescriptorC().size() > buffer_index, { return 0; },
|
||||||
|
"BufferDescriptorC invalid buffer_index {}", buffer_index);
|
||||||
|
return BufferDescriptorC()[buffer_index].Size();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HLERequestContext::CanReadBuffer(std::size_t buffer_index) const {
|
||||||
|
const bool is_buffer_a{BufferDescriptorA().size() > buffer_index &&
|
||||||
|
BufferDescriptorA()[buffer_index].Size()};
|
||||||
|
|
||||||
|
if (is_buffer_a) {
|
||||||
|
return BufferDescriptorA().size() > buffer_index;
|
||||||
|
} else {
|
||||||
|
return BufferDescriptorX().size() > buffer_index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HLERequestContext::CanWriteBuffer(std::size_t buffer_index) const {
|
||||||
|
const bool is_buffer_b{BufferDescriptorB().size() > buffer_index &&
|
||||||
|
BufferDescriptorB()[buffer_index].Size()};
|
||||||
|
|
||||||
|
if (is_buffer_b) {
|
||||||
|
return BufferDescriptorB().size() > buffer_index;
|
||||||
|
} else {
|
||||||
|
return BufferDescriptorC().size() > buffer_index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string HLERequestContext::Description() const {
|
||||||
|
if (!command_header) {
|
||||||
|
return "No command header available";
|
||||||
|
}
|
||||||
|
std::ostringstream s;
|
||||||
|
s << "IPC::CommandHeader: Type:" << static_cast<u32>(command_header->type.Value());
|
||||||
|
s << ", X(Pointer):" << command_header->num_buf_x_descriptors;
|
||||||
|
if (command_header->num_buf_x_descriptors) {
|
||||||
|
s << '[';
|
||||||
|
for (u64 i = 0; i < command_header->num_buf_x_descriptors; ++i) {
|
||||||
|
s << "0x" << std::hex << BufferDescriptorX()[i].Size();
|
||||||
|
if (i < command_header->num_buf_x_descriptors - 1)
|
||||||
|
s << ", ";
|
||||||
|
}
|
||||||
|
s << ']';
|
||||||
|
}
|
||||||
|
s << ", A(Send):" << command_header->num_buf_a_descriptors;
|
||||||
|
if (command_header->num_buf_a_descriptors) {
|
||||||
|
s << '[';
|
||||||
|
for (u64 i = 0; i < command_header->num_buf_a_descriptors; ++i) {
|
||||||
|
s << "0x" << std::hex << BufferDescriptorA()[i].Size();
|
||||||
|
if (i < command_header->num_buf_a_descriptors - 1)
|
||||||
|
s << ", ";
|
||||||
|
}
|
||||||
|
s << ']';
|
||||||
|
}
|
||||||
|
s << ", B(Receive):" << command_header->num_buf_b_descriptors;
|
||||||
|
if (command_header->num_buf_b_descriptors) {
|
||||||
|
s << '[';
|
||||||
|
for (u64 i = 0; i < command_header->num_buf_b_descriptors; ++i) {
|
||||||
|
s << "0x" << std::hex << BufferDescriptorB()[i].Size();
|
||||||
|
if (i < command_header->num_buf_b_descriptors - 1)
|
||||||
|
s << ", ";
|
||||||
|
}
|
||||||
|
s << ']';
|
||||||
|
}
|
||||||
|
s << ", C(ReceiveList):" << BufferDescriptorC().size();
|
||||||
|
if (!BufferDescriptorC().empty()) {
|
||||||
|
s << '[';
|
||||||
|
for (u64 i = 0; i < BufferDescriptorC().size(); ++i) {
|
||||||
|
s << "0x" << std::hex << BufferDescriptorC()[i].Size();
|
||||||
|
if (i < BufferDescriptorC().size() - 1)
|
||||||
|
s << ", ";
|
||||||
|
}
|
||||||
|
s << ']';
|
||||||
|
}
|
||||||
|
s << ", data_size:" << command_header->data_size.Value();
|
||||||
|
|
||||||
|
return s.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service
|
408
src/core/hle/service/hle_ipc.h
Executable file
408
src/core/hle/service/hle_ipc.h
Executable file
|
@ -0,0 +1,408 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
|
#include <span>
|
||||||
|
#include <string>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "common/concepts.h"
|
||||||
|
#include "common/swap.h"
|
||||||
|
#include "core/hle/ipc.h"
|
||||||
|
#include "core/hle/kernel/svc_common.h"
|
||||||
|
|
||||||
|
union Result;
|
||||||
|
|
||||||
|
namespace Core::Memory {
|
||||||
|
class Memory;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace IPC {
|
||||||
|
class ResponseBuilder;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
class ServiceFrameworkBase;
|
||||||
|
class ServerManager;
|
||||||
|
} // namespace Service
|
||||||
|
|
||||||
|
namespace Kernel {
|
||||||
|
class KAutoObject;
|
||||||
|
class KernelCore;
|
||||||
|
class KHandleTable;
|
||||||
|
class KServerSession;
|
||||||
|
class KThread;
|
||||||
|
} // namespace Kernel
|
||||||
|
|
||||||
|
namespace Service {
|
||||||
|
|
||||||
|
using Handle = Kernel::Handle;
|
||||||
|
|
||||||
|
class HLERequestContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface implemented by HLE Session handlers.
|
||||||
|
* This can be provided to a ServerSession in order to hook into several relevant events
|
||||||
|
* (such as a new connection or a SyncRequest) so they can be implemented in the emulator.
|
||||||
|
*/
|
||||||
|
class SessionRequestHandler : public std::enable_shared_from_this<SessionRequestHandler> {
|
||||||
|
public:
|
||||||
|
SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_);
|
||||||
|
virtual ~SessionRequestHandler();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a sync request from the emulated application.
|
||||||
|
* @param server_session The ServerSession that was triggered for this sync request,
|
||||||
|
* it should be used to differentiate which client (As in ClientSession) we're answering to.
|
||||||
|
* TODO(Subv): Use a wrapper structure to hold all the information relevant to
|
||||||
|
* this request (ServerSession, Originator thread, Translated command buffer, etc).
|
||||||
|
* @returns Result the result code of the translate operation.
|
||||||
|
*/
|
||||||
|
virtual Result HandleSyncRequest(Kernel::KServerSession& session,
|
||||||
|
HLERequestContext& context) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Kernel::KernelCore& kernel;
|
||||||
|
};
|
||||||
|
|
||||||
|
using SessionRequestHandlerWeakPtr = std::weak_ptr<SessionRequestHandler>;
|
||||||
|
using SessionRequestHandlerPtr = std::shared_ptr<SessionRequestHandler>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages the underlying HLE requests for a session, and whether (or not) the session should be
|
||||||
|
* treated as a domain. This is managed separately from server sessions, as this state is shared
|
||||||
|
* when objects are cloned.
|
||||||
|
*/
|
||||||
|
class SessionRequestManager final {
|
||||||
|
public:
|
||||||
|
explicit SessionRequestManager(Kernel::KernelCore& kernel,
|
||||||
|
Service::ServerManager& server_manager);
|
||||||
|
~SessionRequestManager();
|
||||||
|
|
||||||
|
bool IsDomain() const {
|
||||||
|
return is_domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConvertToDomain() {
|
||||||
|
domain_handlers = {session_handler};
|
||||||
|
is_domain = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConvertToDomainOnRequestEnd() {
|
||||||
|
convert_to_domain = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t DomainHandlerCount() const {
|
||||||
|
return domain_handlers.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HasSessionHandler() const {
|
||||||
|
return session_handler != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
SessionRequestHandler& SessionHandler() {
|
||||||
|
return *session_handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SessionRequestHandler& SessionHandler() const {
|
||||||
|
return *session_handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CloseDomainHandler(std::size_t index) {
|
||||||
|
if (index < DomainHandlerCount()) {
|
||||||
|
domain_handlers[index] = nullptr;
|
||||||
|
} else {
|
||||||
|
ASSERT_MSG(false, "Unexpected handler index {}", index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SessionRequestHandlerWeakPtr DomainHandler(std::size_t index) const {
|
||||||
|
ASSERT_MSG(index < DomainHandlerCount(), "Unexpected handler index {}", index);
|
||||||
|
return domain_handlers.at(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppendDomainHandler(SessionRequestHandlerPtr&& handler) {
|
||||||
|
domain_handlers.emplace_back(std::move(handler));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetSessionHandler(SessionRequestHandlerPtr&& handler) {
|
||||||
|
session_handler = std::move(handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HasSessionRequestHandler(const HLERequestContext& context) const;
|
||||||
|
|
||||||
|
Result HandleDomainSyncRequest(Kernel::KServerSession* server_session,
|
||||||
|
HLERequestContext& context);
|
||||||
|
Result CompleteSyncRequest(Kernel::KServerSession* server_session, HLERequestContext& context);
|
||||||
|
|
||||||
|
Service::ServerManager& GetServerManager() {
|
||||||
|
return server_manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: remove this when sm: is implemented with the proper IUserInterface
|
||||||
|
// abstraction, creating a new C++ handler object for each session:
|
||||||
|
|
||||||
|
bool GetIsInitializedForSm() const {
|
||||||
|
return is_initialized_for_sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetIsInitializedForSm() {
|
||||||
|
is_initialized_for_sm = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool convert_to_domain{};
|
||||||
|
bool is_domain{};
|
||||||
|
bool is_initialized_for_sm{};
|
||||||
|
SessionRequestHandlerPtr session_handler;
|
||||||
|
std::vector<SessionRequestHandlerPtr> domain_handlers;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Kernel::KernelCore& kernel;
|
||||||
|
Service::ServerManager& server_manager;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class containing information about an in-flight IPC request being handled by an HLE service
|
||||||
|
* implementation.
|
||||||
|
*/
|
||||||
|
class HLERequestContext {
|
||||||
|
public:
|
||||||
|
explicit HLERequestContext(Kernel::KernelCore& kernel, Core::Memory::Memory& memory,
|
||||||
|
Kernel::KServerSession* session, Kernel::KThread* thread);
|
||||||
|
~HLERequestContext();
|
||||||
|
|
||||||
|
/// Returns a pointer to the IPC command buffer for this request.
|
||||||
|
[[nodiscard]] u32* CommandBuffer() {
|
||||||
|
return cmd_buf.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the session through which this request was made. This can be used as a map key to
|
||||||
|
* access per-client data on services.
|
||||||
|
*/
|
||||||
|
[[nodiscard]] Kernel::KServerSession* Session() {
|
||||||
|
return server_session;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Populates this context with data from the requesting process/thread.
|
||||||
|
Result PopulateFromIncomingCommandBuffer(const Kernel::KHandleTable& handle_table,
|
||||||
|
u32_le* src_cmdbuf);
|
||||||
|
|
||||||
|
/// Writes data from this context back to the requesting process/thread.
|
||||||
|
Result WriteToOutgoingCommandBuffer(Kernel::KThread& requesting_thread);
|
||||||
|
|
||||||
|
[[nodiscard]] u32_le GetHipcCommand() const {
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] u32_le GetTipcCommand() const {
|
||||||
|
return static_cast<u32_le>(command_header->type.Value()) -
|
||||||
|
static_cast<u32_le>(IPC::CommandType::TIPC_CommandRegion);
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] u32_le GetCommand() const {
|
||||||
|
return command_header->IsTipc() ? GetTipcCommand() : GetHipcCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] bool IsTipc() const {
|
||||||
|
return command_header->IsTipc();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] IPC::CommandType GetCommandType() const {
|
||||||
|
return command_header->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] u64 GetPID() const {
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] u32 GetDataPayloadOffset() const {
|
||||||
|
return data_payload_offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const std::vector<IPC::BufferDescriptorX>& BufferDescriptorX() const {
|
||||||
|
return buffer_x_desciptors;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const std::vector<IPC::BufferDescriptorABW>& BufferDescriptorA() const {
|
||||||
|
return buffer_a_desciptors;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const std::vector<IPC::BufferDescriptorABW>& BufferDescriptorB() const {
|
||||||
|
return buffer_b_desciptors;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const std::vector<IPC::BufferDescriptorC>& BufferDescriptorC() const {
|
||||||
|
return buffer_c_desciptors;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const IPC::DomainMessageHeader& GetDomainMessageHeader() const {
|
||||||
|
return domain_message_header.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] bool HasDomainMessageHeader() const {
|
||||||
|
return domain_message_header.has_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper function to get a span of a buffer using the appropriate buffer descriptor
|
||||||
|
[[nodiscard]] std::span<const u8> ReadBuffer(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to read a copy of a buffer using the appropriate buffer descriptor
|
||||||
|
[[nodiscard]] std::vector<u8> ReadBufferCopy(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to write a buffer using the appropriate buffer descriptor
|
||||||
|
std::size_t WriteBuffer(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to write buffer B
|
||||||
|
std::size_t WriteBufferB(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to write buffer C
|
||||||
|
std::size_t WriteBufferC(const void* buffer, std::size_t size,
|
||||||
|
std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/* Helper function to write a buffer using the appropriate buffer descriptor
|
||||||
|
*
|
||||||
|
* @tparam T an arbitrary container that satisfies the
|
||||||
|
* ContiguousContainer concept in the C++ standard library or a trivially copyable type.
|
||||||
|
*
|
||||||
|
* @param data The container/data to write into a buffer.
|
||||||
|
* @param buffer_index The buffer in particular to write to.
|
||||||
|
*/
|
||||||
|
template <typename T, typename = std::enable_if_t<!std::is_pointer_v<T>>>
|
||||||
|
std::size_t WriteBuffer(const T& data, std::size_t buffer_index = 0) const {
|
||||||
|
if constexpr (Common::IsContiguousContainer<T>) {
|
||||||
|
using ContiguousType = typename T::value_type;
|
||||||
|
static_assert(std::is_trivially_copyable_v<ContiguousType>,
|
||||||
|
"Container to WriteBuffer must contain trivially copyable objects");
|
||||||
|
return WriteBuffer(std::data(data), std::size(data) * sizeof(ContiguousType),
|
||||||
|
buffer_index);
|
||||||
|
} else {
|
||||||
|
static_assert(std::is_trivially_copyable_v<T>, "T must be trivially copyable");
|
||||||
|
return WriteBuffer(&data, sizeof(T), buffer_index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper function to get the size of the input buffer
|
||||||
|
[[nodiscard]] std::size_t GetReadBufferSize(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to get the size of the output buffer
|
||||||
|
[[nodiscard]] std::size_t GetWriteBufferSize(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to derive the number of elements able to be contained in the read buffer
|
||||||
|
template <typename T>
|
||||||
|
[[nodiscard]] std::size_t GetReadBufferNumElements(std::size_t buffer_index = 0) const {
|
||||||
|
return GetReadBufferSize(buffer_index) / sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper function to derive the number of elements able to be contained in the write buffer
|
||||||
|
template <typename T>
|
||||||
|
[[nodiscard]] std::size_t GetWriteBufferNumElements(std::size_t buffer_index = 0) const {
|
||||||
|
return GetWriteBufferSize(buffer_index) / sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Helper function to test whether the input buffer at buffer_index can be read
|
||||||
|
[[nodiscard]] bool CanReadBuffer(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
/// Helper function to test whether the output buffer at buffer_index can be written
|
||||||
|
[[nodiscard]] bool CanWriteBuffer(std::size_t buffer_index = 0) const;
|
||||||
|
|
||||||
|
[[nodiscard]] Handle GetCopyHandle(std::size_t index) const {
|
||||||
|
return incoming_copy_handles.at(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] Handle GetMoveHandle(std::size_t index) const {
|
||||||
|
return incoming_move_handles.at(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddMoveObject(Kernel::KAutoObject* object) {
|
||||||
|
outgoing_move_objects.emplace_back(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCopyObject(Kernel::KAutoObject* object) {
|
||||||
|
outgoing_copy_objects.emplace_back(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddDomainObject(SessionRequestHandlerPtr object) {
|
||||||
|
outgoing_domain_objects.emplace_back(std::move(object));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
std::shared_ptr<T> GetDomainHandler(std::size_t index) const {
|
||||||
|
return std::static_pointer_cast<T>(GetManager()->DomainHandler(index).lock());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetSessionRequestManager(std::weak_ptr<SessionRequestManager> manager_) {
|
||||||
|
manager = manager_;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] std::string Description() const;
|
||||||
|
|
||||||
|
[[nodiscard]] Kernel::KThread& GetThread() {
|
||||||
|
return *thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] std::shared_ptr<SessionRequestManager> GetManager() const {
|
||||||
|
return manager.lock();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetIsDeferred() const {
|
||||||
|
return is_deferred;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetIsDeferred(bool is_deferred_ = true) {
|
||||||
|
is_deferred = is_deferred_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class IPC::ResponseBuilder;
|
||||||
|
|
||||||
|
void ParseCommandBuffer(const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf,
|
||||||
|
bool incoming);
|
||||||
|
|
||||||
|
std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf;
|
||||||
|
Kernel::KServerSession* server_session{};
|
||||||
|
Kernel::KThread* thread;
|
||||||
|
|
||||||
|
std::vector<Handle> incoming_move_handles;
|
||||||
|
std::vector<Handle> incoming_copy_handles;
|
||||||
|
|
||||||
|
std::vector<Kernel::KAutoObject*> outgoing_move_objects;
|
||||||
|
std::vector<Kernel::KAutoObject*> outgoing_copy_objects;
|
||||||
|
std::vector<SessionRequestHandlerPtr> outgoing_domain_objects;
|
||||||
|
|
||||||
|
std::optional<IPC::CommandHeader> command_header;
|
||||||
|
std::optional<IPC::HandleDescriptorHeader> handle_descriptor_header;
|
||||||
|
std::optional<IPC::DataPayloadHeader> data_payload_header;
|
||||||
|
std::optional<IPC::DomainMessageHeader> domain_message_header;
|
||||||
|
std::vector<IPC::BufferDescriptorX> buffer_x_desciptors;
|
||||||
|
std::vector<IPC::BufferDescriptorABW> buffer_a_desciptors;
|
||||||
|
std::vector<IPC::BufferDescriptorABW> buffer_b_desciptors;
|
||||||
|
std::vector<IPC::BufferDescriptorABW> buffer_w_desciptors;
|
||||||
|
std::vector<IPC::BufferDescriptorC> buffer_c_desciptors;
|
||||||
|
|
||||||
|
u32_le command{};
|
||||||
|
u64 pid{};
|
||||||
|
u32 write_size{};
|
||||||
|
u32 data_payload_offset{};
|
||||||
|
u32 handles_offset{};
|
||||||
|
u32 domain_offset{};
|
||||||
|
|
||||||
|
std::weak_ptr<SessionRequestManager> manager{};
|
||||||
|
bool is_deferred{false};
|
||||||
|
|
||||||
|
Kernel::KernelCore& kernel;
|
||||||
|
Core::Memory::Memory& memory;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service
|
505
src/core/hle/service/ipc_helpers.h
Executable file
505
src/core/hle/service/ipc_helpers.h
Executable file
|
@ -0,0 +1,505 @@
|
||||||
|
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <memory>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "core/hle/ipc.h"
|
||||||
|
#include "core/hle/kernel/k_process.h"
|
||||||
|
#include "core/hle/kernel/k_resource_limit.h"
|
||||||
|
#include "core/hle/kernel/k_session.h"
|
||||||
|
#include "core/hle/result.h"
|
||||||
|
#include "core/hle/service/hle_ipc.h"
|
||||||
|
#include "core/hle/service/server_manager.h"
|
||||||
|
|
||||||
|
namespace IPC {
|
||||||
|
|
||||||
|
constexpr Result ERR_REMOTE_PROCESS_DEAD{ErrorModule::HIPC, 301};
|
||||||
|
|
||||||
|
class RequestHelperBase {
|
||||||
|
protected:
|
||||||
|
Service::HLERequestContext* context = nullptr;
|
||||||
|
u32* cmdbuf;
|
||||||
|
u32 index = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RequestHelperBase(u32* command_buffer) : cmdbuf(command_buffer) {}
|
||||||
|
|
||||||
|
explicit RequestHelperBase(Service::HLERequestContext& ctx)
|
||||||
|
: context(&ctx), cmdbuf(ctx.CommandBuffer()) {}
|
||||||
|
|
||||||
|
void Skip(u32 size_in_words, bool set_to_null) {
|
||||||
|
if (set_to_null) {
|
||||||
|
memset(cmdbuf + index, 0, size_in_words * sizeof(u32));
|
||||||
|
}
|
||||||
|
index += size_in_words;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Aligns the current position forward to a 16-byte boundary, padding with zeros.
|
||||||
|
*/
|
||||||
|
void AlignWithPadding() {
|
||||||
|
if (index & 3) {
|
||||||
|
Skip(static_cast<u32>(4 - (index & 3)), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 GetCurrentOffset() const {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetCurrentOffset(u32 offset) {
|
||||||
|
index = offset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ResponseBuilder : public RequestHelperBase {
|
||||||
|
public:
|
||||||
|
/// Flags used for customizing the behavior of ResponseBuilder
|
||||||
|
enum class Flags : u32 {
|
||||||
|
None = 0,
|
||||||
|
/// Uses move handles to move objects in the response, even when in a domain. This is
|
||||||
|
/// required when PushMoveObjects is used.
|
||||||
|
AlwaysMoveHandles = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
explicit ResponseBuilder(Service::HLERequestContext& ctx, u32 normal_params_size_,
|
||||||
|
u32 num_handles_to_copy_ = 0, u32 num_objects_to_move_ = 0,
|
||||||
|
Flags flags = Flags::None)
|
||||||
|
: RequestHelperBase(ctx), normal_params_size(normal_params_size_),
|
||||||
|
num_handles_to_copy(num_handles_to_copy_),
|
||||||
|
num_objects_to_move(num_objects_to_move_), kernel{ctx.kernel} {
|
||||||
|
|
||||||
|
memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH);
|
||||||
|
|
||||||
|
IPC::CommandHeader header{};
|
||||||
|
|
||||||
|
// The entire size of the raw data section in u32 units, including the 16 bytes of mandatory
|
||||||
|
// padding.
|
||||||
|
u32 raw_data_size = ctx.write_size =
|
||||||
|
ctx.IsTipc() ? normal_params_size - 1 : normal_params_size;
|
||||||
|
u32 num_handles_to_move{};
|
||||||
|
u32 num_domain_objects{};
|
||||||
|
const bool always_move_handles{
|
||||||
|
(static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0};
|
||||||
|
if (!ctx.GetManager()->IsDomain() || always_move_handles) {
|
||||||
|
num_handles_to_move = num_objects_to_move;
|
||||||
|
} else {
|
||||||
|
num_domain_objects = num_objects_to_move;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx.GetManager()->IsDomain()) {
|
||||||
|
raw_data_size +=
|
||||||
|
static_cast<u32>(sizeof(DomainMessageHeader) / sizeof(u32) + num_domain_objects);
|
||||||
|
ctx.write_size += num_domain_objects;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx.IsTipc()) {
|
||||||
|
header.type.Assign(ctx.GetCommandType());
|
||||||
|
} else {
|
||||||
|
raw_data_size += static_cast<u32>(sizeof(IPC::DataPayloadHeader) / sizeof(u32) + 4 +
|
||||||
|
normal_params_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
header.data_size.Assign(raw_data_size);
|
||||||
|
if (num_handles_to_copy || num_handles_to_move) {
|
||||||
|
header.enable_handle_descriptor.Assign(1);
|
||||||
|
}
|
||||||
|
PushRaw(header);
|
||||||
|
|
||||||
|
if (header.enable_handle_descriptor) {
|
||||||
|
IPC::HandleDescriptorHeader handle_descriptor_header{};
|
||||||
|
handle_descriptor_header.num_handles_to_copy.Assign(num_handles_to_copy_);
|
||||||
|
handle_descriptor_header.num_handles_to_move.Assign(num_handles_to_move);
|
||||||
|
PushRaw(handle_descriptor_header);
|
||||||
|
|
||||||
|
ctx.handles_offset = index;
|
||||||
|
|
||||||
|
Skip(num_handles_to_copy + num_handles_to_move, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ctx.IsTipc()) {
|
||||||
|
AlignWithPadding();
|
||||||
|
|
||||||
|
if (ctx.GetManager()->IsDomain() && ctx.HasDomainMessageHeader()) {
|
||||||
|
IPC::DomainMessageHeader domain_header{};
|
||||||
|
domain_header.num_objects = num_domain_objects;
|
||||||
|
PushRaw(domain_header);
|
||||||
|
}
|
||||||
|
|
||||||
|
IPC::DataPayloadHeader data_payload_header{};
|
||||||
|
data_payload_header.magic = Common::MakeMagic('S', 'F', 'C', 'O');
|
||||||
|
PushRaw(data_payload_header);
|
||||||
|
}
|
||||||
|
|
||||||
|
data_payload_index = index;
|
||||||
|
|
||||||
|
ctx.data_payload_offset = index;
|
||||||
|
ctx.write_size += index;
|
||||||
|
ctx.domain_offset = static_cast<u32>(index + raw_data_size / sizeof(u32));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
void PushIpcInterface(std::shared_ptr<T> iface) {
|
||||||
|
auto manager{context->GetManager()};
|
||||||
|
|
||||||
|
if (manager->IsDomain()) {
|
||||||
|
context->AddDomainObject(std::move(iface));
|
||||||
|
} else {
|
||||||
|
kernel.ApplicationProcess()->GetResourceLimit()->Reserve(
|
||||||
|
Kernel::LimitableResource::SessionCountMax, 1);
|
||||||
|
|
||||||
|
auto* session = Kernel::KSession::Create(kernel);
|
||||||
|
session->Initialize(nullptr, iface->GetServiceName());
|
||||||
|
|
||||||
|
auto next_manager = std::make_shared<Service::SessionRequestManager>(
|
||||||
|
kernel, manager->GetServerManager());
|
||||||
|
next_manager->SetSessionHandler(iface);
|
||||||
|
manager->GetServerManager().RegisterSession(&session->GetServerSession(), next_manager);
|
||||||
|
|
||||||
|
context->AddMoveObject(&session->GetClientSession());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T, class... Args>
|
||||||
|
void PushIpcInterface(Args&&... args) {
|
||||||
|
PushIpcInterface<T>(std::make_shared<T>(std::forward<Args>(args)...));
|
||||||
|
}
|
||||||
|
|
||||||
|
void PushImpl(s8 value);
|
||||||
|
void PushImpl(s16 value);
|
||||||
|
void PushImpl(s32 value);
|
||||||
|
void PushImpl(s64 value);
|
||||||
|
void PushImpl(u8 value);
|
||||||
|
void PushImpl(u16 value);
|
||||||
|
void PushImpl(u32 value);
|
||||||
|
void PushImpl(u64 value);
|
||||||
|
void PushImpl(float value);
|
||||||
|
void PushImpl(double value);
|
||||||
|
void PushImpl(bool value);
|
||||||
|
void PushImpl(Result value);
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void Push(T value) {
|
||||||
|
return PushImpl(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename First, typename... Other>
|
||||||
|
void Push(const First& first_value, const Other&... other_values);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function for pushing strongly-typed enumeration values.
|
||||||
|
*
|
||||||
|
* @tparam Enum The enumeration type to be pushed
|
||||||
|
*
|
||||||
|
* @param value The value to push.
|
||||||
|
*
|
||||||
|
* @note The underlying size of the enumeration type is the size of the
|
||||||
|
* data that gets pushed. e.g. "enum class SomeEnum : u16" will
|
||||||
|
* push a u16-sized amount of data.
|
||||||
|
*/
|
||||||
|
template <typename Enum>
|
||||||
|
void PushEnum(Enum value) {
|
||||||
|
static_assert(std::is_enum_v<Enum>, "T must be an enum type within a PushEnum call.");
|
||||||
|
static_assert(!std::is_convertible_v<Enum, int>,
|
||||||
|
"enum type in PushEnum must be a strongly typed enum.");
|
||||||
|
Push(static_cast<std::underlying_type_t<Enum>>(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Copies the content of the given trivially copyable class to the buffer as a normal
|
||||||
|
* param
|
||||||
|
* @note: The input class must be correctly packed/padded to fit hardware layout.
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
void PushRaw(const T& value);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushMoveObjects(O*... pointers);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushMoveObjects(O&... pointers);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushCopyObjects(O*... pointers);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushCopyObjects(O&... pointers);
|
||||||
|
|
||||||
|
private:
|
||||||
|
u32 normal_params_size{};
|
||||||
|
u32 num_handles_to_copy{};
|
||||||
|
u32 num_objects_to_move{}; ///< Domain objects or move handles, context dependent
|
||||||
|
u32 data_payload_index{};
|
||||||
|
Kernel::KernelCore& kernel;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Push ///
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(s32 value) {
|
||||||
|
cmdbuf[index++] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(u32 value) {
|
||||||
|
cmdbuf[index++] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void ResponseBuilder::PushRaw(const T& value) {
|
||||||
|
static_assert(std::is_trivially_copyable_v<T>,
|
||||||
|
"It's undefined behavior to use memcpy with non-trivially copyable objects");
|
||||||
|
std::memcpy(cmdbuf + index, &value, sizeof(T));
|
||||||
|
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(Result value) {
|
||||||
|
// Result codes are actually 64-bit in the IPC buffer, but only the high part is discarded.
|
||||||
|
Push(value.raw);
|
||||||
|
Push<u32>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(s8 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(s16 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(s64 value) {
|
||||||
|
PushImpl(static_cast<u32>(value));
|
||||||
|
PushImpl(static_cast<u32>(value >> 32));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(u8 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(u16 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(u64 value) {
|
||||||
|
PushImpl(static_cast<u32>(value));
|
||||||
|
PushImpl(static_cast<u32>(value >> 32));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(float value) {
|
||||||
|
u32 integral;
|
||||||
|
std::memcpy(&integral, &value, sizeof(u32));
|
||||||
|
PushImpl(integral);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(double value) {
|
||||||
|
u64 integral;
|
||||||
|
std::memcpy(&integral, &value, sizeof(u64));
|
||||||
|
PushImpl(integral);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ResponseBuilder::PushImpl(bool value) {
|
||||||
|
PushImpl(static_cast<u8>(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename First, typename... Other>
|
||||||
|
void ResponseBuilder::Push(const First& first_value, const Other&... other_values) {
|
||||||
|
Push(first_value);
|
||||||
|
Push(other_values...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushCopyObjects(O*... pointers) {
|
||||||
|
auto objects = {pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddCopyObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushCopyObjects(O&... pointers) {
|
||||||
|
auto objects = {&pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddCopyObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushMoveObjects(O*... pointers) {
|
||||||
|
auto objects = {pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddMoveObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushMoveObjects(O&... pointers) {
|
||||||
|
auto objects = {&pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddMoveObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RequestParser : public RequestHelperBase {
|
||||||
|
public:
|
||||||
|
explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {}
|
||||||
|
|
||||||
|
explicit RequestParser(Service::HLERequestContext& ctx) : RequestHelperBase(ctx) {
|
||||||
|
// TIPC does not have data payload offset
|
||||||
|
if (!ctx.IsTipc()) {
|
||||||
|
ASSERT_MSG(ctx.GetDataPayloadOffset(), "context is incomplete");
|
||||||
|
Skip(ctx.GetDataPayloadOffset(), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip the u64 command id, it's already stored in the context
|
||||||
|
static constexpr u32 CommandIdSize = 2;
|
||||||
|
Skip(CommandIdSize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T Pop();
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void Pop(T& value);
|
||||||
|
|
||||||
|
template <typename First, typename... Other>
|
||||||
|
void Pop(First& first_value, Other&... other_values);
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T PopEnum() {
|
||||||
|
static_assert(std::is_enum_v<T>, "T must be an enum type within a PopEnum call.");
|
||||||
|
static_assert(!std::is_convertible_v<T, int>,
|
||||||
|
"enum type in PopEnum must be a strongly typed enum.");
|
||||||
|
return static_cast<T>(Pop<std::underlying_type_t<T>>());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads the next normal parameters as a struct, by copying it
|
||||||
|
* @note: The output class must be correctly packed/padded to fit hardware layout.
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
void PopRaw(T& value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reads the next normal parameters as a struct, by copying it into a new value
|
||||||
|
* @note: The output class must be correctly packed/padded to fit hardware layout.
|
||||||
|
*/
|
||||||
|
template <typename T>
|
||||||
|
T PopRaw();
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
std::weak_ptr<T> PopIpcInterface() {
|
||||||
|
ASSERT(context->GetManager()->IsDomain());
|
||||||
|
ASSERT(context->GetDomainMessageHeader().input_object_count > 0);
|
||||||
|
return context->GetDomainHandler<T>(Pop<u32>() - 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Pop ///
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline u32 RequestParser::Pop() {
|
||||||
|
return cmdbuf[index++];
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline s32 RequestParser::Pop() {
|
||||||
|
return static_cast<s32>(Pop<u32>());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects.
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||||
|
#endif
|
||||||
|
template <typename T>
|
||||||
|
void RequestParser::PopRaw(T& value) {
|
||||||
|
static_assert(std::is_trivially_copyable_v<T>,
|
||||||
|
"It's undefined behavior to use memcpy with non-trivially copyable objects");
|
||||||
|
std::memcpy(&value, cmdbuf + index, sizeof(T));
|
||||||
|
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||||
|
}
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T RequestParser::PopRaw() {
|
||||||
|
T value;
|
||||||
|
PopRaw(value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline u8 RequestParser::Pop() {
|
||||||
|
return PopRaw<u8>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline u16 RequestParser::Pop() {
|
||||||
|
return PopRaw<u16>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline u64 RequestParser::Pop() {
|
||||||
|
const u64 lsw = Pop<u32>();
|
||||||
|
const u64 msw = Pop<u32>();
|
||||||
|
return msw << 32 | lsw;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline s8 RequestParser::Pop() {
|
||||||
|
return static_cast<s8>(Pop<u8>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline s16 RequestParser::Pop() {
|
||||||
|
return static_cast<s16>(Pop<u16>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline s64 RequestParser::Pop() {
|
||||||
|
return static_cast<s64>(Pop<u64>());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline float RequestParser::Pop() {
|
||||||
|
const u32 value = Pop<u32>();
|
||||||
|
float real;
|
||||||
|
std::memcpy(&real, &value, sizeof(real));
|
||||||
|
return real;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline double RequestParser::Pop() {
|
||||||
|
const u64 value = Pop<u64>();
|
||||||
|
double real;
|
||||||
|
std::memcpy(&real, &value, sizeof(real));
|
||||||
|
return real;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline bool RequestParser::Pop() {
|
||||||
|
return Pop<u8>() != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline Result RequestParser::Pop() {
|
||||||
|
return Result{Pop<u32>()};
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void RequestParser::Pop(T& value) {
|
||||||
|
value = Pop<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename First, typename... Other>
|
||||||
|
void RequestParser::Pop(First& first_value, Other&... other_values) {
|
||||||
|
first_value = Pop<First>();
|
||||||
|
Pop(other_values...);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace IPC
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
#include "core/arm/symbols.h"
|
#include "core/arm/symbols.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_code_memory.h"
|
#include "core/hle/kernel/k_code_memory.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.h"
|
#include "core/hle/kernel/k_transfer_memory.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/jit/jit.h"
|
#include "core/hle/service/jit/jit.h"
|
||||||
#include "core/hle/service/jit/jit_context.h"
|
#include "core/hle/service/jit/jit_context.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
@ -44,7 +44,7 @@ public:
|
||||||
configuration.sys_rx_memory = user_rx;
|
configuration.sys_rx_memory = user_rx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenerateCode(Kernel::HLERequestContext& ctx) {
|
void GenerateCode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_JIT, "called");
|
LOG_DEBUG(Service_JIT, "called");
|
||||||
|
|
||||||
struct InputParameters {
|
struct InputParameters {
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void Control(Kernel::HLERequestContext& ctx) {
|
void Control(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_JIT, "called");
|
LOG_DEBUG(Service_JIT, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadPlugin(Kernel::HLERequestContext& ctx) {
|
void LoadPlugin(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_JIT, "called");
|
LOG_DEBUG(Service_JIT, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
@ -277,7 +277,7 @@ public:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCodeAddress(Kernel::HLERequestContext& ctx) {
|
void GetCodeAddress(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_JIT, "called");
|
LOG_DEBUG(Service_JIT, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
|
@ -333,7 +333,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateJitEnvironment(Kernel::HLERequestContext& ctx) {
|
void CreateJitEnvironment(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_JIT, "called");
|
LOG_DEBUG(Service_JIT, "called");
|
||||||
|
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/lbl/lbl.h"
|
#include "core/hle/service/lbl/lbl.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -60,7 +60,7 @@ private:
|
||||||
On = 1,
|
On = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) {
|
void SetCurrentBrightnessSetting(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto brightness = rp.Pop<float>();
|
auto brightness = rp.Pop<float>();
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessSetting(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessSetting(HLERequestContext& ctx) {
|
||||||
auto brightness = current_brightness;
|
auto brightness = current_brightness;
|
||||||
if (!std::isfinite(brightness)) {
|
if (!std::isfinite(brightness)) {
|
||||||
LOG_ERROR(Service_LBL, "Brightness is infinite!");
|
LOG_ERROR(Service_LBL, "Brightness is infinite!");
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
rb.Push(brightness);
|
rb.Push(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchBacklightOn(Kernel::HLERequestContext& ctx) {
|
void SwitchBacklightOn(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto fade_time = rp.Pop<u64_le>();
|
const auto fade_time = rp.Pop<u64_le>();
|
||||||
LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time);
|
LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time);
|
||||||
|
@ -103,7 +103,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchBacklightOff(Kernel::HLERequestContext& ctx) {
|
void SwitchBacklightOff(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto fade_time = rp.Pop<u64_le>();
|
const auto fade_time = rp.Pop<u64_le>();
|
||||||
LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time);
|
LOG_WARNING(Service_LBL, "(STUBBED) called, fade_time={}", fade_time);
|
||||||
|
@ -114,7 +114,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBacklightSwitchStatus(Kernel::HLERequestContext& ctx) {
|
void GetBacklightSwitchStatus(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -123,7 +123,7 @@ private:
|
||||||
: BacklightSwitchStatus::Off);
|
: BacklightSwitchStatus::Off);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableDimming(Kernel::HLERequestContext& ctx) {
|
void EnableDimming(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
dimming = true;
|
dimming = true;
|
||||||
|
@ -132,7 +132,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableDimming(Kernel::HLERequestContext& ctx) {
|
void DisableDimming(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
dimming = false;
|
dimming = false;
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsDimmingEnabled(Kernel::HLERequestContext& ctx) {
|
void IsDimmingEnabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -149,7 +149,7 @@ private:
|
||||||
rb.Push(dimming);
|
rb.Push(dimming);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableAutoBrightnessControl(Kernel::HLERequestContext& ctx) {
|
void EnableAutoBrightnessControl(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
auto_brightness = true;
|
auto_brightness = true;
|
||||||
update_instantly = true;
|
update_instantly = true;
|
||||||
|
@ -158,7 +158,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableAutoBrightnessControl(Kernel::HLERequestContext& ctx) {
|
void DisableAutoBrightnessControl(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
auto_brightness = false;
|
auto_brightness = false;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsAutoBrightnessControlEnabled(Kernel::HLERequestContext& ctx) {
|
void IsAutoBrightnessControlEnabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -174,7 +174,7 @@ private:
|
||||||
rb.Push(auto_brightness);
|
rb.Push(auto_brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) {
|
void SetAmbientLightSensorValue(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto light_value = rp.Pop<float>();
|
const auto light_value = rp.Pop<float>();
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetAmbientLightSensorValue(Kernel::HLERequestContext& ctx) {
|
void GetAmbientLightSensorValue(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -194,7 +194,7 @@ private:
|
||||||
rb.Push(ambient_light_value);
|
rb.Push(ambient_light_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) {
|
void SetBrightnessReflectionDelayLevel(HLERequestContext& ctx) {
|
||||||
// This is Intentional, this function does absolutely nothing
|
// This is Intentional, this function does absolutely nothing
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetBrightnessReflectionDelayLevel(Kernel::HLERequestContext& ctx) {
|
void GetBrightnessReflectionDelayLevel(HLERequestContext& ctx) {
|
||||||
// This is intentional, the function is hard coded to return 0.0f on hardware
|
// This is intentional, the function is hard coded to return 0.0f on hardware
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ private:
|
||||||
rb.Push(0.0f);
|
rb.Push(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) {
|
void SetCurrentBrightnessMapping(HLERequestContext& ctx) {
|
||||||
// This is Intentional, this function does absolutely nothing
|
// This is Intentional, this function does absolutely nothing
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessMapping(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessMapping(HLERequestContext& ctx) {
|
||||||
// This is Intentional, this function does absolutely nothing
|
// This is Intentional, this function does absolutely nothing
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ private:
|
||||||
// This function is suppose to return something but it seems like it doesn't
|
// This function is suppose to return something but it seems like it doesn't
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) {
|
void SetCurrentAmbientLightSensorMapping(HLERequestContext& ctx) {
|
||||||
// This is Intentional, this function does absolutely nothing
|
// This is Intentional, this function does absolutely nothing
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentAmbientLightSensorMapping(Kernel::HLERequestContext& ctx) {
|
void GetCurrentAmbientLightSensorMapping(HLERequestContext& ctx) {
|
||||||
// This is Intentional, this function does absolutely nothing
|
// This is Intentional, this function does absolutely nothing
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ private:
|
||||||
// This function is suppose to return something but it seems like it doesn't
|
// This function is suppose to return something but it seems like it doesn't
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsAmbientLightSensorAvailable(Kernel::HLERequestContext& ctx) {
|
void IsAmbientLightSensorAvailable(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LBL, "(STUBBED) called");
|
LOG_WARNING(Service_LBL, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
@ -253,7 +253,7 @@ private:
|
||||||
rb.Push(true);
|
rb.Push(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) {
|
void SetCurrentBrightnessSettingForVrMode(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
auto brightness = rp.Pop<float>();
|
auto brightness = rp.Pop<float>();
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentBrightnessSettingForVrMode(Kernel::HLERequestContext& ctx) {
|
void GetCurrentBrightnessSettingForVrMode(HLERequestContext& ctx) {
|
||||||
auto brightness = current_vr_brightness;
|
auto brightness = current_vr_brightness;
|
||||||
if (!std::isfinite(brightness)) {
|
if (!std::isfinite(brightness)) {
|
||||||
LOG_ERROR(Service_LBL, "Brightness is infinite!");
|
LOG_ERROR(Service_LBL, "Brightness is infinite!");
|
||||||
|
@ -284,7 +284,7 @@ private:
|
||||||
rb.Push(brightness);
|
rb.Push(brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableVrMode(Kernel::HLERequestContext& ctx) {
|
void EnableVrMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -293,7 +293,7 @@ private:
|
||||||
vr_mode_enabled = true;
|
vr_mode_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisableVrMode(Kernel::HLERequestContext& ctx) {
|
void DisableVrMode(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -302,7 +302,7 @@ private:
|
||||||
vr_mode_enabled = false;
|
vr_mode_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
void IsVrModeEnabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LBL, "called");
|
LOG_DEBUG(Service_LBL, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMonitorService(Kernel::HLERequestContext& ctx) {
|
void CreateMonitorService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -169,7 +169,7 @@ public:
|
||||||
state_change_event->Signal();
|
state_change_event->Signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetState(Kernel::HLERequestContext& ctx) {
|
void GetState(HLERequestContext& ctx) {
|
||||||
State state = State::Error;
|
State state = State::Error;
|
||||||
|
|
||||||
if (is_initialized) {
|
if (is_initialized) {
|
||||||
|
@ -181,7 +181,7 @@ public:
|
||||||
rb.PushEnum(state);
|
rb.PushEnum(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNetworkInfo(Kernel::HLERequestContext& ctx) {
|
void GetNetworkInfo(HLERequestContext& ctx) {
|
||||||
const auto write_buffer_size = ctx.GetWriteBufferSize();
|
const auto write_buffer_size = ctx.GetWriteBufferSize();
|
||||||
|
|
||||||
if (write_buffer_size != sizeof(NetworkInfo)) {
|
if (write_buffer_size != sizeof(NetworkInfo)) {
|
||||||
|
@ -205,7 +205,7 @@ public:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetIpv4Address(Kernel::HLERequestContext& ctx) {
|
void GetIpv4Address(HLERequestContext& ctx) {
|
||||||
const auto network_interface = Network::GetSelectedNetworkInterface();
|
const auto network_interface = Network::GetSelectedNetworkInterface();
|
||||||
|
|
||||||
if (!network_interface) {
|
if (!network_interface) {
|
||||||
|
@ -234,13 +234,13 @@ public:
|
||||||
rb.PushRaw(subnet_mask);
|
rb.PushRaw(subnet_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDisconnectReason(Kernel::HLERequestContext& ctx) {
|
void GetDisconnectReason(HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushEnum(lan_discovery.GetDisconnectReason());
|
rb.PushEnum(lan_discovery.GetDisconnectReason());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSecurityParameter(Kernel::HLERequestContext& ctx) {
|
void GetSecurityParameter(HLERequestContext& ctx) {
|
||||||
SecurityParameter security_parameter{};
|
SecurityParameter security_parameter{};
|
||||||
NetworkInfo info{};
|
NetworkInfo info{};
|
||||||
const Result rc = lan_discovery.GetNetworkInfo(info);
|
const Result rc = lan_discovery.GetNetworkInfo(info);
|
||||||
|
@ -261,7 +261,7 @@ public:
|
||||||
rb.PushRaw<SecurityParameter>(security_parameter);
|
rb.PushRaw<SecurityParameter>(security_parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNetworkConfig(Kernel::HLERequestContext& ctx) {
|
void GetNetworkConfig(HLERequestContext& ctx) {
|
||||||
NetworkConfig config{};
|
NetworkConfig config{};
|
||||||
NetworkInfo info{};
|
NetworkInfo info{};
|
||||||
const Result rc = lan_discovery.GetNetworkInfo(info);
|
const Result rc = lan_discovery.GetNetworkInfo(info);
|
||||||
|
@ -283,7 +283,7 @@ public:
|
||||||
rb.PushRaw<NetworkConfig>(config);
|
rb.PushRaw<NetworkConfig>(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttachStateChangeEvent(Kernel::HLERequestContext& ctx) {
|
void AttachStateChangeEvent(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
@ -291,7 +291,7 @@ public:
|
||||||
rb.PushCopyObjects(state_change_event->GetReadableEvent());
|
rb.PushCopyObjects(state_change_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetNetworkInfoLatestUpdate(Kernel::HLERequestContext& ctx) {
|
void GetNetworkInfoLatestUpdate(HLERequestContext& ctx) {
|
||||||
const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0);
|
const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0);
|
||||||
const std::size_t node_buffer_count = ctx.GetWriteBufferNumElements<NodeLatestUpdate>(1);
|
const std::size_t node_buffer_count = ctx.GetWriteBufferNumElements<NodeLatestUpdate>(1);
|
||||||
|
|
||||||
|
@ -321,15 +321,15 @@ public:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scan(Kernel::HLERequestContext& ctx) {
|
void Scan(HLERequestContext& ctx) {
|
||||||
ScanImpl(ctx);
|
ScanImpl(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScanPrivate(Kernel::HLERequestContext& ctx) {
|
void ScanPrivate(HLERequestContext& ctx) {
|
||||||
ScanImpl(ctx, true);
|
ScanImpl(ctx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScanImpl(Kernel::HLERequestContext& ctx, bool is_private = false) {
|
void ScanImpl(HLERequestContext& ctx, bool is_private = false) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto channel{rp.PopEnum<WifiChannel>()};
|
const auto channel{rp.PopEnum<WifiChannel>()};
|
||||||
const auto scan_filter{rp.PopRaw<ScanFilter>()};
|
const auto scan_filter{rp.PopRaw<ScanFilter>()};
|
||||||
|
@ -358,40 +358,40 @@ public:
|
||||||
rb.Push<u32>(count);
|
rb.Push<u32>(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWirelessControllerRestriction(Kernel::HLERequestContext& ctx) {
|
void SetWirelessControllerRestriction(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenAccessPoint(Kernel::HLERequestContext& ctx) {
|
void OpenAccessPoint(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.OpenAccessPoint());
|
rb.Push(lan_discovery.OpenAccessPoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloseAccessPoint(Kernel::HLERequestContext& ctx) {
|
void CloseAccessPoint(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.CloseAccessPoint());
|
rb.Push(lan_discovery.CloseAccessPoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateNetwork(Kernel::HLERequestContext& ctx) {
|
void CreateNetwork(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
CreateNetworkImpl(ctx);
|
CreateNetworkImpl(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateNetworkPrivate(Kernel::HLERequestContext& ctx) {
|
void CreateNetworkPrivate(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
CreateNetworkImpl(ctx, true);
|
CreateNetworkImpl(ctx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateNetworkImpl(Kernel::HLERequestContext& ctx, bool is_private = false) {
|
void CreateNetworkImpl(HLERequestContext& ctx, bool is_private = false) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto security_config{rp.PopRaw<SecurityConfig>()};
|
const auto security_config{rp.PopRaw<SecurityConfig>()};
|
||||||
|
@ -405,49 +405,49 @@ public:
|
||||||
rb.Push(lan_discovery.CreateNetwork(security_config, user_config, network_Config));
|
rb.Push(lan_discovery.CreateNetwork(security_config, user_config, network_Config));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DestroyNetwork(Kernel::HLERequestContext& ctx) {
|
void DestroyNetwork(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.DestroyNetwork());
|
rb.Push(lan_discovery.DestroyNetwork());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAdvertiseData(Kernel::HLERequestContext& ctx) {
|
void SetAdvertiseData(HLERequestContext& ctx) {
|
||||||
const auto read_buffer = ctx.ReadBuffer();
|
const auto read_buffer = ctx.ReadBuffer();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.SetAdvertiseData(read_buffer));
|
rb.Push(lan_discovery.SetAdvertiseData(read_buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetStationAcceptPolicy(Kernel::HLERequestContext& ctx) {
|
void SetStationAcceptPolicy(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddAcceptFilterEntry(Kernel::HLERequestContext& ctx) {
|
void AddAcceptFilterEntry(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenStation(Kernel::HLERequestContext& ctx) {
|
void OpenStation(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.OpenStation());
|
rb.Push(lan_discovery.OpenStation());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloseStation(Kernel::HLERequestContext& ctx) {
|
void CloseStation(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.CloseStation());
|
rb.Push(lan_discovery.CloseStation());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Connect(Kernel::HLERequestContext& ctx) {
|
void Connect(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
SecurityConfig security_config;
|
SecurityConfig security_config;
|
||||||
|
@ -481,14 +481,14 @@ public:
|
||||||
static_cast<u16>(parameters.local_communication_version)));
|
static_cast<u16>(parameters.local_communication_version)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Disconnect(Kernel::HLERequestContext& ctx) {
|
void Disconnect(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_LDN, "called");
|
LOG_INFO(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(lan_discovery.Disconnect());
|
rb.Push(lan_discovery.Disconnect());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
void Initialize(HLERequestContext& ctx) {
|
||||||
const auto rc = InitializeImpl(ctx);
|
const auto rc = InitializeImpl(ctx);
|
||||||
if (rc.IsError()) {
|
if (rc.IsError()) {
|
||||||
LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw);
|
LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw);
|
||||||
|
@ -498,7 +498,7 @@ public:
|
||||||
rb.Push(rc);
|
rb.Push(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Finalize(Kernel::HLERequestContext& ctx) {
|
void Finalize(HLERequestContext& ctx) {
|
||||||
if (auto room_member = room_network.GetRoomMember().lock()) {
|
if (auto room_member = room_network.GetRoomMember().lock()) {
|
||||||
room_member->Unbind(ldn_packet_received);
|
room_member->Unbind(ldn_packet_received);
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,7 @@ public:
|
||||||
rb.Push(lan_discovery.Finalize());
|
rb.Push(lan_discovery.Finalize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize2(Kernel::HLERequestContext& ctx) {
|
void Initialize2(HLERequestContext& ctx) {
|
||||||
const auto rc = InitializeImpl(ctx);
|
const auto rc = InitializeImpl(ctx);
|
||||||
if (rc.IsError()) {
|
if (rc.IsError()) {
|
||||||
LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw);
|
LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw);
|
||||||
|
@ -519,7 +519,7 @@ public:
|
||||||
rb.Push(rc);
|
rb.Push(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result InitializeImpl(Kernel::HLERequestContext& ctx) {
|
Result InitializeImpl(HLERequestContext& ctx) {
|
||||||
const auto network_interface = Network::GetSelectedNetworkInterface();
|
const auto network_interface = Network::GetSelectedNetworkInterface();
|
||||||
if (!network_interface) {
|
if (!network_interface) {
|
||||||
LOG_ERROR(Service_LDN, "No network interface is set");
|
LOG_ERROR(Service_LDN, "No network interface is set");
|
||||||
|
@ -562,7 +562,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateSystemLocalCommunicationService(Kernel::HLERequestContext& ctx) {
|
void CreateSystemLocalCommunicationService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -583,7 +583,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateUserLocalCommunicationService(Kernel::HLERequestContext& ctx) {
|
void CreateUserLocalCommunicationService(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LDN, "called");
|
LOG_DEBUG(Service_LDN, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -647,7 +647,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
void Initialize(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -668,7 +668,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateNetworkervice(Kernel::HLERequestContext& ctx) {
|
void CreateNetworkervice(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 reserved_input = rp.Pop<u64>();
|
const u64 reserved_input = rp.Pop<u64>();
|
||||||
const u32 input = rp.Pop<u32>();
|
const u32 input = rp.Pop<u32>();
|
||||||
|
@ -681,7 +681,7 @@ public:
|
||||||
rb.PushIpcInterface<INetworkService>(system);
|
rb.PushIpcInterface<INetworkService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMonitorService(Kernel::HLERequestContext& ctx) {
|
void CreateMonitorService(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 reserved_input = rp.Pop<u64>();
|
const u64 reserved_input = rp.Pop<u64>();
|
||||||
|
|
||||||
|
@ -706,7 +706,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateNetworkervice(Kernel::HLERequestContext& ctx) {
|
void CreateNetworkervice(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 reserved_input = rp.Pop<u64>();
|
const u64 reserved_input = rp.Pop<u64>();
|
||||||
const u32 input = rp.Pop<u32>();
|
const u32 input = rp.Pop<u32>();
|
||||||
|
@ -719,7 +719,7 @@ public:
|
||||||
rb.PushIpcInterface<INetworkService>(system);
|
rb.PushIpcInterface<INetworkService>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMonitorService(Kernel::HLERequestContext& ctx) {
|
void CreateMonitorService(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u64 reserved_input = rp.Pop<u64>();
|
const u64 reserved_input = rp.Pop<u64>();
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/kernel_helpers.h"
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
#include "common/hex_util.h"
|
#include "common/hex_util.h"
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_page_table.h"
|
#include "core/hle/kernel/k_page_table.h"
|
||||||
#include "core/hle/kernel/svc_results.h"
|
#include "core/hle/kernel/svc_results.h"
|
||||||
#include "core/hle/kernel/svc_types.h"
|
#include "core/hle/kernel/svc_types.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/ldr/ldr.h"
|
#include "core/hle/service/ldr/ldr.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -175,7 +175,7 @@ public:
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterModuleInfo(Kernel::HLERequestContext& ctx) {
|
void RegisterModuleInfo(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u64_le process_id;
|
u64_le process_id;
|
||||||
u64_le nrr_address;
|
u64_le nrr_address;
|
||||||
|
@ -272,7 +272,7 @@ public:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterModuleInfo(Kernel::HLERequestContext& ctx) {
|
void UnregisterModuleInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto pid = rp.Pop<u64>();
|
const auto pid = rp.Pop<u64>();
|
||||||
const auto nrr_address = rp.Pop<VAddr>();
|
const auto nrr_address = rp.Pop<VAddr>();
|
||||||
|
@ -446,7 +446,7 @@ public:
|
||||||
data_start, bss_end_addr - data_start, Kernel::Svc::MemoryPermission::ReadWrite);
|
data_start, bss_end_addr - data_start, Kernel::Svc::MemoryPermission::ReadWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadModule(Kernel::HLERequestContext& ctx) {
|
void LoadModule(HLERequestContext& ctx) {
|
||||||
struct Parameters {
|
struct Parameters {
|
||||||
u64_le process_id;
|
u64_le process_id;
|
||||||
u64_le image_address;
|
u64_le image_address;
|
||||||
|
@ -592,7 +592,7 @@ public:
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnloadModule(Kernel::HLERequestContext& ctx) {
|
void UnloadModule(HLERequestContext& ctx) {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!");
|
LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
@ -638,7 +638,7 @@ public:
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
void Initialize(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_LDR, "(STUBBED) called");
|
LOG_WARNING(Service_LDR, "(STUBBED) called");
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <boost/container_hash/hash.hpp>
|
#include <boost/container_hash/hash.hpp>
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/lm/lm.h"
|
#include "core/hle/service/lm/lm.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -93,7 +93,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Log(Kernel::HLERequestContext& ctx) {
|
void Log(HLERequestContext& ctx) {
|
||||||
std::size_t offset{};
|
std::size_t offset{};
|
||||||
const auto data = ctx.ReadBuffer();
|
const auto data = ctx.ReadBuffer();
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDestination(Kernel::HLERequestContext& ctx) {
|
void SetDestination(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto log_destination = rp.PopEnum<LogDestination>();
|
const auto log_destination = rp.PopEnum<LogDestination>();
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OpenLogger(Kernel::HLERequestContext& ctx) {
|
void OpenLogger(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_LM, "called");
|
LOG_DEBUG(Service_LM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/mii/mii.h"
|
#include "core/hle/service/mii/mii.h"
|
||||||
#include "core/hle/service/mii/mii_manager.h"
|
#include "core/hle/service/mii/mii_manager.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
@ -65,7 +65,7 @@ private:
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsUpdated(Kernel::HLERequestContext& ctx) {
|
void IsUpdated(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ private:
|
||||||
rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter));
|
rb.Push(manager.CheckAndResetUpdateCounter(source_flag, current_update_counter));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsFullDatabase(Kernel::HLERequestContext& ctx) {
|
void IsFullDatabase(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Mii, "called");
|
LOG_DEBUG(Service_Mii, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
rb.Push(manager.IsFullDatabase());
|
rb.Push(manager.IsFullDatabase());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCount(Kernel::HLERequestContext& ctx) {
|
void GetCount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
rb.Push<u32>(manager.GetCount(source_flag));
|
rb.Push<u32>(manager.GetCount(source_flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Get(Kernel::HLERequestContext& ctx) {
|
void Get(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ private:
|
||||||
rb.Push<u32>(static_cast<u32>(result->size()));
|
rb.Push<u32>(static_cast<u32>(result->size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Get1(Kernel::HLERequestContext& ctx) {
|
void Get1(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ private:
|
||||||
rb.Push<u32>(static_cast<u32>(result->size()));
|
rb.Push<u32>(static_cast<u32>(result->size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateLatest(Kernel::HLERequestContext& ctx) {
|
void UpdateLatest(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto info{rp.PopRaw<CharInfo>()};
|
const auto info{rp.PopRaw<CharInfo>()};
|
||||||
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
const auto source_flag{rp.PopRaw<SourceFlag>()};
|
||||||
|
@ -161,7 +161,7 @@ private:
|
||||||
rb.PushRaw<CharInfo>(*result);
|
rb.PushRaw<CharInfo>(*result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildRandom(Kernel::HLERequestContext& ctx) {
|
void BuildRandom(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto age{rp.PopRaw<Age>()};
|
const auto age{rp.PopRaw<Age>()};
|
||||||
|
@ -196,7 +196,7 @@ private:
|
||||||
rb.PushRaw<CharInfo>(manager.BuildRandom(age, gender, race));
|
rb.PushRaw<CharInfo>(manager.BuildRandom(age, gender, race));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildDefault(Kernel::HLERequestContext& ctx) {
|
void BuildDefault(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto index{rp.Pop<u32>()};
|
const auto index{rp.Pop<u32>()};
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ private:
|
||||||
rb.PushRaw<CharInfo>(manager.BuildDefault(index));
|
rb.PushRaw<CharInfo>(manager.BuildDefault(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetIndex(Kernel::HLERequestContext& ctx) {
|
void GetIndex(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto info{rp.PopRaw<CharInfo>()};
|
const auto info{rp.PopRaw<CharInfo>()};
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ private:
|
||||||
rb.Push(index);
|
rb.Push(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetInterfaceVersion(Kernel::HLERequestContext& ctx) {
|
void SetInterfaceVersion(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
current_interface_version = rp.PopRaw<u32>();
|
current_interface_version = rp.PopRaw<u32>();
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Convert(Kernel::HLERequestContext& ctx) {
|
void Convert(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
|
|
||||||
const auto mii_v3{rp.PopRaw<Ver3StoreData>()};
|
const auto mii_v3{rp.PopRaw<Ver3StoreData>()};
|
||||||
|
@ -275,7 +275,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetDatabaseService(Kernel::HLERequestContext& ctx) {
|
void GetDatabaseService(HLERequestContext& ctx) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.PushIpcInterface<IDatabaseService>(system);
|
rb.PushIpcInterface<IDatabaseService>(system);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/mm/mm_u.h"
|
#include "core/hle/service/mm/mm_u.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
|
@ -29,21 +29,21 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitializeOld(Kernel::HLERequestContext& ctx) {
|
void InitializeOld(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinalizeOld(Kernel::HLERequestContext& ctx) {
|
void FinalizeOld(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAndWaitOld(Kernel::HLERequestContext& ctx) {
|
void SetAndWaitOld(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
min = rp.Pop<u32>();
|
min = rp.Pop<u32>();
|
||||||
max = rp.Pop<u32>();
|
max = rp.Pop<u32>();
|
||||||
|
@ -54,7 +54,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetOld(Kernel::HLERequestContext& ctx) {
|
void GetOld(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_MM, "(STUBBED) called");
|
LOG_DEBUG(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -62,7 +62,7 @@ private:
|
||||||
rb.Push(current);
|
rb.Push(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
void Initialize(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -70,14 +70,14 @@ private:
|
||||||
rb.Push<u32>(id); // Any non zero value
|
rb.Push<u32>(id); // Any non zero value
|
||||||
}
|
}
|
||||||
|
|
||||||
void Finalize(Kernel::HLERequestContext& ctx) {
|
void Finalize(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MM, "(STUBBED) called");
|
LOG_WARNING(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAndWait(Kernel::HLERequestContext& ctx) {
|
void SetAndWait(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
u32 input_id = rp.Pop<u32>();
|
u32 input_id = rp.Pop<u32>();
|
||||||
min = rp.Pop<u32>();
|
min = rp.Pop<u32>();
|
||||||
|
@ -90,7 +90,7 @@ private:
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Get(Kernel::HLERequestContext& ctx) {
|
void Get(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_MM, "(STUBBED) called");
|
LOG_DEBUG(Service_MM, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/mnpp/mnpp_app.h"
|
#include "core/hle/service/mnpp/mnpp_app.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
@ -23,14 +23,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Unknown0(Kernel::HLERequestContext& ctx) {
|
void Unknown0(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unknown1(Kernel::HLERequestContext& ctx) {
|
void Unknown1(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
LOG_WARNING(Service_MNPP, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/file_sys/romfs_factory.h"
|
#include "core/file_sys/romfs_factory.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/ncm/ncm.h"
|
#include "core/hle/service/ncm/ncm.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfc/mifare_user.h"
|
#include "core/hle/service/nfc/mifare_user.h"
|
||||||
#include "core/hle/service/nfc/nfc_device.h"
|
#include "core/hle/service/nfc/nfc_device.h"
|
||||||
#include "core/hle/service/nfc/nfc_result.h"
|
#include "core/hle/service/nfc/nfc_result.h"
|
||||||
|
@ -45,7 +45,7 @@ MFIUser ::~MFIUser() {
|
||||||
availability_change_event->Close();
|
availability_change_event->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::Initialize(Kernel::HLERequestContext& ctx) {
|
void MFIUser::Initialize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
state = State::Initialized;
|
state = State::Initialized;
|
||||||
|
@ -58,7 +58,7 @@ void MFIUser::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::Finalize(Kernel::HLERequestContext& ctx) {
|
void MFIUser::Finalize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
state = State::NonInitialized;
|
state = State::NonInitialized;
|
||||||
|
@ -71,7 +71,7 @@ void MFIUser::Finalize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
void MFIUser::ListDevices(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
@ -117,7 +117,7 @@ void MFIUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<s32>(nfp_devices.size()));
|
rb.Push(static_cast<s32>(nfp_devices.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
void MFIUser::StartDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -141,7 +141,7 @@ void MFIUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
void MFIUser::StopDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -165,7 +165,7 @@ void MFIUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::Read(Kernel::HLERequestContext& ctx) {
|
void MFIUser::Read(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto buffer{ctx.ReadBuffer()};
|
const auto buffer{ctx.ReadBuffer()};
|
||||||
|
@ -206,7 +206,7 @@ void MFIUser::Read(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::Write(Kernel::HLERequestContext& ctx) {
|
void MFIUser::Write(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto buffer{ctx.ReadBuffer()};
|
const auto buffer{ctx.ReadBuffer()};
|
||||||
|
@ -250,7 +250,7 @@ void MFIUser::Write(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetTagInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -276,7 +276,7 @@ void MFIUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetActivateEventHandle(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetActivateEventHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -300,7 +300,7 @@ void MFIUser::GetActivateEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetDeactivateEventHandle(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetDeactivateEventHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -324,7 +324,7 @@ void MFIUser::GetDeactivateEventHandle(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetState(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetState(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -332,7 +332,7 @@ void MFIUser::GetState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(state);
|
rb.PushEnum(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetDeviceState(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -350,7 +350,7 @@ void MFIUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetCurrentState());
|
rb.PushEnum(device.value()->GetCurrentState());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetNpadId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -374,7 +374,7 @@ void MFIUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetNpadId());
|
rb.PushEnum(device.value()->GetNpadId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MFIUser::GetAvailabilityChangeEventHandle(Kernel::HLERequestContext& ctx) {
|
void MFIUser::GetAvailabilityChangeEventHandle(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
|
|
@ -24,20 +24,20 @@ private:
|
||||||
Initialized,
|
Initialized,
|
||||||
};
|
};
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx);
|
void Initialize(HLERequestContext& ctx);
|
||||||
void Finalize(Kernel::HLERequestContext& ctx);
|
void Finalize(HLERequestContext& ctx);
|
||||||
void ListDevices(Kernel::HLERequestContext& ctx);
|
void ListDevices(HLERequestContext& ctx);
|
||||||
void StartDetection(Kernel::HLERequestContext& ctx);
|
void StartDetection(HLERequestContext& ctx);
|
||||||
void StopDetection(Kernel::HLERequestContext& ctx);
|
void StopDetection(HLERequestContext& ctx);
|
||||||
void Read(Kernel::HLERequestContext& ctx);
|
void Read(HLERequestContext& ctx);
|
||||||
void Write(Kernel::HLERequestContext& ctx);
|
void Write(HLERequestContext& ctx);
|
||||||
void GetTagInfo(Kernel::HLERequestContext& ctx);
|
void GetTagInfo(HLERequestContext& ctx);
|
||||||
void GetActivateEventHandle(Kernel::HLERequestContext& ctx);
|
void GetActivateEventHandle(HLERequestContext& ctx);
|
||||||
void GetDeactivateEventHandle(Kernel::HLERequestContext& ctx);
|
void GetDeactivateEventHandle(HLERequestContext& ctx);
|
||||||
void GetState(Kernel::HLERequestContext& ctx);
|
void GetState(HLERequestContext& ctx);
|
||||||
void GetDeviceState(Kernel::HLERequestContext& ctx);
|
void GetDeviceState(HLERequestContext& ctx);
|
||||||
void GetNpadId(Kernel::HLERequestContext& ctx);
|
void GetNpadId(HLERequestContext& ctx);
|
||||||
void GetAvailabilityChangeEventHandle(Kernel::HLERequestContext& ctx);
|
void GetAvailabilityChangeEventHandle(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle);
|
std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfc/mifare_user.h"
|
#include "core/hle/service/nfc/mifare_user.h"
|
||||||
#include "core/hle/service/nfc/nfc.h"
|
#include "core/hle/service/nfc/nfc.h"
|
||||||
#include "core/hle/service/nfc/nfc_user.h"
|
#include "core/hle/service/nfc/nfc_user.h"
|
||||||
|
@ -42,7 +42,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateAmInterface(Kernel::HLERequestContext& ctx) {
|
void CreateAmInterface(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateUserInterface(Kernel::HLERequestContext& ctx) {
|
void CreateUserInterface(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -86,7 +86,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateUserInterface(Kernel::HLERequestContext& ctx) {
|
void CreateUserInterface(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
@ -145,7 +145,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateSystemInterface(Kernel::HLERequestContext& ctx) {
|
void CreateSystemInterface(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
#include "core/hid/emulated_controller.h"
|
#include "core/hid/emulated_controller.h"
|
||||||
#include "core/hid/hid_core.h"
|
#include "core/hid/hid_core.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfc/nfc_device.h"
|
#include "core/hle/service/nfc/nfc_device.h"
|
||||||
#include "core/hle/service/nfc/nfc_result.h"
|
#include "core/hle/service/nfc/nfc_result.h"
|
||||||
#include "core/hle/service/nfc/nfc_user.h"
|
#include "core/hle/service/nfc/nfc_user.h"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfc/nfc_device.h"
|
#include "core/hle/service/nfc/nfc_device.h"
|
||||||
#include "core/hle/service/nfc/nfc_result.h"
|
#include "core/hle/service/nfc/nfc_result.h"
|
||||||
#include "core/hle/service/nfc/nfc_user.h"
|
#include "core/hle/service/nfc/nfc_user.h"
|
||||||
|
@ -54,7 +54,7 @@ IUser ::~IUser() {
|
||||||
availability_change_event->Close();
|
availability_change_event->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Initialize(Kernel::HLERequestContext& ctx) {
|
void IUser::Initialize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
state = State::Initialized;
|
state = State::Initialized;
|
||||||
|
@ -67,7 +67,7 @@ void IUser::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Finalize(Kernel::HLERequestContext& ctx) {
|
void IUser::Finalize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
state = State::NonInitialized;
|
state = State::NonInitialized;
|
||||||
|
@ -80,7 +80,7 @@ void IUser::Finalize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetState(Kernel::HLERequestContext& ctx) {
|
void IUser::GetState(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -88,7 +88,7 @@ void IUser::GetState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(state);
|
rb.PushEnum(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::IsNfcEnabled(Kernel::HLERequestContext& ctx) {
|
void IUser::IsNfcEnabled(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -96,7 +96,7 @@ void IUser::IsNfcEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(state != State::NonInitialized);
|
rb.Push(state != State::NonInitialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
void IUser::ListDevices(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFC, "called");
|
LOG_DEBUG(Service_NFC, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
@ -142,7 +142,7 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<s32>(nfp_devices.size()));
|
rb.Push(static_cast<s32>(nfp_devices.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
void IUser::GetDeviceState(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -160,7 +160,7 @@ void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetCurrentState());
|
rb.PushEnum(device.value()->GetCurrentState());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
void IUser::GetNpadId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -184,7 +184,7 @@ void IUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetNpadId());
|
rb.PushEnum(device.value()->GetNpadId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachAvailabilityChangeEvent(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFC, "called");
|
LOG_INFO(Service_NFC, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
@ -198,7 +198,7 @@ void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(availability_change_event->GetReadableEvent());
|
rb.PushCopyObjects(availability_change_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
void IUser::StartDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto nfp_protocol{rp.PopEnum<NFP::TagProtocol>()};
|
const auto nfp_protocol{rp.PopEnum<NFP::TagProtocol>()};
|
||||||
|
@ -223,7 +223,7 @@ void IUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
void IUser::StopDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -247,7 +247,7 @@ void IUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
void IUser::GetTagInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -273,7 +273,7 @@ void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachActivateEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -297,7 +297,7 @@ void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachDeactivateEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle);
|
||||||
|
@ -321,7 +321,7 @@ void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::SendCommandByPassThrough(Kernel::HLERequestContext& ctx) {
|
void IUser::SendCommandByPassThrough(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto timeout{rp.PopRaw<Time::Clock::TimeSpanType>()};
|
const auto timeout{rp.PopRaw<Time::Clock::TimeSpanType>()};
|
||||||
|
|
|
@ -24,20 +24,20 @@ private:
|
||||||
Initialized,
|
Initialized,
|
||||||
};
|
};
|
||||||
|
|
||||||
void Initialize(Kernel::HLERequestContext& ctx);
|
void Initialize(HLERequestContext& ctx);
|
||||||
void Finalize(Kernel::HLERequestContext& ctx);
|
void Finalize(HLERequestContext& ctx);
|
||||||
void GetState(Kernel::HLERequestContext& ctx);
|
void GetState(HLERequestContext& ctx);
|
||||||
void IsNfcEnabled(Kernel::HLERequestContext& ctx);
|
void IsNfcEnabled(HLERequestContext& ctx);
|
||||||
void ListDevices(Kernel::HLERequestContext& ctx);
|
void ListDevices(HLERequestContext& ctx);
|
||||||
void GetDeviceState(Kernel::HLERequestContext& ctx);
|
void GetDeviceState(HLERequestContext& ctx);
|
||||||
void GetNpadId(Kernel::HLERequestContext& ctx);
|
void GetNpadId(HLERequestContext& ctx);
|
||||||
void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx);
|
void AttachAvailabilityChangeEvent(HLERequestContext& ctx);
|
||||||
void StartDetection(Kernel::HLERequestContext& ctx);
|
void StartDetection(HLERequestContext& ctx);
|
||||||
void StopDetection(Kernel::HLERequestContext& ctx);
|
void StopDetection(HLERequestContext& ctx);
|
||||||
void GetTagInfo(Kernel::HLERequestContext& ctx);
|
void GetTagInfo(HLERequestContext& ctx);
|
||||||
void AttachActivateEvent(Kernel::HLERequestContext& ctx);
|
void AttachActivateEvent(HLERequestContext& ctx);
|
||||||
void AttachDeactivateEvent(Kernel::HLERequestContext& ctx);
|
void AttachDeactivateEvent(HLERequestContext& ctx);
|
||||||
void SendCommandByPassThrough(Kernel::HLERequestContext& ctx);
|
void SendCommandByPassThrough(HLERequestContext& ctx);
|
||||||
|
|
||||||
std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle);
|
std::optional<std::shared_ptr<NfcDevice>> GetNfcDevice(u64 handle);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfp/nfp.h"
|
#include "core/hle/service/nfp/nfp.h"
|
||||||
#include "core/hle/service/nfp/nfp_user.h"
|
#include "core/hle/service/nfp/nfp_user.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
@ -22,7 +22,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateUserInterface(Kernel::HLERequestContext& ctx) {
|
void CreateUserInterface(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFP, "called");
|
LOG_DEBUG(Service_NFP, "called");
|
||||||
|
|
||||||
if (user_interface == nullptr) {
|
if (user_interface == nullptr) {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#include "core/hid/emulated_controller.h"
|
#include "core/hid/emulated_controller.h"
|
||||||
#include "core/hid/hid_core.h"
|
#include "core/hid/hid_core.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/mii/mii_manager.h"
|
#include "core/hle/service/mii/mii_manager.h"
|
||||||
#include "core/hle/service/mii/types.h"
|
#include "core/hle/service/mii/types.h"
|
||||||
#include "core/hle/service/nfp/amiibo_crypto.h"
|
#include "core/hle/service/nfp/amiibo_crypto.h"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hid/hid_types.h"
|
#include "core/hid/hid_types.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
#include "core/hle/service/nfp/nfp_device.h"
|
#include "core/hle/service/nfp/nfp_device.h"
|
||||||
#include "core/hle/service/nfp/nfp_result.h"
|
#include "core/hle/service/nfp/nfp_result.h"
|
||||||
#include "core/hle/service/nfp/nfp_user.h"
|
#include "core/hle/service/nfp/nfp_user.h"
|
||||||
|
@ -56,7 +56,7 @@ IUser ::~IUser() {
|
||||||
availability_change_event->Close();
|
availability_change_event->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Initialize(Kernel::HLERequestContext& ctx) {
|
void IUser::Initialize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFP, "called");
|
LOG_INFO(Service_NFP, "called");
|
||||||
|
|
||||||
state = State::Initialized;
|
state = State::Initialized;
|
||||||
|
@ -69,7 +69,7 @@ void IUser::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Finalize(Kernel::HLERequestContext& ctx) {
|
void IUser::Finalize(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFP, "called");
|
LOG_INFO(Service_NFP, "called");
|
||||||
|
|
||||||
state = State::NonInitialized;
|
state = State::NonInitialized;
|
||||||
|
@ -82,7 +82,7 @@ void IUser::Finalize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
void IUser::ListDevices(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFP, "called");
|
LOG_DEBUG(Service_NFP, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
@ -128,7 +128,7 @@ void IUser::ListDevices(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<s32>(nfp_devices.size()));
|
rb.Push(static_cast<s32>(nfp_devices.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
void IUser::StartDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto nfp_protocol{rp.PopEnum<TagProtocol>()};
|
const auto nfp_protocol{rp.PopEnum<TagProtocol>()};
|
||||||
|
@ -153,7 +153,7 @@ void IUser::StartDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
void IUser::StopDetection(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -177,7 +177,7 @@ void IUser::StopDetection(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Mount(Kernel::HLERequestContext& ctx) {
|
void IUser::Mount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto model_type{rp.PopEnum<ModelType>()};
|
const auto model_type{rp.PopEnum<ModelType>()};
|
||||||
|
@ -204,7 +204,7 @@ void IUser::Mount(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Unmount(Kernel::HLERequestContext& ctx) {
|
void IUser::Unmount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -228,7 +228,7 @@ void IUser::Unmount(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::OpenApplicationArea(Kernel::HLERequestContext& ctx) {
|
void IUser::OpenApplicationArea(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto access_id{rp.Pop<u32>()};
|
const auto access_id{rp.Pop<u32>()};
|
||||||
|
@ -253,7 +253,7 @@ void IUser::OpenApplicationArea(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetApplicationArea(Kernel::HLERequestContext& ctx) {
|
void IUser::GetApplicationArea(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto data_size = ctx.GetWriteBufferSize();
|
const auto data_size = ctx.GetWriteBufferSize();
|
||||||
|
@ -287,7 +287,7 @@ void IUser::GetApplicationArea(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(static_cast<u32>(data_size));
|
rb.Push(static_cast<u32>(data_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::SetApplicationArea(Kernel::HLERequestContext& ctx) {
|
void IUser::SetApplicationArea(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto data{ctx.ReadBuffer()};
|
const auto data{ctx.ReadBuffer()};
|
||||||
|
@ -318,7 +318,7 @@ void IUser::SetApplicationArea(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Flush(Kernel::HLERequestContext& ctx) {
|
void IUser::Flush(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -342,7 +342,7 @@ void IUser::Flush(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::Restore(Kernel::HLERequestContext& ctx) {
|
void IUser::Restore(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle);
|
LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle);
|
||||||
|
@ -366,7 +366,7 @@ void IUser::Restore(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::CreateApplicationArea(Kernel::HLERequestContext& ctx) {
|
void IUser::CreateApplicationArea(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto access_id{rp.Pop<u32>()};
|
const auto access_id{rp.Pop<u32>()};
|
||||||
|
@ -399,7 +399,7 @@ void IUser::CreateApplicationArea(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
void IUser::GetTagInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -425,7 +425,7 @@ void IUser::GetTagInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetRegisterInfo(Kernel::HLERequestContext& ctx) {
|
void IUser::GetRegisterInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -451,7 +451,7 @@ void IUser::GetRegisterInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetCommonInfo(Kernel::HLERequestContext& ctx) {
|
void IUser::GetCommonInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -477,7 +477,7 @@ void IUser::GetCommonInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetModelInfo(Kernel::HLERequestContext& ctx) {
|
void IUser::GetModelInfo(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_INFO(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -503,7 +503,7 @@ void IUser::GetModelInfo(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachActivateEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -527,7 +527,7 @@ void IUser::AttachActivateEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
rb.PushCopyObjects(device.value()->GetActivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachDeactivateEvent(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -551,7 +551,7 @@ void IUser::AttachDeactivateEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
rb.PushCopyObjects(device.value()->GetDeactivateEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetState(Kernel::HLERequestContext& ctx) {
|
void IUser::GetState(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_NFP, "called");
|
LOG_DEBUG(Service_NFP, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
@ -559,7 +559,7 @@ void IUser::GetState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(state);
|
rb.PushEnum(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
void IUser::GetDeviceState(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -577,7 +577,7 @@ void IUser::GetDeviceState(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetCurrentState());
|
rb.PushEnum(device.value()->GetCurrentState());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
void IUser::GetNpadId(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -601,7 +601,7 @@ void IUser::GetNpadId(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushEnum(device.value()->GetNpadId());
|
rb.PushEnum(device.value()->GetNpadId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::GetApplicationAreaSize(Kernel::HLERequestContext& ctx) {
|
void IUser::GetApplicationAreaSize(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
LOG_DEBUG(Service_NFP, "called, device_handle={}", device_handle);
|
||||||
|
@ -619,7 +619,7 @@ void IUser::GetApplicationAreaSize(Kernel::HLERequestContext& ctx) {
|
||||||
rb.Push(device.value()->GetApplicationAreaSize());
|
rb.Push(device.value()->GetApplicationAreaSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
void IUser::AttachAvailabilityChangeEvent(HLERequestContext& ctx) {
|
||||||
LOG_INFO(Service_NFP, "called");
|
LOG_INFO(Service_NFP, "called");
|
||||||
|
|
||||||
if (state == State::NonInitialized) {
|
if (state == State::NonInitialized) {
|
||||||
|
@ -633,7 +633,7 @@ void IUser::AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) {
|
||||||
rb.PushCopyObjects(availability_change_event->GetReadableEvent());
|
rb.PushCopyObjects(availability_change_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
void IUser::RecreateApplicationArea(Kernel::HLERequestContext& ctx) {
|
void IUser::RecreateApplicationArea(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto device_handle{rp.Pop<u64>()};
|
const auto device_handle{rp.Pop<u64>()};
|
||||||
const auto access_id{rp.Pop<u32>()};
|
const auto access_id{rp.Pop<u32>()};
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue