diff -r f992b027374b -r 3bd32eec3d57 sources/main.cpp --- a/sources/main.cpp Sun May 17 22:07:48 2015 +0300 +++ b/sources/main.cpp Wed May 27 21:15:52 2015 +0300 @@ -28,9 +28,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "main.h" + +#ifndef _WIN32 +# include +#else +# include +#endif + #include -#include -#include "main.h" #include "network/rconsession.h" #include "huffman.h" #include "interface.h" @@ -40,6 +46,19 @@ FUNCTION main (int argc, char* argv[]) -> int { +#ifdef _WIN32 + FreeConsole(); + + WSADATA wsaData; + int result = WSAStartup (MAKEWORD (2, 2), &wsaData); + + if (result != 0) + { + fprintf (stderr, "WSAStartup failed: %d\n", result); + return 1; + } +#endif + HUFFMAN_Construct(); if (argc != 1 and argc != 3)