mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-16 06:41:30 +00:00
make blend50 portable
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1408 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
14ff55d13b
commit
3edc2bfdfa
@ -319,7 +319,12 @@ bool CGameListCtrl::MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem)
|
|||||||
|
|
||||||
wxColour blend50(const wxColour& c1, const wxColour& c2)
|
wxColour blend50(const wxColour& c1, const wxColour& c2)
|
||||||
{
|
{
|
||||||
return((((int)c1.GetPixel() & 0xFEFEFE) >> 1) + (((int)c2.GetPixel() & 0xFEFEFE) >> 1) + 0x010101);
|
unsigned char r,g,b,a;
|
||||||
|
r = c1.Red()/2 + c2.Red()/2;
|
||||||
|
g = c1.Green()/2 + c2.Green()/2;
|
||||||
|
b = c1.Blue()/2 + c2.Blue()/2;
|
||||||
|
a = c1.Alpha()/2 + c2.Alpha()/2;
|
||||||
|
return a << 24 | b << 16 | g << 8 | r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameListCtrl::SetBackgroundColor()
|
void CGameListCtrl::SetBackgroundColor()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user