diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 3aaa2485..7597228a 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -2775,6 +2775,7 @@ int glestMain(int argc, char** argv) { Properties::setApplicationPath(executable_path(argv[0])); Properties::setGameVersion(glestVersionString); +/* #if defined(WIN32) printf("Path [%s]\n",executable_path(argv[0]).c_str()); if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false && @@ -2848,19 +2849,18 @@ int glestMain(int argc, char** argv) { fclose(stdout); fclose(stderr); -/* - int myin = _dup(_fileno(stdin)); - int myout = _dup(_fileno(stdout)); - int myerr = _dup(_fileno(stderr)); + // int myin = _dup(_fileno(stdin)); + // int myout = _dup(_fileno(stdout)); + // int myerr = _dup(_fileno(stderr)); - fclose(stdin); - fclose(stdout); - fclose(stderr); + // fclose(stdin); + // fclose(stdout); + // fclose(stderr); + + // _dup2(myin,0); + // _dup2(myout,1); + // _dup2(myerr,2); - _dup2(myin,0); - _dup2(myout,1); - _dup2(myerr,2); -*/ //fcntl(fd, F_SETFD, FD_CLOEXEC); //fcntl(fd, F_SETFL, fcntl(fd, F_GETFD) | FD_CLOEXEC)); @@ -2879,6 +2879,7 @@ int glestMain(int argc, char** argv) { if(SystemFlags::VERBOSE_MODE_ENABLED) printf("*** VLC E [%s]\n",getenv("VLC_PLUGIN_PATH")); } #endif +*/ ServerSocket::setMaxPlayerCount(GameConstants::maxPlayers); diff --git a/source/shared_lib/sources/graphics/video_player.cpp b/source/shared_lib/sources/graphics/video_player.cpp index d7dc7c65..b01a6c0e 100644 --- a/source/shared_lib/sources/graphics/video_player.cpp +++ b/source/shared_lib/sources/graphics/video_player.cpp @@ -189,6 +189,7 @@ bool VideoPlayer::hasBackEndVideoPlayer() { return false; } void VideoPlayer::PlayVideo() { + //verboseEnabled = true; struct ctx ctx; ctx.width = width; ctx.height = height; @@ -206,8 +207,7 @@ void VideoPlayer::PlayVideo() { // } std::vector vlc_argv; - vlc_argv.push_back("-I"); - vlc_argv.push_back("dummy"); /* Don't use any interface */ + vlc_argv.push_back("--intf=dummy"); vlc_argv.push_back("--no-media-library"); vlc_argv.push_back("--ignore-config"); /* Don't use VLC's config */ vlc_argv.push_back("--no-xlib"); /* tell VLC to not use Xlib */ @@ -391,15 +391,17 @@ void VideoPlayer::PlayVideo() { } #endif + ctx.isPlaying = true; #if defined(LIBVLC_VERSION_PRE_2) && defined(LIBVLC_VERSION_PRE_1_1_13) int play_result = libvlc_media_player_play(mp,&ex); #else int play_result = libvlc_media_player_play(mp); #endif + //SDL_Delay(5); if(verboseEnabled) printf("In [%s] Line: %d, play_result [%d]\n",__FUNCTION__,__LINE__,play_result); - successLoadingVLC = true; + successLoadingVLC = (play_result == 0); } #endif