mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
add cheevos_custom_host setting (#13284)
This commit is contained in:
parent
5069acd288
commit
339feab15b
@ -591,8 +591,25 @@ static bool rcheevos_async_succeeded(int result,
|
||||
|
||||
void rcheevos_client_initialize(void)
|
||||
{
|
||||
/* force non-HTTPS until everything uses RAPI */
|
||||
rc_api_set_host("http://retroachievements.org");
|
||||
const settings_t* settings = config_get_ptr();
|
||||
const char* host = settings->arrays.cheevos_custom_host;
|
||||
if (!host[0])
|
||||
{
|
||||
#ifdef HAVE_SSL
|
||||
host = "https://retroachievements.org";
|
||||
#else
|
||||
host = "http://retroachievements.org";
|
||||
#endif
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Using host: %s\n", host);
|
||||
if (!string_is_equal(host, "https://retroachievements.org"))
|
||||
{
|
||||
rc_api_set_host(host);
|
||||
|
||||
if (!string_is_equal(host, "http://retroachievements.org"))
|
||||
rc_api_set_image_host(host);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************
|
||||
|
@ -1394,6 +1394,7 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
SETTING_ARRAY("audio_device", settings->arrays.audio_device, false, NULL, true);
|
||||
SETTING_ARRAY("camera_device", settings->arrays.camera_device, false, NULL, true);
|
||||
#ifdef HAVE_CHEEVOS
|
||||
SETTING_ARRAY("cheevos_custom_host", settings->arrays.cheevos_custom_host, false, NULL, true);
|
||||
SETTING_ARRAY("cheevos_username", settings->arrays.cheevos_username, false, NULL, true);
|
||||
SETTING_ARRAY("cheevos_password", settings->arrays.cheevos_password, false, NULL, true);
|
||||
SETTING_ARRAY("cheevos_token", settings->arrays.cheevos_token, false, NULL, true);
|
||||
|
@ -409,6 +409,7 @@ typedef struct settings
|
||||
char cheevos_password[256];
|
||||
char cheevos_token[32];
|
||||
char cheevos_leaderboards_enable[32];
|
||||
char cheevos_custom_host[64];
|
||||
char video_context_driver[32];
|
||||
char audio_driver[32];
|
||||
char audio_resampler[32];
|
||||
|
Loading…
x
Reference in New Issue
Block a user