summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/service.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 20e7fb4d3..3a7d6c469 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -10,6 +10,7 @@
10#include <string> 10#include <string>
11 11
12#include "common/common.h" 12#include "common/common.h"
13#include "common/string_util.h"
13#include "core/mem_map.h" 14#include "core/mem_map.h"
14 15
15#include "core/hle/kernel/kernel.h" 16#include "core/hle/kernel/kernel.h"
@@ -79,21 +80,20 @@ public:
79 u32* cmd_buff = GetCommandBuffer(); 80 u32* cmd_buff = GetCommandBuffer();
80 auto itr = m_functions.find(cmd_buff[0]); 81 auto itr = m_functions.find(cmd_buff[0]);
81 82
82 if (itr == m_functions.end()) { 83 if (itr == m_functions.end() || itr->second.func == nullptr) {
83 ERROR_LOG(OSHLE, "unknown/unimplemented function: port=%s, command=0x%08X", 84 // Number of params == bits 0-5 + bits 6-11
84 GetPortName().c_str(), cmd_buff[0]); 85 int num_params = (cmd_buff[0] & 0x3F) + ((cmd_buff[0] >> 6) & 0x3F);
85 86
86 // TODO(bunnei): Hack - ignore error 87 std::string error = "unknown/unimplemented function '%s': port=%s";
87 u32* cmd_buff = Service::GetCommandBuffer(); 88 for (int i = 1; i <= num_params; ++i) {
88 cmd_buff[1] = 0; 89 error += Common::StringFromFormat(", cmd_buff[%i]=%u", i, cmd_buff[i]);
89 return MakeResult<bool>(false); 90 }
90 } 91
91 if (itr->second.func == nullptr) { 92 std::string name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name;
92 ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s", 93
93 GetPortName().c_str(), itr->second.name.c_str()); 94 ERROR_LOG(OSHLE, error.c_str(), name.c_str(), GetPortName().c_str());
94 95
95 // TODO(bunnei): Hack - ignore error 96 // TODO(bunnei): Hack - ignore error
96 u32* cmd_buff = Service::GetCommandBuffer();
97 cmd_buff[1] = 0; 97 cmd_buff[1] = 0;
98 return MakeResult<bool>(false); 98 return MakeResult<bool>(false);
99 } 99 }