service/gsp: Addressed comment about global state

This commit is contained in:
NarcolepticK 2018-06-27 11:05:38 -04:00
parent 188979b3e2
commit d25cfbc4cc

View File

@ -11,7 +11,6 @@ namespace Service {
namespace GSP { namespace GSP {
static std::weak_ptr<GSP_GPU> gsp_gpu; static std::weak_ptr<GSP_GPU> gsp_gpu;
static std::weak_ptr<GSP_LCD> gsp_lcd;
FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) { FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) {
auto gpu = gsp_gpu.lock(); auto gpu = gsp_gpu.lock();
@ -30,9 +29,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
gpu->InstallAsService(service_manager); gpu->InstallAsService(service_manager);
gsp_gpu = gpu; gsp_gpu = gpu;
auto lcd = std::make_shared<GSP_LCD>(); std::make_shared<GSP_LCD>()->InstallAsService(service_manager);
lcd->InstallAsService(service_manager);
gsp_lcd = lcd;
} }
} // namespace GSP } // namespace GSP