static gpointer
S9xNetplayServerThread (gpointer)
{
    S9xNPStartServer (gui_config->netplay_default_port);

    return NULL;
}
Beispiel #2
0
int main(int argc, char** argv)
{
	if (argc < 3)
	{
		printf("s9xserver - Usage: s9xserver <port> <ROMName> [frametime] [romfilename] [freezefile]\n");
		exit(1);
	}
	strncpy(NPServer.ROMName, argv[2], 30);
	NPServer.SyncByReset=FALSE;
	if (argc > 3)
		Settings.FrameTime=atoi(argv[3]);
	Memory.SRAMSize = 0;

	if (!S9xNPStartServer (atoi(argv[1])))
	{
		printf("Server startup failed.\n");
		exit(1);
	}
	printf("Server exited successfully.\n");
}
Beispiel #3
0
int main(int argc, char** argv)
{
	if (argc < 4)
	{
		fprintf(stderr, "s9xserver - Usage: s9xserver <port> <ROMName> <frametime> [freezefile]\n");
		fprintf(stderr, "  <frametime> = 20000 (PAL)\n");
		fprintf(stderr, "  <frametime> = 16667 (NTSC)\n");
		fprintf(stderr, "\n");
		fprintf(stderr, "Note: ROMName needs to match those of the clients.\n");
		exit(1);
	}
	strncpy(NPServer.ROMName, argv[2], 30);

	Settings.FrameTime=atoi(argv[3]);
	Settings.NetPlay=Settings.NetPlayServer=TRUE;

	Memory.SRAMSize = 0;

	if (argc > 4)
		freeze_file=argv[4];

	if (freeze_file)
	{
		NPServer.SyncByReset=FALSE;
		signal(SIGHUP, sighup_handler);
	}
	else
		NPServer.SyncByReset=TRUE;

	NPServer.SendROMImageOnConnect=FALSE;

	if (!S9xNPStartServer (atoi(argv[1])))
	{
		printf("Server startup failed.\n");
		exit(1);
	}
	printf("Server exited successfully.\n");
}