Skip to content

Commit 41ea915

Browse files
committed
Added a global Services() convenience function to wrap around CoreServices::getInstance()
1 parent 385dd62 commit 41ea915

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Core/Contents/Include/PolyCoreServices.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,8 @@ namespace Polycode {
182182
FontManager *fontManager;
183183
Renderer *renderer;
184184
};
185+
186+
187+
CoreServices *Services();
188+
185189
}

Core/Contents/Source/PolyCoreServices.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ std::map<long, CoreServices*> CoreServices::instanceMap;
4242
CoreMutex *CoreServices::renderMutex = 0;
4343
CoreServices* CoreServices::overrideInstance = NULL;
4444

45+
CoreServices *Polycode::Services() {
46+
return CoreServices::getInstance();
47+
}
48+
4549
CoreMutex *CoreServices::getRenderMutex() {
4650
if(renderMutex == NULL) {
4751
Logger::log("Creating render mutex...\n");

0 commit comments

Comments
 (0)