From bcaadac22ca8a7320a46644e8199ef333edce8e9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Nov 2020 02:06:42 -0500 Subject: core: Make use of [[nodiscard]] with the System class Given this is a central class, we should flag cases where the return value of some functions not being used is likely a bug. --- src/yuzu_tester/yuzu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu_tester/yuzu.cpp') diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp index 5798ce43a..88e4bd1f7 100644 --- a/src/yuzu_tester/yuzu.cpp +++ b/src/yuzu_tester/yuzu.cpp @@ -256,11 +256,11 @@ int main(int argc, char** argv) { system.GPU().Start(); - system.Run(); + void(system.Run()); while (!finished) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } - system.Pause(); + void(system.Pause()); detached_tasks.WaitForAllTasks(); return return_value; -- cgit v1.2.3 From 1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 26 Nov 2020 15:19:08 -0500 Subject: service: Eliminate usages of the global system instance Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services. --- src/yuzu_tester/yuzu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/yuzu_tester/yuzu.cpp') diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp index 88e4bd1f7..ea94a6537 100644 --- a/src/yuzu_tester/yuzu.cpp +++ b/src/yuzu_tester/yuzu.cpp @@ -247,9 +247,10 @@ int main(int argc, char** argv) { "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", loader_id, error_id, static_cast(error_id)); } + break; } - Service::Yuzu::InstallInterfaces(system.ServiceManager(), datastring, callback); + Service::Yuzu::InstallInterfaces(system, datastring, callback); system.TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "SDLHideTester"); -- cgit v1.2.3 From 5bc4eabe36b7ef4dcd5ad8db1e944705655be432 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Nov 2020 10:50:48 -0500 Subject: core: Eliminate remaining usages of the global system instance Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends. --- src/yuzu_tester/yuzu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/yuzu_tester/yuzu.cpp') diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp index ea94a6537..50bd7ae41 100644 --- a/src/yuzu_tester/yuzu.cpp +++ b/src/yuzu_tester/yuzu.cpp @@ -160,10 +160,12 @@ int main(int argc, char** argv) { return -1; } + Core::System& system{Core::System::GetInstance()}; + Settings::values.use_gdbstub = false; - Settings::Apply(); + Settings::Apply(system); - std::unique_ptr emu_window{std::make_unique()}; + const auto emu_window{std::make_unique()}; bool finished = false; int return_value = 0; @@ -212,7 +214,6 @@ int main(int argc, char** argv) { return_value = -1; }; - Core::System& system{Core::System::GetInstance()}; system.SetContentProvider(std::make_unique()); system.SetFilesystem(std::make_shared()); system.GetFileSystemController().CreateFactories(*system.GetFilesystem()); -- cgit v1.2.3 From 10b0ab792681b27664030d53d8e1ff610d0010cf Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 19 Dec 2020 19:19:42 +0100 Subject: yuzu: Remove gdbstub configuration The gdbstub itself was removed with https://github.com/yuzu-emu/yuzu/pull/5028. This PR just removes the remaining gdb configuration code from the emulator and the UI. --- src/yuzu_tester/yuzu.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/yuzu_tester/yuzu.cpp') diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp index 50bd7ae41..6435ffabb 100644 --- a/src/yuzu_tester/yuzu.cpp +++ b/src/yuzu_tester/yuzu.cpp @@ -162,7 +162,6 @@ int main(int argc, char** argv) { Core::System& system{Core::System::GetInstance()}; - Settings::values.use_gdbstub = false; Settings::Apply(system); const auto emu_window{std::make_unique()}; -- cgit v1.2.3 From a745d87971b2c9795e1b2c587bfe30b849b522fa Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 2 Jan 2021 09:00:05 -0500 Subject: general: Fix various spelling errors --- src/yuzu_tester/yuzu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu_tester/yuzu.cpp') diff --git a/src/yuzu_tester/yuzu.cpp b/src/yuzu_tester/yuzu.cpp index 6435ffabb..09cf2ad77 100644 --- a/src/yuzu_tester/yuzu.cpp +++ b/src/yuzu_tester/yuzu.cpp @@ -242,7 +242,7 @@ int main(int argc, char** argv) { const u16 loader_id = static_cast(Core::System::ResultStatus::ErrorLoader); const u16 error_id = static_cast(load_result) - loader_id; LOG_CRITICAL(Frontend, - "While attempting to load the ROM requested, an error occured. Please " + "While attempting to load the ROM requested, an error occurred. Please " "refer to the yuzu wiki for more information or the yuzu discord for " "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", loader_id, error_id, static_cast(error_id)); -- cgit v1.2.3