Skip to content

Commit

Permalink
Disabled the splash screen in the Linux version (apparently video pla…
Browse files Browse the repository at this point in the history
…yback hasn't been implemented in DesktopGL)
  • Loading branch information
Regalis committed Feb 20, 2017
1 parent 0306c03 commit c29be78
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Subsurface/Source/GUI/LoadingScreen.cs
Expand Up @@ -21,12 +21,12 @@ class LoadingScreen
public Vector2 CenterPosition;

public Vector2 TitlePosition;

private float? loadState;

private float? loadState;
#if !LINUX
Video splashScreenVideo;
VideoPlayer videoPlayer;
#endif
public Vector2 TitleSize
{
get { return new Vector2(titleTexture.Width, titleTexture.Height); }
Expand Down Expand Up @@ -56,19 +56,23 @@ public bool DrawLoadingText

public LoadingScreen(GraphicsDevice graphics)
{
#if !LINUX

if (GameMain.Config.EnableSplashScreen)
{
try
{
splashScreenVideo = GameMain.Instance.Content.Load<Video>("utg_4");
}

catch (Exception e)
{
DebugConsole.ThrowError("Failed to load splashscreen", e);
GameMain.Config.EnableSplashScreen = false;
}
}
#endif


backgroundTexture = TextureLoader.FromFile("Content/UI/titleBackground.png");
monsterTexture = TextureLoader.FromFile("Content/UI/titleMonster.png");
Expand All @@ -82,6 +86,7 @@ public LoadingScreen(GraphicsDevice graphics)

public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics, float deltaTime)
{
#if !LINUX
if (GameMain.Config.EnableSplashScreen && splashScreenVideo != null)
{
try
Expand All @@ -96,6 +101,7 @@ public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics, float deltaTi
GameMain.Config.EnableSplashScreen = false;
}
}
#endif

drawn = true;

Expand Down Expand Up @@ -171,6 +177,7 @@ public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics, float deltaTi

}

#if !LINUX
private void DrawSplashScreen(SpriteBatch spriteBatch)
{
if (videoPlayer == null)
Expand Down Expand Up @@ -206,6 +213,7 @@ private void DrawSplashScreen(SpriteBatch spriteBatch)

}
}
#endif

bool drawn;
public IEnumerable<object> DoLoading(IEnumerable<object> loader)
Expand Down

0 comments on commit c29be78

Please sign in to comment.