mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-23 14:23:35 +01:00
commit
314c28516b
1 file changed
+12
-4
+12
-4
@@ -443,7 +443,9 @@ void __FontInit() {
|
||||
|
||||
void __FontShutdown() {
|
||||
for (auto iter = fontMap.begin(); iter != fontMap.end(); iter++) {
|
||||
iter->second->GetFontLib()->CloseFont(iter->second);
|
||||
FontLib *fontLib = iter->second->GetFontLib();
|
||||
if (fontLib)
|
||||
fontLib->CloseFont(iter->second);
|
||||
}
|
||||
fontMap.clear();
|
||||
for (auto iter = fontLibMap.begin(); iter != fontLibMap.end(); iter++) {
|
||||
@@ -577,10 +579,16 @@ u32 sceFontOpenUserFile(u32 libHandle, const char *fileName, u32 mode, u32 error
|
||||
}
|
||||
|
||||
int sceFontClose(u32 fontHandle) {
|
||||
INFO_LOG(HLE, "sceFontClose(%x)", fontHandle);
|
||||
LoadedFont *font = GetLoadedFont(fontHandle, false);
|
||||
FontLib *fontLib = font->GetFontLib();
|
||||
fontLib->CloseFont(font);
|
||||
if (font)
|
||||
{
|
||||
INFO_LOG(HLE, "sceFontClose(%x)", fontHandle);
|
||||
FontLib *fontLib = font->GetFontLib();
|
||||
if (fontLib)
|
||||
fontLib->CloseFont(font);
|
||||
}
|
||||
else
|
||||
ERROR_LOG(HLE, "sceFontClose(%x) - font not open?", fontHandle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user