Cleaned out some SDL_net-related detritus

This allows the main executable to build without SDL_net as a dependency.
This commit is contained in:
Charles Dang 2016-06-06 05:56:24 +11:00
parent 71f1f4fade
commit 168313bed9
4 changed files with 1 additions and 66 deletions

View file

@ -128,20 +128,6 @@ version_table_manager::version_table_manager()
names[LIB_SDL_TTF] = "SDL_ttf";
//
// SDL_net
//
SDL_NET_VERSION(&sdl_version);
compiled[LIB_SDL_NET] = format_version(sdl_version);
sdl_rt_version = SDLNet_Linked_Version();
if(sdl_rt_version) {
linked[LIB_SDL_NET] = format_version(*sdl_rt_version);
}
names[LIB_SDL_NET] = "SDL_net";
//
// Boost
//

View file

@ -118,11 +118,6 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
preprocess_output_macros(),
preprocess_path(),
preprocess_target(),
proxy(false),
proxy_address(),
proxy_password(),
proxy_port(),
proxy_user(),
resolution(),
rng_seed(),
server(),
@ -417,16 +412,6 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
preprocess_input_macros = vm["preprocess-input-macros"].as<std::string>();
if (vm.count("preprocess-output-macros"))
preprocess_output_macros = vm["preprocess-output-macros"].as<std::string>();
if (vm.count("proxy"))
proxy = true;
if (vm.count("proxy-address"))
proxy_address = vm["proxy-address"].as<std::string>();
if (vm.count("proxy-password"))
proxy_password = vm["proxy-password"].as<std::string>();
if (vm.count("proxy-port"))
proxy_port = vm["proxy-port"].as<std::string>();
if (vm.count("proxy-user"))
proxy_user = vm["proxy-user"].as<std::string>();
if (vm.count("resolution"))
parse_resolution_(vm["resolution"].as<std::string>());
if (vm.count("rng-seed"))

View file

@ -156,16 +156,6 @@ public:
boost::optional<std::string> preprocess_path;
/// Target (output) path that was given to the --preprocess option.
boost::optional<std::string> preprocess_target;
/// True if --proxy was given on the command line. Enables proxy mode.
bool proxy;
/// Non-empty if --proxy-address was given on the command line.
boost::optional<std::string> proxy_address;
/// Non-empty if --proxy-password was given on the command line.
boost::optional<std::string> proxy_password;
/// Non-empty if --proxy-port was given on the command line.
boost::optional<std::string> proxy_port;
/// Non-empty if --proxy-user was given on the command line.
boost::optional<std::string> proxy_user;
/// Pair of AxB values specified after --resolution. Changes Wesnoth resolution.
boost::optional<boost::tuple<int,int> > resolution;
/// RNG seed specified by --rng-seed option. Initializes RNG with given seed.

View file

@ -44,7 +44,6 @@
#include "map/exception.hpp"
#include "game_initialization/multiplayer.hpp" // for start_client, etc
#include "game_initialization/create_engine.hpp"
#include "network.hpp"
#include "game_initialization/playcampaign.hpp" // for play_game, etc
#include "preferences.hpp" // for disable_preferences_save, etc
#include "savegame.hpp" // for clean_saves, etc
@ -214,31 +213,6 @@ game_launcher::game_launcher(const commandline_options& cmdline_opts, const char
no_music = true;
if (cmdline_opts_.nosound)
no_sound = true;
//These commented lines should be used to implement support of connection
//through a proxy via command line options.
//The ANA network module should implement these methods (while the SDL_net won't.)
if (cmdline_opts_.proxy)
network::enable_connection_through_proxy();
if (cmdline_opts_.proxy_address)
{
network::enable_connection_through_proxy();
network::set_proxy_address(*cmdline_opts_.proxy_address);
}
if (cmdline_opts_.proxy_password)
{
network::enable_connection_through_proxy();
network::set_proxy_password(*cmdline_opts_.proxy_password);
}
if (cmdline_opts_.proxy_port)
{
network::enable_connection_through_proxy();
network::set_proxy_port(*cmdline_opts_.proxy_port);
}
if (cmdline_opts_.proxy_user)
{
network::enable_connection_through_proxy();
network::set_proxy_user(*cmdline_opts_.proxy_user);
}
if (cmdline_opts_.resolution) {
const int xres = cmdline_opts_.resolution->get<0>();
const int yres = cmdline_opts_.resolution->get<1>();
@ -884,7 +858,7 @@ bool game_launcher::play_multiplayer()
} catch(game::mp_server_error&)
{
preferences::show_wesnothd_server_search(video());
try {
start_wesnothd();
} catch(game::mp_server_error&)