diff options
| author | 2019-10-06 13:02:23 -0400 | |
|---|---|---|
| committer | 2019-10-06 13:42:23 -0400 | |
| commit | 69f16ba50e3c52a17405670b976ac4ba63f58021 (patch) | |
| tree | e64b63528a155da323ea02039ede638fb6994ecd /src/core/core.cpp | |
| parent | Merge pull request #2942 from ReinUsesLisp/clang-warnings (diff) | |
| download | yuzu-69f16ba50e3c52a17405670b976ac4ba63f58021.tar.gz yuzu-69f16ba50e3c52a17405670b976ac4ba63f58021.tar.xz yuzu-69f16ba50e3c52a17405670b976ac4ba63f58021.zip | |
hle/service: Replace global system instance calls with instance-based ones
Migrates the HLE service code off the use of directly accessing the
global system instance where trivially able to do so.
This removes all usages of Core::CurrentProcess from the service code,
only 8 occurrences of this function exist elsewhere. There's still quite
a bit of "System::GetInstance()" being used, however this was able to
replace a few instances.
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 75a7ffb97..a58ceb703 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -111,7 +111,8 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | |||
| 111 | } | 111 | } |
| 112 | struct System::Impl { | 112 | struct System::Impl { |
| 113 | explicit Impl(System& system) | 113 | explicit Impl(System& system) |
| 114 | : kernel{system}, cpu_core_manager{system}, applet_manager{system}, reporter{system} {} | 114 | : kernel{system}, fs_controller{system}, cpu_core_manager{system}, |
| 115 | applet_manager{system}, reporter{system} {} | ||
| 115 | 116 | ||
| 116 | Cpu& CurrentCpuCore() { | 117 | Cpu& CurrentCpuCore() { |
| 117 | return cpu_core_manager.GetCurrentCore(); | 118 | return cpu_core_manager.GetCurrentCore(); |
| @@ -641,11 +642,11 @@ bool System::GetExitLock() const { | |||
| 641 | return impl->exit_lock; | 642 | return impl->exit_lock; |
| 642 | } | 643 | } |
| 643 | 644 | ||
| 644 | void System::SetCurrentProcessBuildID(std::array<u8, 32> id) { | 645 | void System::SetCurrentProcessBuildID(const CurrentBuildProcessID& id) { |
| 645 | impl->build_id = id; | 646 | impl->build_id = id; |
| 646 | } | 647 | } |
| 647 | 648 | ||
| 648 | const std::array<u8, 32>& System::GetCurrentProcessBuildID() const { | 649 | const System::CurrentBuildProcessID& System::GetCurrentProcessBuildID() const { |
| 649 | return impl->build_id; | 650 | return impl->build_id; |
| 650 | } | 651 | } |
| 651 | 652 | ||