void LoadServerScore(int nr, boolean download_score)
{
- if (!setup.api_server)
+ if (!setup.use_api_server)
return;
// always start with reliable default values
// (this should prevent reading it while the thread is writing to it)
LoadServerScoreFromCache(nr);
- if (download_score && runtime.api_server)
+ if (download_score && runtime.use_api_server)
{
// 2nd step: download server scores from score server to cache file
// (as thread, as it might time out if the server is not reachable)
void SaveServerScore(int nr)
{
- if (!runtime.api_server)
+ if (!runtime.use_api_server)
return;
UploadScoreToServerAsThread(nr, NULL);
void SaveServerScoreFromFile(int nr, char *score_tape_filename)
{
- if (!runtime.api_server)
+ if (!runtime.use_api_server)
return;
UploadScoreToServerAsThread(nr, score_tape_filename);
// restore last added local score entry (before merging server scores)
scores.last_added = scores.last_added_local = last_added_local;
- if (setup.api_server && !setup.only_show_local_scores)
+ if (setup.use_api_server && !setup.only_show_local_scores)
{
// load server scores from cache file and trigger update from server
LoadServerScore(nr, download_score);
},
{
TYPE_SWITCH,
- &setup.api_server, "api_server"
+ &setup.use_api_server, "use_api_server"
},
{
TYPE_STRING,
si->network_player_nr = 0; // first player
si->network_server_hostname = getStringCopy(STR_NETWORK_AUTO_DETECT);
- si->api_server = TRUE;
+ si->use_api_server = TRUE;
si->api_server_hostname = getStringCopy(API_SERVER_HOSTNAME);
si->api_server_password = getStringCopy(UNDEFINED_PASSWORD);
si->ask_for_uploading_tapes = TRUE;
global_setup_tokens[i].value == &setup.graphics_set ||
global_setup_tokens[i].value == &setup.volume_simple ||
global_setup_tokens[i].value == &setup.network_mode ||
- global_setup_tokens[i].value == &setup.api_server ||
+ global_setup_tokens[i].value == &setup.use_api_server ||
global_setup_tokens[i].value == &setup.touch.control_type ||
global_setup_tokens[i].value == &setup.touch.grid_xsize[0] ||
global_setup_tokens[i].value == &setup.touch.grid_xsize[1])
{ TYPE_PLAYER, &setup.network_player_nr,"Preferred Network Player:" },
{ TYPE_TEXT_INPUT, execGadgetNetworkServer, "Network Server Hostname:" },
{ TYPE_STRING, &network_server_text, "" },
- { TYPE_SWITCH, &setup.api_server, "Use Highscore Server:" },
+ { TYPE_SWITCH, &setup.use_api_server, "Use Highscore Server:" },
{ TYPE_SWITCH, &setup.only_show_local_scores, "Only Show Local Scores:" },
{ TYPE_ENTER_LIST, execOfferUploadTapes, "Upload All Tapes to Server" },
{ TYPE_SWITCH, &setup.multiple_users, "Multiple Users/Teams:" },
ToggleNetworkModeIfNeeded();
// API server mode may have changed at this point
- if (si->value == &setup.api_server)
- runtime.api_server = setup.api_server;
+ if (si->value == &setup.use_api_server)
+ runtime.use_api_server = setup.use_api_server;
// game speed list may have changed at this point
if (si->value == &setup.game_speed_extended)