mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
service/gsp: Addressed comment about global state
This commit is contained in:
parent
188979b3e2
commit
d25cfbc4cc
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user