Commit Graph
21339 Commits
Author SHA1 Message Date
MarcZX10 deff826f07 test(libSceSystemService): cover resolving the host language from an injected source
Checks the first recognised locale wins over later and earlier unrecognised
ones, malformed entries are skipped, and an unrecognised or missing locale
returns English (United States) with exactly one notice that names the first
detected locale or says the host reports none.
2026-10-29 08:51:17 +00:00
MarcZX10 59d0159e3b feat(libSceSystemService): resolve the host language from an injectable locale source
ResolveHostLanguage takes the host locales in order of preference from a source
and the console language of the first one that is recognised. When none is
(or the source returns none), it reports one notice line that names the
detected locale and the English (United States) fallback and returns it, so
auto never fails. Source and notice are injectable so tests do not depend on
the host.
2026-10-29 08:51:17 +00:00
MarcZX10 0b45532833 build(libSceSystemService): link CoreFoundation where the macOS host locale source is used
The macOS locale source calls CFLocaleCopyPreferredLanguages. The header is
inline, so every target that resolves the language needs the framework: an
interface target carries it on macOS and nothing elsewhere, and the system
service library, the trophy library and the locale test link it.
2026-10-29 08:51:17 +00:00
MarcZX10 0c4be5ba0e feat(libSceSystemService): choose the host locale source of the platform
HostLocales calls the Windows source on Windows, the macOS source on macOS and
the POSIX environment source elsewhere.
2026-10-29 08:51:17 +00:00
MarcZX10 ab43fe1e8c feat(libSceSystemService): read the host locales of a macOS system
MacHostLocales returns the user's preferred languages in order from
CFLocaleCopyPreferredLanguages, BCP-47 tags such as en-US, zh-Hans-CN or
pt-BR, which the process environment of a macOS desktop session does not
carry. Only built on macOS.
2026-10-29 08:51:17 +00:00
MarcZX10 403ca71698 feat(libSceSystemService): read the host locale of a Windows system
WindowsHostLocales returns the user default locale name from
GetUserDefaultLocaleName, a BCP-47 tag such as en-US, zh-Hans-CN or pt-BR. It
reads the regional-format locale of the user, not the list of preferred
display languages, because that is one documented call with a fixed buffer.
A name with a non-ASCII character is treated as no locale. Only built on
Windows.
2026-10-29 08:51:17 +00:00
MarcZX10 56947540a6 test(libSceSystemService): cover the POSIX host locale source with injected environments
Checks the LC_ALL, LC_MESSAGES, LANG precedence with empty and unset
variables, that other categories are not read, and the LANGUAGE rules: its
entries come first under a real locale, empty entries are skipped, and it is
ignored under C, POSIX, C.UTF-8 and when nothing else is set.
2026-10-29 08:51:17 +00:00
MarcZX10 c3fa50327c feat(libSceSystemService): read the host locales of a POSIX system
PosixHostLocales takes an injectable environment reader and returns the locales
in order of preference: LC_ALL, then LC_MESSAGES, then LANG, the first one that
is set and not empty, as the C library chooses the locale of the messages
category. When that locale is a real one (not C, POSIX or unset) the entries of
LANGUAGE, the GNU preference list, come before it, as gettext ignores LANGUAGE
under the C locale.
2026-10-29 08:51:17 +00:00
MarcZX10 79692c44ef test(libSceSystemService): cover the locale fallback rules
Checks that every console language is reached by a tag of its own, that
unrecognised locales (empty, C, POSIX, malformed, languages the console has no
entry for such as lt, he, hi, ca and sr) give English (United States) and are
reported as unrecognised, and that a recognised language with an unknown
region or script takes its main row.
2026-10-29 08:51:17 +00:00
MarcZX10 26f2879f05 feat(libSceSystemService): fall back to English (United States) for a locale with no console language
MatchLocale returns the console language of a locale and whether the locale was
recognised. An empty, C, POSIX, malformed or unlisted locale is not
recognised and gives English (United States), the language the console answers
when ANYPS5_LANGUAGE is unset, so resolving a host locale cannot fail. A
recognised language with no row for its region already takes the language's
main row.
2026-10-29 08:51:17 +00:00
MarcZX10 678cfa6f71 test(libSceSystemService): cover the Arabic, Thai, Vietnamese, Indonesian, Turkish, Greek and Hungarian rows
Checks each language with several regions and POSIX spellings, the legacy in
code, and ar-001 (the world region).
2026-10-29 08:51:17 +00:00
MarcZX10 7538dd65df feat(libSceSystemService): map Arabic, Thai, Vietnamese, Indonesian, Turkish, Greek and Hungarian locales
Each has a single console language, so every region maps to it. The legacy
code in for Indonesian, still used by some POSIX and Java hosts, is accepted
as well as id.
2026-10-29 08:51:17 +00:00
MarcZX10 f1530f3734 test(libSceSystemService): cover the Slavic and Nordic locale rows
Checks every language of the group, the three Norwegian codes, and that the
Baltic and other Slavic languages the console has no entry for (lt, lv, et, sk,
sl, bg, sr, hr, be, is) are not mapped to a neighbour.
2026-10-29 08:51:17 +00:00
MarcZX10 e439a2afe1 feat(libSceSystemService): map Slavic and Nordic locales
Russian, Ukrainian, Polish, Czech, Finnish, Swedish and Danish map to their
console language. Norwegian is the console's one Norwegian language, so no,
nb (Bokmal) and nn (Nynorsk) all map to it. Lithuanian, Latvian, Estonian and
the other Slavic languages the console has no entry for stay unrecognised.
2026-10-29 08:51:17 +00:00
MarcZX10 f365e87c52 test(libSceSystemService): cover the Japanese and Korean locale rows
Checks ja and ko with and without a region, with explicit scripts and with
POSIX codesets, including the legacy eucJP codeset.
2026-10-29 08:51:17 +00:00
MarcZX10 6db6ef40d4 feat(libSceSystemService): map Japanese and Korean locales
Japanese and Korean each have one console language, so every region of ja and
ko maps to it.
2026-10-29 08:51:17 +00:00
MarcZX10 cbf394c842 test(libSceSystemService): cover the Chinese locale rows
Checks Simplified and Traditional by region (CN, SG, TW, HK, MO), by script
(Hans, Hant), a script that contradicts the region (zh-Hans-TW, zh-Hant-CN),
an unknown script and region falling back to Simplified, and the Mandarin and
Cantonese rows.
2026-10-29 08:51:17 +00:00
MarcZX10 b9f716124d feat(libSceSystemService): map Chinese locales to Traditional or Simplified
A script decides first (zh-Hant is Traditional, zh-Hans Simplified, also
against a contradicting region such as zh-Hans-TW), then the region (TW, HK and
MO are Traditional), and a bare zh is Simplified. Mandarin (cmn) follows the
same rules and Cantonese (yue) is Traditional unless it names Hans.
2026-10-29 08:51:16 +00:00
MarcZX10 cc521b8cea test(libSceSystemService): cover the Spanish and Portuguese locale rows
Checks the Spain row, every Latin American country row, the es-419 region, the
Brazilian default for a bare pt, the Portuguese territories, and spellings
with case differences, POSIX codesets and an explicit script.
2026-10-29 08:51:16 +00:00
MarcZX10 348ac5df09 feat(libSceSystemService): map Spanish and Portuguese locales to their regional console languages
The console has Spanish (Spain) and Spanish (Latin America), and Portuguese
(Portugal) and Portuguese (Brazil). A bare es is Spain, and the Latin American
countries, the es-419 region and es-US are Latin America. A bare pt is Brazil,
the language's larger variant, and Portugal and the African and Asian
territories that follow the European standard (AO, MZ, CV, GW, ST, TL, MO) are
Portugal.
2026-10-29 08:51:16 +00:00
MarcZX10 6478422bca test(libSceSystemService): cover the Latin-script European locale rows
Maps English, French, German, Italian, Dutch and Romanian locales in BCP-47
and POSIX spellings, including the regional rows (en-GB, en-IE, en-AU, en-NZ,
fr-CA) and the regions that fall back to the main row (en-CA, en-IN, fr-BE,
fr-CH, de-AT, de-CH, nl-BE).
2026-10-29 08:51:16 +00:00
MarcZX10 48e165218d feat(libSceSystemService): look up the console language of a locale in a row table
ConsoleLanguageForTag picks, among the rows of the tag's language whose script
and region are empty or equal to the tag's, the one that names the most
(script outranks region), so a regional row wins over the language's main row
and a language with no row for the tag's region falls back to its main row.
The first group of rows covers the Latin-script European languages that have
no regional split but a few: English (United Kingdom for GB, IE, AU and NZ,
English (United States) otherwise), French and French (Canada), German,
Italian, Dutch and Romanian.
2026-10-29 08:51:16 +00:00
MarcZX10 83e0bfdfd6 test(libSceSystemService): cover parsing a locale in either form
Checks that BCP-47 and POSIX spellings of the same locale give the same
language, script and region, that the @latin modifier supplies a script, and
that C, POSIX, empty and malformed texts are refused without writing the tag.
2026-10-29 08:51:16 +00:00
MarcZX10 f2fbb65aaa feat(libSceSystemService): parse a locale given as a BCP-47 tag or a POSIX name
ParseLocale normalises the text as a POSIX name first, which leaves a BCP-47
tag unchanged except for underscores, and then parses the result, so the
caller handles en-US and en_US.UTF-8 alike. C, POSIX and an empty text report
no locale and leave the output tag as it was.
2026-10-29 08:51:16 +00:00
MarcZX10 c386fbe7f7 test(libSceSystemService): cover POSIX locale name normalisation
Checks NormalizePosixLocale on codesets, modifiers, the Latn and Cyrl script
modifiers (also where the name already has a script), names that are already
BCP-47, and C, POSIX and empty names, which must normalise to no locale.
2026-10-29 08:51:16 +00:00
MarcZX10 4d814c6a8c feat(libSceSystemService): normalise POSIX locale names to BCP-47 form
POSIX hosts name their locale language[_territory][.codeset][@modifier], such
as en_GB.UTF-8@euro, and use C and POSIX for no locale at all. NormalizePosixLocale
drops the codeset and the modifier, turns underscores into hyphens, maps the
@latin and @cyrillic modifiers to the Latn and Cyrl scripts where the name has
no script, and returns an empty string for C, POSIX and an empty name so the
caller sees "no locale" instead of a language called C.
2026-10-29 08:51:16 +00:00
MarcZX10 238bf96bcc test(libSceSystemService): cover the BCP-47 locale tag parser
Adds a host-only test, system_service_language_locale, for ParseTag: case
normalisation of the language, script and region subtags, the three-digit
region of es-419, variants and extensions that are ignored, and the inputs it
must reject (empty and oversized subtags, one-letter and long languages, the
POSIX underscore and codeset forms) without touching the output tag.
2026-10-29 08:51:16 +00:00
MarcZX10 30b912fea4 feat(libSceSystemService): parse BCP-47 locale tags
ANYPS5_LANGUAGE can only name a console language number. Taking the language
from the host needs the host's locale, which arrives as a BCP-47 tag such as
en-US, pt-BR or zh-Hant-TW. ParseTag reads the language, script and region
subtags, normalises their case, ignores variants and extensions, and rejects
empty subtags, subtags over 8 characters and languages that are not 2 or 3
letters.
2026-10-29 08:51:16 +00:00
Adrià aaccd0ba39 Merge pull request #10033 from xXPBSXx/docs/debt-systemservice-paramgetint-title
docs(debt): note how a title uses the value of sceSystemServiceParamGetInt
2026-10-29 09:36:17 +01:00
Adrià 7a89237a76 Merge pull request #10554 from xXPBSXx/docs/debt-contentexport-fromdata-title
docs(debt): note how titles call sceContentExportFromData
2026-10-29 09:36:11 +01:00
Adrià ef5dc7fcea Merge pull request #11857 from PrivacyOnion/docs/debt-voicechat-stubs
docs(debt): record silent stubs in libSceVoiceChat debt
2026-10-29 09:36:04 +01:00
Adrià 7f3ea34400 Merge pull request #12295 from dantdmdarealguy/docs/contributing-ci-push-and-inputs
docs(contributing): describe the push relinker job and the manual run inputs
2026-10-29 09:35:58 +01:00
Adrià 20c907b510 Merge pull request #11091 from slopgobblercobbler/fix/savedata-dialog-param-size-validation
docs(debt): document unmeasured sceSaveDataDialogOpen param size validation
2026-10-29 09:35:34 +01:00
Adrià 804e5b2050 Merge pull request #11828 from milescoviello/docs/webapi2-teardown-silent-stubs
docs(libSceNpWebApi2): list the user-context and push-event teardown calls as silent stubs
2026-10-29 09:32:40 +01:00
Adrià 0798bb76c8 Merge pull request #12416 from xXPBSXx/test/getrlimit-asan-skip
test(libkernel): do not lower RLIMIT_DATA under AddressSanitizer in guest_getrlimit
2026-10-29 09:31:52 +01:00
Adrià e545507d1c Merge pull request #12413 from Elma7e/test/random-boundary-and-size-extremes
test(libSceRandom): cover maximum size boundary and unsigned overflow validation
2026-10-29 09:31:47 +01:00
Adrià aca4b864db Merge pull request #12412 from Elma7e/test/audio3d-mixer-panning-and-zero-frame
test(libSceAudio3d): cover mixer zero-frame, negative pan clamping, and 7-channel downmix
2026-10-29 09:31:41 +01:00
Adrià 2257ffde7b Merge pull request #9473 from cadenasynyster/fix/windows-directory-link-rmdir-unlink
fix(libkernel): rmdir and unlink on a Windows directory link
2026-10-29 09:31:36 +01:00
Adrià 430270f510 Merge pull request #12409 from Elma7e/test/content-search-post-terminate-lifecycle
test(libSceContentSearch): cover post-terminate lifecycle and argument precedence
2026-10-29 09:31:30 +01:00
Adrià 528b583162 Merge pull request #12175 from rooklz/fix/stubgen-case-aliases
fix(tools): refuse stubgen outputs that alias on case-insensitive filesystems
2026-10-29 09:31:24 +01:00
Adrià 9416ccf462 Merge pull request #12216 from al3w0f205/test/savedata-convert-invalid-dir-names-validation
test(libSceSaveData.native): cover invalid directory names in sceSaveDataConvert
2026-10-29 09:31:19 +01:00
Adrià 2a90fb105b Merge pull request #9431 from Get-fix/ps4/agc-gcn
feat(libSceAgcDriver): draw PS4 (GCN) command buffers
2026-10-29 09:31:13 +01:00
Adrià 950f8a5a53 Merge pull request #11681 from milescoviello/test/main-direct-memory
test(libkernel): cover the block sceKernelAllocateMainDirectMemory returns and its type
2026-10-29 09:31:07 +01:00
Adrià 21aaa0c026 Merge pull request #11824 from milescoviello/docs/trophy2-registration-silent-stubs
docs(libSceNpTrophy2): list the context registration and handle teardown as silent stubs
2026-10-29 09:30:44 +01:00
Adrià 58c3fd47ed Merge pull request #11817 from milescoviello/docs/uds-silent-stubs
docs(libSceNpUniversalDataSystem): list the context registration and handle teardown as silent stubs
2026-10-29 09:30:39 +01:00
Dean 4c7d275bef Merge pull request #11684 from oneandonlydean/feat/agc-unclamped-normalized-blend-v2
feat(agc): blend into an unclamped normalized color target in the pixel shader
2026-10-29 20:48:48 +13:00
Adrià f4b33f1c90 Merge pull request #9490 from JJenkx/windows/held-reads-env-once
perf(agc): read APS5_NO_QUEUED_DRAW_READ_ORDER once in the held-read check
2026-10-29 08:48:25 +01:00
Adrià c70c75ad13 Merge pull request #9284 from DavidSamir/feat/libkernel-sys-ksem-unnamed
feat(libkernel): implement the unnamed ksem semaphores
2026-10-29 08:48:19 +01:00
Adrià 27e4c68eb6 Merge pull request #12280 from Filip722/perf/shader-identity-export-mapping
perf(shader): bypass identity fragment export mappings
2026-10-29 08:48:14 +01:00
Adrià 14b3441f3d Merge pull request #5209 from Misjudgments/fix/psp-classics-general
fix(libSceFont): keep horizontal writing on a single baseline
2026-10-29 08:43:02 +01:00