Add all services to the Service namespace

Previously there was a split where some of the services were in the
Service namespace and others were not.
This commit is contained in:
Lioncash 2016-12-10 07:51:50 -05:00 • committed by linkmauve
commit 963aedd8cc
50 changed files with 408 additions and 499 deletions

View file

@ -23,9 +23,9 @@ static constexpr u64 audio_frame_ticks = 1310252ull; ///< Units: ARM11 cycles
static void AudioTickCallback(u64 /*userdata*/, int cycles_late) {
if (DSP::HLE::Tick()) {
// TODO(merry): Signal all the other interrupts as appropriate.
DSP_DSP::SignalPipeInterrupt(DSP::HLE::DspPipe::Audio);
Service::DSP_DSP::SignalPipeInterrupt(DSP::HLE::DspPipe::Audio);
// HACK(merry): Added to prevent regressions. Will remove soon.
DSP_DSP::SignalPipeInterrupt(DSP::HLE::DspPipe::Binary);
Service::DSP_DSP::SignalPipeInterrupt(DSP::HLE::DspPipe::Binary);
}
// Reschedule recurrent event

View file

@ -104,7 +104,7 @@ static void AudioPipeWriteStructAddresses() {
WriteU16(DspPipe::Audio, addr);
}
// Signal that we have data on this pipe.
DSP_DSP::SignalPipeInterrupt(DspPipe::Audio);
Service::DSP_DSP::SignalPipeInterrupt(DspPipe::Audio);
}
void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) {

View file

@ -22,15 +22,15 @@ QVariant GPUCommandStreamItemModel::data(const QModelIndex& index, int role) con
return QVariant();
int command_index = index.row();
const GSP_GPU::Command& command = GetDebugger()->ReadGXCommandHistory(command_index);
const Service::GSP::Command& command = GetDebugger()->ReadGXCommandHistory(command_index);
if (role == Qt::DisplayRole) {
std::map<GSP_GPU::CommandId, const char*> command_names = {
{GSP_GPU::CommandId::REQUEST_DMA, "REQUEST_DMA"},
{GSP_GPU::CommandId::SUBMIT_GPU_CMDLIST, "SUBMIT_GPU_CMDLIST"},
{GSP_GPU::CommandId::SET_MEMORY_FILL, "SET_MEMORY_FILL"},
{GSP_GPU::CommandId::SET_DISPLAY_TRANSFER, "SET_DISPLAY_TRANSFER"},
{GSP_GPU::CommandId::SET_TEXTURE_COPY, "SET_TEXTURE_COPY"},
{GSP_GPU::CommandId::CACHE_FLUSH, "CACHE_FLUSH"},
std::map<Service::GSP::CommandId, const char*> command_names = {
{Service::GSP::CommandId::REQUEST_DMA, "REQUEST_DMA"},
{Service::GSP::CommandId::SUBMIT_GPU_CMDLIST, "SUBMIT_GPU_CMDLIST"},
{Service::GSP::CommandId::SET_MEMORY_FILL, "SET_MEMORY_FILL"},
{Service::GSP::CommandId::SET_DISPLAY_TRANSFER, "SET_DISPLAY_TRANSFER"},
{Service::GSP::CommandId::SET_TEXTURE_COPY, "SET_TEXTURE_COPY"},
{Service::GSP::CommandId::CACHE_FLUSH, "CACHE_FLUSH"},
};
const u32* command_data = reinterpret_cast<const u32*>(&command);
QString str = QString("%1 %2 %3 %4 %5 %6 %7 %8 %9")

View file

@ -94,13 +94,13 @@ void SoftwareKeyboard::Update() {
}
void SoftwareKeyboard::DrawScreenKeyboard() {
auto bottom_screen = GSP_GPU::GetFrameBufferInfo(0, 1);
auto bottom_screen = Service::GSP::GetFrameBufferInfo(0, 1);
auto info = bottom_screen->framebuffer_info[bottom_screen->index];
// TODO(Subv): Draw the HLE keyboard, for now just zero-fill the framebuffer
Memory::ZeroBlock(info.address_left, info.stride * 320);
GSP_GPU::SetBufferSwap(1, info);
Service::GSP::SetBufferSwap(1, info);
}
void SoftwareKeyboard::Finalize() {

View file

@ -2,14 +2,14 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <array>
#include "common/logging/log.h"
#include "core/hle/kernel/event.h"
#include "core/hle/service/ac_u.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace AC_U
namespace AC_U {
namespace Service {
namespace AC {
struct ACConfig {
std::array<u8, 0x200> data;
@ -31,7 +31,7 @@ static Kernel::SharedPtr<Kernel::Event> disconnect_event;
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void CreateDefaultConfig(Service::Interface* self) {
static void CreateDefaultConfig(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 ac_config_addr = cmd_buff[65];
@ -56,7 +56,7 @@ static void CreateDefaultConfig(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void ConnectAsync(Service::Interface* self) {
static void ConnectAsync(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
connect_event = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
@ -77,7 +77,7 @@ static void ConnectAsync(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void GetConnectResult(Service::Interface* self) {
static void GetConnectResult(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -94,7 +94,7 @@ static void GetConnectResult(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void CloseAsync(Service::Interface* self) {
static void CloseAsync(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
if (ac_connected && disconnect_event) {
@ -120,7 +120,7 @@ static void CloseAsync(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void GetCloseResult(Service::Interface* self) {
static void GetCloseResult(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -134,7 +134,7 @@ static void GetCloseResult(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Output connection type, 0 = none, 1 = Old3DS Internet, 2 = New3DS Internet.
*/
static void GetWifiStatus(Service::Interface* self) {
static void GetWifiStatus(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
// TODO(purpasmart96): This function is only a stub,
@ -155,7 +155,7 @@ static void GetWifiStatus(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Infra Priority
*/
static void GetInfraPriority(Service::Interface* self) {
static void GetInfraPriority(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -177,7 +177,7 @@ static void GetInfraPriority(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Infra Priority
*/
static void SetRequestEulaVersion(Service::Interface* self) {
static void SetRequestEulaVersion(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 major = cmd_buff[1] & 0xFF;
@ -203,7 +203,7 @@ static void SetRequestEulaVersion(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void RegisterDisconnectEvent(Service::Interface* self) {
static void RegisterDisconnectEvent(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
disconnect_event = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
@ -221,7 +221,7 @@ static void RegisterDisconnectEvent(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : bool, is connected
*/
static void IsConnected(Service::Interface* self) {
static void IsConnected(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -237,7 +237,7 @@ static void IsConnected(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void SetClientVersion(Service::Interface* self) {
static void SetClientVersion(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
const u32 version = cmd_buff[1];
@ -271,10 +271,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00400042, SetClientVersion, "SetClientVersion"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
AC_U::AC_U() {
Register(FunctionTable);
ac_connected = false;
@ -284,10 +281,11 @@ Interface::Interface() {
disconnect_event = nullptr;
}
Interface::~Interface() {
AC_U::~AC_U() {
close_event = nullptr;
connect_event = nullptr;
disconnect_event = nullptr;
}
} // namespace
} // namespace AC
} // namespace Service

View file

@ -6,21 +6,18 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace AC_U
namespace Service {
namespace AC {
// socket service "ac:u"
namespace AC_U {
class Interface : public Service::Interface {
class AC_U final : public Interface {
public:
Interface();
~Interface();
AC_U();
~AC_U();
std::string GetPortName() const override {
return "ac:u";
}
};
} // namespace
} // namespace AC
} // namespace Service

View file

@ -4,10 +4,8 @@
#include "core/hle/service/act_a.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ACT_A
namespace ACT_A {
namespace Service {
namespace ACT {
const Interface::FunctionInfo FunctionTable[] = {
// act:u shared commands
@ -23,11 +21,9 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x04230082, nullptr, "ValidateMailAddress"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
ACT_A::ACT_A() {
Register(FunctionTable);
}
} // namespace
} // namespace ACT
} // namespace Service

View file

@ -6,18 +6,17 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ACT_A
namespace Service {
namespace ACT {
namespace ACT_A {
class Interface : public Service::Interface {
class ACT_A final : public Service::Interface {
public:
Interface();
ACT_A();
std::string GetPortName() const override {
return "act:a";
}
};
} // namespace
} // namespace ACT
} // namespace Service

View file

@ -4,10 +4,8 @@
#include "core/hle/service/act_u.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ACT_U
namespace ACT_U {
namespace Service {
namespace ACT {
const Interface::FunctionInfo FunctionTable[] = {
// clang-format off
@ -19,11 +17,9 @@ const Interface::FunctionInfo FunctionTable[] = {
// clang-format on
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
ACT_U::ACT_U() {
Register(FunctionTable);
}
} // namespace
} // namespace ACT
} // namespace Service

View file

@ -6,18 +6,17 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ACT_U
namespace Service {
namespace ACT {
namespace ACT_U {
class Interface : public Service::Interface {
class ACT_U final : public Interface {
public:
Interface();
ACT_U();
std::string GetPortName() const override {
return "act:u";
}
};
} // namespace
} // namespace ACT
} // namespace Service

View file

@ -9,10 +9,8 @@
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/csnd_snd.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace CSND_SND
namespace CSND_SND {
namespace Service {
namespace CSND {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010140, Initialize, "Initialize"},
@ -29,17 +27,14 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x000C0000, nullptr, "Reset"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
CSND_SND::CSND_SND() {
Register(FunctionTable);
}
static Kernel::SharedPtr<Kernel::SharedMemory> shared_memory = nullptr;
static Kernel::SharedPtr<Kernel::Mutex> mutex = nullptr;
void Initialize(Service::Interface* self) {
void Initialize(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 size = Common::AlignUp(cmd_buff[1], Memory::PAGE_SIZE);
@ -56,7 +51,7 @@ void Initialize(Service::Interface* self) {
cmd_buff[4] = Kernel::g_handle_table.Create(shared_memory).MoveFrom();
}
void ExecuteType0Commands(Service::Interface* self) {
void ExecuteType0Commands(Interface* self) {
u32* const cmd_buff = Kernel::GetCommandBuffer();
u8* const ptr = shared_memory->GetPointer(cmd_buff[1]);
@ -74,15 +69,16 @@ void ExecuteType0Commands(Service::Interface* self) {
}
}
void AcquireSoundChannels(Service::Interface* self) {
void AcquireSoundChannels(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = 0;
cmd_buff[2] = 0xFFFFFF00;
}
void Shutdown(Service::Interface* self) {
void Shutdown(Interface* self) {
shared_memory = nullptr;
mutex = nullptr;
}
} // namespace
} // namespace CSND
} // namespace Service

View file

@ -6,14 +6,12 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace CSND_SND
namespace Service {
namespace CSND {
namespace CSND_SND {
class Interface : public Service::Interface {
class CSND_SND final : public Interface {
public:
Interface();
CSND_SND();
std::string GetPortName() const override {
return "csnd:SND";
@ -28,9 +26,10 @@ struct Type0Command {
u8 parameters[20];
};
void Initialize(Service::Interface* self);
void ExecuteType0Commands(Service::Interface* self);
void AcquireSoundChannels(Service::Interface* self);
void Shutdown(Service::Interface* self);
void Initialize(Interface* self);
void ExecuteType0Commands(Interface* self);
void AcquireSoundChannels(Interface* self);
void Shutdown(Interface* self);
} // namespace
} // namespace CSND
} // namespace Service

View file

@ -12,9 +12,7 @@
using DspPipe = DSP::HLE::DspPipe;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace DSP_DSP
namespace Service {
namespace DSP_DSP {
static Kernel::SharedPtr<Kernel::Event> semaphore_event;
@ -582,4 +580,5 @@ Interface::~Interface() {
interrupt_events = {};
}
} // namespace
} // namespace DSP_DSP
} // namespace Service

View file

@ -13,12 +13,10 @@ enum class DspPipe;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace DSP_DSP
namespace Service {
namespace DSP_DSP {
class Interface : public Service::Interface {
class Interface final : public Service::Interface {
public:
Interface();
~Interface() override;
@ -35,3 +33,4 @@ public:
void SignalPipeInterrupt(DSP::HLE::DspPipe pipe);
} // namespace DSP_DSP
} // namespace Service

View file

@ -13,10 +13,8 @@
#include "core/hle/result.h"
#include "core/hle/service/err_f.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ERR_F
namespace ERR_F {
namespace Service {
namespace ERR {
enum class FatalErrType : u32 {
Generic = 0,
@ -167,7 +165,7 @@ static void LogGenericInfo(const ErrInfo::ErrInfoCommon& errinfo_common) {
* 0 : Header code
* 1 : Result code
*/
static void ThrowFatalError(Service::Interface* self) {
static void ThrowFatalError(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
LOG_CRITICAL(Service_ERR, "Fatal error");
@ -256,11 +254,9 @@ const Interface::FunctionInfo FunctionTable[] = {
// clang-format on
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
ERR_F::ERR_F() {
Register(FunctionTable);
}
} // namespace
} // namespace ERR
} // namespace Service

View file

@ -6,18 +6,17 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace ERR_F
namespace Service {
namespace ERR {
namespace ERR_F {
class Interface : public Service::Interface {
class ERR_F final : public Interface {
public:
Interface();
ERR_F();
std::string GetPortName() const override {
return "err:f";
}
};
} // namespace
} // namespace ERR
} // namespace Service

View file

@ -18,13 +18,11 @@
// Main graphics debugger object - TODO: Here is probably not the best place for this
GraphicsDebugger g_debugger;
namespace Service {
namespace GSP {
// Beginning address of HW regs
const static u32 REGS_BEGIN = 0x1EB00000;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace GSP_GPU
namespace GSP_GPU {
const u32 REGS_BEGIN = 0x1EB00000;
const ResultCode ERR_GSP_REGS_OUTOFRANGE_OR_MISALIGNED(
ErrorDescription::OutofRangeOrMisalignedAddress, ErrorModule::GX, ErrorSummary::InvalidArgument,
@ -179,7 +177,7 @@ static ResultCode WriteHWRegsWithMask(u32 base_address, u32 size_in_bytes, VAddr
* 2 : number of registers to write sequentially
* 4 : pointer to source data array
*/
static void WriteHWRegs(Service::Interface* self) {
static void WriteHWRegs(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 reg_addr = cmd_buff[1];
u32 size = cmd_buff[2];
@ -199,7 +197,7 @@ static void WriteHWRegs(Service::Interface* self) {
* 4 : pointer to source data array
* 6 : pointer to mask array
*/
static void WriteHWRegsWithMask(Service::Interface* self) {
static void WriteHWRegsWithMask(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 reg_addr = cmd_buff[1];
u32 size = cmd_buff[2];
@ -211,7 +209,7 @@ static void WriteHWRegsWithMask(Service::Interface* self) {
}
/// Read a GSP GPU hardware register
static void ReadHWRegs(Service::Interface* self) {
static void ReadHWRegs(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 reg_addr = cmd_buff[1];
u32 size = cmd_buff[2];
@ -298,7 +296,7 @@ ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
* Outputs:
* 1: Result code
*/
static void SetBufferSwap(Service::Interface* self) {
static void SetBufferSwap(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 screen_id = cmd_buff[1];
FrameBufferInfo* fb_info = (FrameBufferInfo*)&cmd_buff[2];
@ -319,7 +317,7 @@ static void SetBufferSwap(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void FlushDataCache(Service::Interface* self) {
static void FlushDataCache(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 address = cmd_buff[1];
u32 size = cmd_buff[2];
@ -340,7 +338,7 @@ static void FlushDataCache(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void SetAxiConfigQoSMode(Service::Interface* self) {
static void SetAxiConfigQoSMode(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 mode = cmd_buff[1];
@ -359,7 +357,7 @@ static void SetAxiConfigQoSMode(Service::Interface* self) {
* 2 : Thread index into GSP command buffer
* 4 : Handle to GSP shared memory
*/
static void RegisterInterruptRelayQueue(Service::Interface* self) {
static void RegisterInterruptRelayQueue(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 flags = cmd_buff[1];
@ -391,7 +389,7 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void UnregisterInterruptRelayQueue(Service::Interface* self) {
static void UnregisterInterruptRelayQueue(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
g_thread_id = 0;
@ -592,7 +590,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
* Outputs:
* 1: Result code
*/
static void SetLcdForceBlack(Service::Interface* self) {
static void SetLcdForceBlack(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
bool enable_black = cmd_buff[1] != 0;
@ -609,7 +607,7 @@ static void SetLcdForceBlack(Service::Interface* self) {
}
/// This triggers handling of the GX command written to the command buffer in shared memory.
static void TriggerCmdReqQueue(Service::Interface* self) {
static void TriggerCmdReqQueue(Interface* self) {
// Iterate through each thread's command queue...
for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
CommandBuffer* command_buffer = (CommandBuffer*)GetCommandBuffer(thread_id);
@ -648,7 +646,7 @@ static void TriggerCmdReqQueue(Service::Interface* self) {
* 8: Bottom screen framebuffer format
* 9: Bottom screen framebuffer width
*/
static void ImportDisplayCaptureInfo(Service::Interface* self) {
static void ImportDisplayCaptureInfo(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
// TODO(Subv): We're always returning the framebuffer structures for thread_id = 0,
@ -680,7 +678,7 @@ static void ImportDisplayCaptureInfo(Service::Interface* self) {
* Outputs:
* 1: Result code
*/
static void AcquireRight(Service::Interface* self) {
static void AcquireRight(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
gpu_right_acquired = true;
@ -695,7 +693,7 @@ static void AcquireRight(Service::Interface* self) {
* Outputs:
* 1: Result code
*/
static void ReleaseRight(Service::Interface* self) {
static void ReleaseRight(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
gpu_right_acquired = false;
@ -739,10 +737,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x001F0082, nullptr, "StoreDataCache"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
GSP_GPU::GSP_GPU() {
Register(FunctionTable);
g_interrupt_event = nullptr;
@ -757,10 +752,11 @@ Interface::Interface() {
first_initialization = true;
}
Interface::~Interface() {
GSP_GPU::~GSP_GPU() {
g_interrupt_event = nullptr;
g_shared_memory = nullptr;
gpu_right_acquired = false;
}
} // namespace
} // namespace GSP
} // namespace Service

View file

@ -11,10 +11,8 @@
#include "core/hle/result.h"
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace GSP_GPU
namespace GSP_GPU {
namespace Service {
namespace GSP {
/// GSP interrupt ID
enum class InterruptId : u8 {
@ -176,11 +174,10 @@ struct CommandBuffer {
};
static_assert(sizeof(CommandBuffer) == 0x200, "CommandBuffer struct has incorrect size");
/// Interface to "srv:" service
class Interface : public Service::Interface {
class GSP_GPU final : public Interface {
public:
Interface();
~Interface() override;
GSP_GPU();
~GSP_GPU() override;
std::string GetPortName() const override {
return "gsp::Gpu";
@ -203,4 +200,6 @@ ResultCode SetBufferSwap(u32 screen_id, const FrameBufferInfo& info);
* @returns FramebufferUpdate Information about the specified framebuffer.
*/
FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index);
} // namespace
} // namespace GSP
} // namespace Service

View file

@ -4,10 +4,8 @@
#include "core/hle/service/gsp_lcd.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace GSP_LCD
namespace GSP_LCD {
namespace Service {
namespace GSP {
const Interface::FunctionInfo FunctionTable[] = {
// clang-format off
@ -23,11 +21,9 @@ const Interface::FunctionInfo FunctionTable[] = {
// clang-format on
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
GSP_LCD::GSP_LCD() {
Register(FunctionTable);
}
} // namespace
} // namespace GSP
} // namespace Service

View file

@ -6,19 +6,17 @@
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace GSP_LCD
namespace Service {
namespace GSP {
namespace GSP_LCD {
/// Interface to "gsp::Lcd" service
class Interface : public Service::Interface {
class GSP_LCD final : public Interface {
public:
Interface();
GSP_LCD();
std::string GetPortName() const override {
return "gsp::Lcd";
}
};
} // namespace
} // namespace GSP
} // namespace Service

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