(Translation) Add "?mode=fast" first when we set either language
and/or target language
This commit is contained in:
parent
a79cd32363
commit
2c063cb1c9
13
retroarch.c
13
retroarch.c
|
@ -3206,6 +3206,7 @@ static bool run_translation_service(void)
|
||||||
memcpy(json_buffer+11+out_length, (const void*)rf2, 3*sizeof(uint8_t));
|
memcpy(json_buffer+11+out_length, (const void*)rf2, 3*sizeof(uint8_t));
|
||||||
|
|
||||||
{
|
{
|
||||||
|
bool prefix_set = false;
|
||||||
char new_ai_service_url[PATH_MAX_LENGTH];
|
char new_ai_service_url[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
strlcpy(new_ai_service_url,
|
strlcpy(new_ai_service_url,
|
||||||
|
@ -3218,6 +3219,12 @@ static bool run_translation_service(void)
|
||||||
|
|
||||||
if (!string_is_empty(lang_source))
|
if (!string_is_empty(lang_source))
|
||||||
{
|
{
|
||||||
|
if (!prefix_set)
|
||||||
|
{
|
||||||
|
strlcat(new_ai_service_url, "?mode=fast",
|
||||||
|
sizeof(new_ai_service_url));
|
||||||
|
prefix_set = true;
|
||||||
|
}
|
||||||
strlcat(new_ai_service_url, "&source_lang=",
|
strlcat(new_ai_service_url, "&source_lang=",
|
||||||
sizeof(new_ai_service_url));
|
sizeof(new_ai_service_url));
|
||||||
strlcat(new_ai_service_url, lang_source,
|
strlcat(new_ai_service_url, lang_source,
|
||||||
|
@ -3232,6 +3239,12 @@ static bool run_translation_service(void)
|
||||||
|
|
||||||
if (!string_is_empty(lang_target))
|
if (!string_is_empty(lang_target))
|
||||||
{
|
{
|
||||||
|
if (!prefix_set)
|
||||||
|
{
|
||||||
|
strlcat(new_ai_service_url, "?mode=fast",
|
||||||
|
sizeof(new_ai_service_url));
|
||||||
|
prefix_set = true;
|
||||||
|
}
|
||||||
strlcat(new_ai_service_url, "&target_lang=",
|
strlcat(new_ai_service_url, "&target_lang=",
|
||||||
sizeof(new_ai_service_url));
|
sizeof(new_ai_service_url));
|
||||||
strlcat(new_ai_service_url, lang_target,
|
strlcat(new_ai_service_url, lang_target,
|
||||||
|
|
Loading…
Reference in New Issue