Allow setting hostname

This commit is contained in:
simon.kagstrom 2009-02-01 09:04:46 +00:00
parent 1a29531f81
commit c593cd43dd
3 changed files with 7 additions and 8 deletions

View File

@ -3,12 +3,8 @@
TODO: Multiple frodo versions, switch between TODO: Multiple frodo versions, switch between
TODO: D-pad less responsive in v6 than v5
TODO: Crash on + in "Other" menu TODO: Crash on + in "Other" menu
TODO: Fix two-controller issue
version 7: version 7:
* Allow binding 1 and other extra buttons to joystick directions * Allow binding 1 and other extra buttons to joystick directions
and fire and fire

View File

@ -25,7 +25,7 @@
#endif #endif
/* TODO: */ /* TODO: */
extern int fixme_tmp_network_client; extern char *fixme_tmp_network_client;
extern int fixme_tmp_network_server; extern int fixme_tmp_network_server;
@ -105,8 +105,11 @@ void C64::c64_ctor1(void)
if (fixme_tmp_network_server) if (fixme_tmp_network_server)
this->network_server = new NetworkServer(this->server_port); this->network_server = new NetworkServer(this->server_port);
if (fixme_tmp_network_client) if (fixme_tmp_network_client)
{
strcpy(this->server_hostname, fixme_tmp_network_client);
this->network_client = new NetworkClient(this->server_hostname, this->network_client = new NetworkClient(this->server_hostname,
this->server_port); this->server_port);
}
} }
void C64::c64_ctor2(void) void C64::c64_ctor2(void)

View File

@ -100,7 +100,7 @@ Frodo::Frodo()
/* /*
* Process command line arguments * Process command line arguments
*/ */
int fixme_tmp_network_client = 0; char *fixme_tmp_network_client = 0;
int fixme_tmp_network_server = 0; int fixme_tmp_network_server = 0;
void Frodo::ArgvReceived(int argc, char **argv) void Frodo::ArgvReceived(int argc, char **argv)
@ -108,9 +108,9 @@ void Frodo::ArgvReceived(int argc, char **argv)
if (argc == 2 && if (argc == 2 &&
strcmp(argv[1], "-s") == 0) strcmp(argv[1], "-s") == 0)
fixme_tmp_network_server = 1; fixme_tmp_network_server = 1;
if (argc == 2 && if (argc == 3 &&
strcmp(argv[1], "-c") == 0) strcmp(argv[1], "-c") == 0)
fixme_tmp_network_client = 1; fixme_tmp_network_client = argv[2];
} }