Skip to content

Commit

Permalink
Merge pull request xbmc#23976 from thexai/fix-warnings
Browse files Browse the repository at this point in the history
Fix Visual Studio warnings
  • Loading branch information
thexai authored Oct 23, 2023
2 parents 5423d9b + 4127699 commit fa75603
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions xbmc/rendering/RenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ void CRenderSystemBase::ShowSplash(const std::string& message)
if (!m_splashImage)
{
m_splashImage = std::make_unique<CGUIImage>(
0, 0, 0, 0, CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth(),
CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight(),
0, 0, .0f, .0f,
static_cast<float>(CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth()),
static_cast<float>(CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight()),
CTextureInfo(CUtil::GetSplashPath()));
m_splashImage->SetAspectRatio(CAspectRatio::AR_SCALE);
}
Expand All @@ -90,7 +91,7 @@ void CRenderSystemBase::ShowSplash(const std::string& message)
{
auto messageFont = g_fontManager.LoadTTF("__splash__", "arial.ttf", 0xFFFFFFFF, 0, 20, FONT_STYLE_NORMAL, false, 1.0f, 1.0f, &res);
if (messageFont)
m_splashMessageLayout = std::make_unique<CGUITextLayout>(messageFont, true, 0);
m_splashMessageLayout = std::make_unique<CGUITextLayout>(messageFont, true, .0f);
}

if (m_splashMessageLayout)
Expand Down
9 changes: 5 additions & 4 deletions xbmc/windows/GUIWindowSplash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ void CGUIWindowSplash::OnInitWindow()
if (!CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_splashImage)
return;

m_image = std::make_unique<CGUIImage>(0, 0, 0, 0,
CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth(),
CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight(),
CTextureInfo(CUtil::GetSplashPath()));
m_image = std::make_unique<CGUIImage>(
0, 0, .0f, .0f,
static_cast<float>(CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth()),
static_cast<float>(CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight()),
CTextureInfo(CUtil::GetSplashPath()));
m_image->SetAspectRatio(CAspectRatio::AR_SCALE);
}

Expand Down

0 comments on commit fa75603

Please sign in to comment.