fix: MxPalette::SetSkyColor is 100% matching

This commit is contained in:
ktkaufman03 2023-07-05 18:02:54 -04:00
parent 149d0e4f9b
commit f63190e3d4
No known key found for this signature in database
GPG Key ID: 1E1BF4F2F99E03BB

View File

@ -431,16 +431,16 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries)
MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color)
{
MxResult status = 0;
LPDIRECTDRAWPALETTE palette = this->m_palette;
if ( palette )
if ( this->m_palette != NULL )
{
this->m_entries[141].peRed = p_sky_color->peRed;
this->m_entries[141].peGreen = p_sky_color->peGreen;
this->m_entries[141].peBlue = p_sky_color->peBlue;
this->m_skyColor = this->m_entries[141];
if ( palette->SetEntries(0, 141, 1, &this->m_skyColor) )
if ( this->m_palette->SetEntries(0, 141, 1, &this->m_skyColor) )
{
status = -1;
}
}
return status;
}