Added Application::initMemoryFS() function to allow apps to init the memory FS before further initialization.
This commit is contained in:
parent
63fcb6181f
commit
71a268b5ad
@ -247,6 +247,11 @@ std::vector<FontConfig> Application::getDefaultFonts()
|
|||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::initMemoryFS()
|
||||||
|
{
|
||||||
|
mMemoryFS->addFile(DEFAULT_FONT_PATH, NOTO_SANS_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
void Application::handleMessage(const Message& message)
|
void Application::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
switch (message.severity)
|
switch (message.severity)
|
||||||
@ -297,7 +302,7 @@ bool Application::init()
|
|||||||
};
|
};
|
||||||
|
|
||||||
mMemoryFS = mFS.emplaceAdapter<mijin::MemoryFileSystemAdapter>();
|
mMemoryFS = mFS.emplaceAdapter<mijin::MemoryFileSystemAdapter>();
|
||||||
mMemoryFS->addFile(DEFAULT_FONT_PATH, NOTO_SANS_DATA);
|
initMemoryFS();
|
||||||
|
|
||||||
addConfigDir(mijin::getKnownFolder(mijin::KnownFolder::USER_CONFIG_ROOT) / getFolderName());
|
addConfigDir(mijin::getKnownFolder(mijin::KnownFolder::USER_CONFIG_ROOT) / getFolderName());
|
||||||
addDataDir(mijin::getKnownFolder(mijin::KnownFolder::USER_DATA_ROOT) / getFolderName());
|
addDataDir(mijin::getKnownFolder(mijin::KnownFolder::USER_DATA_ROOT) / getFolderName());
|
||||||
|
@ -131,6 +131,7 @@ protected:
|
|||||||
virtual std::string getWindowTitle() = 0;
|
virtual std::string getWindowTitle() = 0;
|
||||||
virtual void configureImgui();
|
virtual void configureImgui();
|
||||||
virtual std::vector<FontConfig> getDefaultFonts();
|
virtual std::vector<FontConfig> getDefaultFonts();
|
||||||
|
virtual void initMemoryFS();
|
||||||
virtual void handleMessage(const Message& message);
|
virtual void handleMessage(const Message& message);
|
||||||
virtual void handleSDLEvent(const SDL_Event& event);
|
virtual void handleSDLEvent(const SDL_Event& event);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user