mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-29 11:47:52 -05:00
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.
This commit is contained in:
@ -7,6 +7,10 @@
|
||||
#include "core/hle/kernel/object.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Kernel {
|
||||
class SharedMemory;
|
||||
}
|
||||
@ -15,7 +19,7 @@ namespace Service::HID {
|
||||
|
||||
class IRS final : public ServiceFramework<IRS> {
|
||||
public:
|
||||
explicit IRS(Core::System& system);
|
||||
explicit IRS(Core::System& system_);
|
||||
~IRS() override;
|
||||
|
||||
private:
|
||||
@ -37,14 +41,14 @@ private:
|
||||
void RunIrLedProcessor(Kernel::HLERequestContext& ctx);
|
||||
void StopImageProcessorAsync(Kernel::HLERequestContext& ctx);
|
||||
void ActivateIrsensorWithFunctionLevel(Kernel::HLERequestContext& ctx);
|
||||
|
||||
std::shared_ptr<Kernel::SharedMemory> shared_mem;
|
||||
const u32 device_handle{0xABCD};
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
class IRS_SYS final : public ServiceFramework<IRS_SYS> {
|
||||
public:
|
||||
explicit IRS_SYS();
|
||||
explicit IRS_SYS(Core::System& system);
|
||||
~IRS_SYS() override;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user