Skip to content

Commit

Permalink
Merge branch 'BUG-3874-Skin_compatibility_check'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajp8164 committed Sep 19, 2012
2 parents edd3e75 + 8dc1ebb commit b37266a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 4 additions & 5 deletions mediaportal/MediaPortal.Application/MediaPortal.cs
Expand Up @@ -3891,20 +3891,19 @@ protected void CheckSkinVersion()
}

// Skin is incompatible, switch to default
_OutdatedSkinName = m_strSkin;
_OutdatedSkinName = GUIGraphicsContext.SkinName;
float screenHeight = GUIGraphicsContext.currentScreen.Bounds.Height;
float screenWidth = GUIGraphicsContext.currentScreen.Bounds.Width;
float screenRatio = (screenWidth / screenHeight);
m_strSkin = screenRatio > 1.5 ? "DefaultWide" : "Default";
Config.SkinName = m_strSkin;
GUIGraphicsContext.Skin = m_strSkin;
GUIGraphicsContext.Skin = screenRatio > 1.5 ? "DefaultWide" : "Default";
Config.SkinName = GUIGraphicsContext.SkinName;
SkinSettings.Load();

// Send a message that the skin has changed.
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SKIN_CHANGED, 0, 0, 0, 0, 0, null);
GUIGraphicsContext.SendMessage(msg);

Log.Info("Main: User skin is not compatable, using skin {0} with theme {1}", m_strSkin, GUIThemeManager.CurrentTheme);
Log.Info("Main: User skin is not compatible, using skin {0} with theme {1}", GUIGraphicsContext.SkinName, GUIThemeManager.CurrentTheme);
}


Expand Down
9 changes: 0 additions & 9 deletions mediaportal/MediaPortal.Application/d3dapp.cs
Expand Up @@ -55,7 +55,6 @@ namespace MediaPortal
public class D3DApp : MPForm
{
private const int MILLI_SECONDS_TIMER = 1;
protected string m_strSkin = "Default";
public static string _strSkinOverride = string.Empty;
protected string m_strLanguage = "english";

Expand Down Expand Up @@ -846,10 +845,6 @@ public void SwitchFullScreenOrWindowed(bool bWindowed)
GUIGraphicsContext.DX9Device.Reset(presentParams);
if (GUIGraphicsContext.IsDirectX9ExUsed() && !useEnhancedVideoRenderer)
{
if (!m_strSkin.Equals(GUIGraphicsContext.Skin))
{
m_strSkin = GUIGraphicsContext.Skin;
}
GUIFontManager.LoadFonts(GUIGraphicsContext.GetThemedSkinFile(@"\fonts.xml"));
GUIFontManager.InitializeDeviceObjects();
}
Expand Down Expand Up @@ -887,10 +882,6 @@ public void SwitchFullScreenOrWindowed(bool bWindowed)
GUIGraphicsContext.DX9Device.Reset(presentParams);
if (GUIGraphicsContext.IsDirectX9ExUsed() && !useEnhancedVideoRenderer)
{
if (!m_strSkin.Equals(GUIGraphicsContext.Skin))
{
m_strSkin = GUIGraphicsContext.Skin;
}
GUIFontManager.LoadFonts(GUIGraphicsContext.GetThemedSkinFile("fonts.xml"));
GUIFontManager.InitializeDeviceObjects();
}
Expand Down

0 comments on commit b37266a

Please sign in to comment.