summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar ameerj2021-03-12 17:56:02 -0500
committerGravatar ameerj2021-03-30 13:40:31 -0400
commit54c1e0897df82b5c61d6058da57db34e1a893fd4 (patch)
treee75bdf609729edf22461e4ceab4d52973bf00e74 /src/core
parentservice: Auto stub fallback (diff)
downloadyuzu-54c1e0897df82b5c61d6058da57db34e1a893fd4.tar.gz
yuzu-54c1e0897df82b5c61d6058da57db34e1a893fd4.tar.xz
yuzu-54c1e0897df82b5c61d6058da57db34e1a893fd4.zip
configuration: Add auto stub toggle that resets on boot
Auto-stub is an experimental debugging feature that may cause unforseen bugs. This adds a toggle to only allow auto-stubbing unimplemented functions when explicitly enabled when yuzu is launched.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/service.cpp10
-rw-r--r--src/core/settings.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 90260a008..aec399076 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -70,6 +70,7 @@
70#include "core/hle/service/vi/vi.h" 70#include "core/hle/service/vi/vi.h"
71#include "core/hle/service/wlan/wlan.h" 71#include "core/hle/service/wlan/wlan.h"
72#include "core/reporter.h" 72#include "core/reporter.h"
73#include "core/settings.h"
73 74
74namespace Service { 75namespace Service {
75 76
@@ -146,10 +147,11 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext
146 system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, 147 system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name,
147 service_name); 148 service_name);
148 UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf)); 149 UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf));
149 150 if (Settings::values.use_auto_stub) {
150 LOG_WARNING(Service, "Using auto stub fallback!"); 151 LOG_WARNING(Service, "Using auto stub fallback!");
151 IPC::ResponseBuilder rb{ctx, 2}; 152 IPC::ResponseBuilder rb{ctx, 2};
152 rb.Push(RESULT_SUCCESS); 153 rb.Push(RESULT_SUCCESS);
154 }
153} 155}
154 156
155void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { 157void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {
diff --git a/src/core/settings.h b/src/core/settings.h
index d849dded3..a81016b23 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -222,6 +222,7 @@ struct Values {
222 bool quest_flag; 222 bool quest_flag;
223 bool disable_macro_jit; 223 bool disable_macro_jit;
224 bool extended_logging; 224 bool extended_logging;
225 bool use_auto_stub;
225 226
226 // Miscellaneous 227 // Miscellaneous
227 std::string log_filter; 228 std::string log_filter;