From 2c063cb1c9fef0398d63d4b7287934aa76c7f0e4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 22 Aug 2019 23:18:10 +0200 Subject: [PATCH] (Translation) Add "?mode=fast" first when we set either language and/or target language --- retroarch.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/retroarch.c b/retroarch.c index 7f88fa7f61..71ec58271f 100644 --- a/retroarch.c +++ b/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)); { + bool prefix_set = false; char new_ai_service_url[PATH_MAX_LENGTH]; strlcpy(new_ai_service_url, @@ -3218,6 +3219,12 @@ static bool run_translation_service(void) 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=", sizeof(new_ai_service_url)); strlcat(new_ai_service_url, lang_source, @@ -3232,6 +3239,12 @@ static bool run_translation_service(void) 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=", sizeof(new_ai_service_url)); strlcat(new_ai_service_url, lang_target,