diff --git a/include/c2d/font.h b/include/c2d/font.h index 130aa8e..7a8265f 100644 --- a/include/c2d/font.h +++ b/include/c2d/font.h @@ -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); diff --git a/source/font.c b/source/font.c index 5d1b61d..b356aba 100644 --- a/source/font.c +++ b/source/font.c @@ -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;