diff --git a/source/director.cpp b/source/director.cpp index a6d4227..f5db1ab 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -64,6 +64,9 @@ Director::Director(int argc, char *argv[]) debug = new Debug(renderer, screen, asset); music = JA_LoadMusic(asset->get("title.ogg").c_str()); online = new Online(options); + + // Inicializa los servicios online + initOnline(); } Director::~Director() @@ -92,16 +95,14 @@ void Director::initOnline() { if (options->online.jailerID == "") { // Jailer ID no definido - options->online.enabled = false; } else { // Jailer ID iniciado - if (options->online.enabled) { // Establece el servidor y el puerto jscore::init(options->online.server, options->online.port); - + options->online.sessionEnabled = true; const std::string caption = options->online.jailerID + " IS LOGGED IN"; screen->showNotification(caption); if (options->console) @@ -1330,13 +1331,13 @@ bool Director::initSDL() else { // Crea un renderizador para la ventana. El vsync se activa en funcion de las opciones - //Uint32 flags = SDL_RENDERER_SOFTWARE; - //Uint32 flags = SDL_RENDERER_ACCELERATED; + // Uint32 flags = SDL_RENDERER_SOFTWARE; + // Uint32 flags = SDL_RENDERER_ACCELERATED; Uint32 flags = 0; if (options->vSync) - { - flags = flags | SDL_RENDERER_PRESENTVSYNC; - } + { + flags = flags | SDL_RENDERER_PRESENTVSYNC; + } renderer = SDL_CreateRenderer(window, -1, flags); if (renderer == nullptr)