mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
Simplify seed download.
This commit is contained in:
parent
eec9ff3e2b
commit
cb0144f07a
@ -288,11 +288,8 @@ Result util_import_seed(u64 titleId) {
|
||||
u32 responseCode = 0;
|
||||
if(R_SUCCEEDED(res = httpcBeginRequest(&context)) && R_SUCCEEDED(res = httpcGetResponseStatusCode(&context, &responseCode, 0))) {
|
||||
if(responseCode == 200) {
|
||||
u32 pos = 0;
|
||||
u32 bytesRead = 0;
|
||||
while(pos < sizeof(seed) && (R_SUCCEEDED(res = httpcDownloadData(&context, &seed[pos], sizeof(seed) - pos, &bytesRead)) || res == HTTPC_RESULTCODE_DOWNLOADPENDING)) {
|
||||
pos += bytesRead;
|
||||
}
|
||||
res = httpcDownloadData(&context, seed, sizeof(seed), &bytesRead);
|
||||
} else {
|
||||
res = R_FBI_HTTP_RESPONSE_CODE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user