From b85a33c0ab549b25f32b4c9d3de2ee4dbcc41dd7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 23 Mar 2021 03:10:38 +0100 Subject: [PATCH] (OSX) Set workaround when loading config file - if network core URL points to arm64 and we are on x86_64 build or vice versa, we switch it back --- configuration.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/configuration.c b/configuration.c index fb8e97c196..543cba8aca 100644 --- a/configuration.c +++ b/configuration.c @@ -2372,7 +2372,6 @@ void config_set_defaults(void *data) configuration_set_string(settings, settings->paths.network_buildbot_url, DEFAULT_BUILDBOT_SERVER_URL); - configuration_set_string(settings, settings->paths.network_buildbot_assets_url, DEFAULT_BUILDBOT_ASSETS_SERVER_URL); @@ -3305,6 +3304,20 @@ static bool config_load_file(global_t *global, *settings->paths.directory_screenshot = '\0'; } } + +#if defined(__APPLE__) && defined(OSX) +#if defined(__aarch64__) + /* Wrong architecture, set it back to arm64 */ + if (string_is_equal(settings->paths.network_buildbot_url, "http://buildbot.libretro.com/nightly/apple/osx/x86_64/latest/")) + configuration_set_string(settings, + settings->paths.network_buildbot_url, DEFAULT_BUILDBOT_SERVER_URL); +#elif defined(__x86_64__) + /* Wrong architecture, set it back to x86_64 */ + if (string_is_equal(settings->paths.network_buildbot_url, "http://buildbot.libretro.com/nightly/apple/osx/arm64/latest/")) + configuration_set_string(settings, + settings->paths.network_buildbot_url, DEFAULT_BUILDBOT_SERVER_URL); +#endif +#endif if (string_is_equal(settings->paths.path_menu_wallpaper, "default")) *settings->paths.path_menu_wallpaper = '\0';