summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ptm/ptm.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-04-06 20:44:52 +0200
committerGitHub <noreply@github.com>2017-04-06 20:44:52 +0200
commit26979cd6efb2c8e3870742f2ae5b1e93ec21782d (patch)
treeb689d7d51adabd07b69f84e9bf2ae7474240e12f /src/core/hle/service/ptm/ptm.cpp
parentMerge pull request #2634 from wwylele/battery (diff)
parenthopefully fix clang-format issues with old version (diff)
downloadyuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar.gz
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar.bz2
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar.lz
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar.xz
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.tar.zst
yuzu-26979cd6efb2c8e3870742f2ae5b1e93ec21782d.zip
Diffstat (limited to 'src/core/hle/service/ptm/ptm.cpp')
-rw-r--r--src/core/hle/service/ptm/ptm.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp
index 2542f8303..e373ed47a 100644
--- a/src/core/hle/service/ptm/ptm.cpp
+++ b/src/core/hle/service/ptm/ptm.cpp
@@ -92,8 +92,7 @@ void GetSoftwareClosedFlag(Service::Interface* self) {
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
-void CheckNew3DS(Service::Interface* self) {
- u32* cmd_buff = Kernel::GetCommandBuffer();
+void CheckNew3DS(IPC::RequestBuilder& rb) {
const bool is_new_3ds = Settings::values.is_new_3ds;
if (is_new_3ds) {
@@ -101,12 +100,17 @@ void CheckNew3DS(Service::Interface* self) {
"settings. Citra does not fully support New 3DS emulation yet!");
}
- cmd_buff[1] = RESULT_SUCCESS.raw;
- cmd_buff[2] = is_new_3ds ? 1 : 0;
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(is_new_3ds);
LOG_WARNING(Service_PTM, "(STUBBED) called isNew3DS = 0x%08x", static_cast<u32>(is_new_3ds));
}
+void CheckNew3DS(Service::Interface* self) {
+ IPC::RequestBuilder rb(Kernel::GetCommandBuffer(), 0x40A, 0, 0); // 0x040A0000
+ CheckNew3DS(rb);
+}
+
void Init() {
AddService(new PTM_Gets);
AddService(new PTM_Play);