mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-30 13:24:16 +01:00
gsp_gpu, shared_page: Change 3D LED State on SetLedForceOff
This commit is contained in:
parent
39fce60145
commit
f29f4ccdc9
@ -13,6 +13,7 @@
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/gsp/gsp_gpu.h"
|
||||
#include "core/hle/shared_page.h"
|
||||
#include "core/hw/gpu.h"
|
||||
#include "core/hw/hw.h"
|
||||
#include "core/hw/lcd.h"
|
||||
@ -712,6 +713,17 @@ void GSP_GPU::StoreDataCache(Kernel::HLERequestContext& ctx) {
|
||||
size, process->process_id);
|
||||
}
|
||||
|
||||
void GSP_GPU::SetLedForceOff(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x1C, 1, 0);
|
||||
|
||||
u8 state = rp.Pop<u8>();
|
||||
SharedPage::Set3DLed(state);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
LOG_DEBUG(Service_GSP, "(STUBBED) called");
|
||||
}
|
||||
|
||||
SessionData* GSP_GPU::FindRegisteredThreadData(u32 thread_id) {
|
||||
for (auto& session_info : connected_sessions) {
|
||||
SessionData* data = static_cast<SessionData*>(session_info.data.get());
|
||||
@ -752,7 +764,7 @@ GSP_GPU::GSP_GPU() : ServiceFramework("gsp::Gpu", 2) {
|
||||
{0x00190000, nullptr, "SaveVramSysArea"},
|
||||
{0x001A0000, nullptr, "RestoreVramSysArea"},
|
||||
{0x001B0000, nullptr, "ResetGpuCore"},
|
||||
{0x001C0040, nullptr, "SetLedForceOff"},
|
||||
{0x001C0040, &GSP_GPU::SetLedForceOff, "SetLedForceOff"},
|
||||
{0x001D0040, nullptr, "SetTestCommand"},
|
||||
{0x001E0080, nullptr, "SetInternalPriorities"},
|
||||
{0x001F0082, &GSP_GPU::StoreDataCache, "StoreDataCache"},
|
||||
|
@ -379,6 +379,9 @@ private:
|
||||
*/
|
||||
void StoreDataCache(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/// Force the 3D LED State (0 = On, Non-Zero = Off)
|
||||
void SetLedForceOff(Kernel::HLERequestContext& ctx);
|
||||
|
||||
/// Returns the session data for the specified registered thread id, or nullptr if not found.
|
||||
SessionData* FindRegisteredThreadData(u32 thread_id);
|
||||
|
||||
|
@ -93,4 +93,8 @@ void SetWifiLinkLevel(WifiLinkLevel level) {
|
||||
shared_page.wifi_link_level = static_cast<u8>(level);
|
||||
}
|
||||
|
||||
void Set3DLed(u8 state) {
|
||||
shared_page.ledstate_3d = state;
|
||||
}
|
||||
|
||||
} // namespace SharedPage
|
||||
|
@ -82,4 +82,6 @@ void SetMacAddress(const MacAddress&);
|
||||
|
||||
void SetWifiLinkLevel(WifiLinkLevel);
|
||||
|
||||
void Set3DLed(u8);
|
||||
|
||||
} // namespace SharedPage
|
||||
|
Loading…
Reference in New Issue
Block a user