Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/c2d/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ C2D_Font C2D_FontLoadFromHandle(FILE* f);
/** @brief Load corresponding font from system archive
* @param[in] region Region to get font from
* @returns Font handle
* @retval NULL Error
* @retval NULL Currently loaded system font
* @remark JPN, USA, EUR, and AUS all use the same font.
* @remark If region is an arbitrary region including possibly the current one, it's recommended to initialize cfgu first. This allows much lower RAM usage for the system font.
*/
C2D_Font C2D_FontLoadSystem(CFG_Region region);

Expand Down
2 changes: 1 addition & 1 deletion source/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ C2D_Font C2D_FontLoadSystem(CFG_Region region)

u8 systemRegion = 0;
Result rc = CFGU_SecureInfoGetRegion(&systemRegion);
if (R_FAILED(rc) || fontIdx == C2Di_RegionToFontIndex((CFG_Region)systemRegion))
if (R_SUCCEEDED(rc) && fontIdx == C2Di_RegionToFontIndex((CFG_Region)systemRegion))
{
fontEnsureMapped();
return NULL;
Expand Down