Commit cef3565d authored by Fluorohydride's avatar Fluorohydride

remove files from irrlicht for compatibility issues. it is required to rebuild...

remove files from irrlicht for compatibility issues. it is required to rebuild irrlicht engine with pathed files to support unicode and ime input.
parent a9588d87
...@@ -31,27 +31,36 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -31,27 +31,36 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_JOIN_HOST: { case BUTTON_JOIN_HOST: {
// struct addrinfo hints, *servinfo; #if WINVER >= 0x0600
// memset(&hints, 0, sizeof(struct addrinfo)); struct addrinfo hints, *servinfo;
// hints.ai_family = AF_INET; /* Allow IPv4 or IPv6 */ memset(&hints, 0, sizeof(struct addrinfo));
// hints.ai_socktype = SOCK_STREAM; /* Datagram socket */ hints.ai_family = AF_INET; /* Allow IPv4 or IPv6 */
// hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ hints.ai_socktype = SOCK_STREAM; /* Datagram socket */
// hints.ai_protocol = 0; /* Any protocol */ hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */
// hints.ai_canonname = NULL; hints.ai_protocol = 0; /* Any protocol */
// hints.ai_addr = NULL; hints.ai_canonname = NULL;
// hints.ai_next = NULL; hints.ai_addr = NULL;
hints.ai_next = NULL;
int status; int status;
char hostname[100]; char hostname[100];
char ip[20]; char ip[20];
const wchar_t* pstr = mainGame->ebJoinIP->getText(); const wchar_t* pstr = mainGame->ebJoinIP->getText();
BufferIO::CopyWStr(pstr, hostname, 100); BufferIO::CopyWStr(pstr, hostname, 100);
// if ((status = getaddrinfo(hostname, NULL, &hints, &servinfo)) == -1) { if ((status = getaddrinfo(hostname, NULL, &hints, &servinfo)) == -1) {
// //fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status)); fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status));
// //error handling //error handling
BufferIO::CopyWStr(pstr, ip, 16); BufferIO::CopyWStr(pstr, ip, 16);
// } else } else
// inet_ntop(AF_INET, &(((struct sockaddr_in *)servinfo->ai_addr)->sin_addr), ip, 20); inet_ntop(AF_INET, &(((struct sockaddr_in *)servinfo->ai_addr)->sin_addr), ip, 20);
// freeaddrinfo(servinfo); freeaddrinfo(servinfo);
#else
int status;
char hostname[100];
char ip[20];
const wchar_t* pstr = mainGame->ebJoinIP->getText();
BufferIO::CopyWStr(pstr, hostname, 100);
BufferIO::CopyWStr(pstr, ip, 16);
#endif
unsigned int remote_addr = htonl(inet_addr(ip)); unsigned int remote_addr = htonl(inet_addr(ip));
unsigned int remote_port = _wtoi(mainGame->ebJoinPort->getText()); unsigned int remote_port = _wtoi(mainGame->ebJoinPort->getText());
BufferIO::CopyWStr(pstr, mainGame->gameConf.lastip, 20); BufferIO::CopyWStr(pstr, mainGame->gameConf.lastip, 20);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment