forked from mpc-hc/mpc-hc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLCDGfxColor.cpp
More file actions
94 lines (74 loc) · 2.52 KB
/
LCDGfxColor.cpp
File metadata and controls
94 lines (74 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//************************************************************************
// The Logitech LCD SDK, including all acompanying documentation,
// is protected by intellectual property laws. All use of the Logitech
// LCD SDK is subject to the License Agreement found in the
// "Logitech LCD SDK License Agreement" file and in the Reference Manual.
// All rights not expressly granted by Logitech are reserved.
//************************************************************************
//************************************************************************
//
// NOTE: This version of ColorLCDUI is pre-release and is subject to
// change.
//
// LCDGfxColor.cpp
//
//
// Logitech LCD SDK
//
// Copyright 2010 Logitech Inc.
//************************************************************************
#include "LCDUI.h"
//************************************************************************
//
// CLCDGfxColor::CLCDGfxColor
//
//************************************************************************
CLCDGfxColor::CLCDGfxColor(void)
{
m_pLCDScreen = (lgLcdBitmap *) &m_LCDScreen;
m_pLCDScreen->hdr.Format = LGLCD_BMP_FORMAT_QVGAx32;
}
//************************************************************************
//
// CLCDGfxColor::~CLCDGfxColor
//
//************************************************************************
CLCDGfxColor::~CLCDGfxColor(void)
{
}
//************************************************************************
//
// CLCDGfxColor::Initialize
//
//************************************************************************
HRESULT CLCDGfxColor::Initialize(void)
{
//reset everything
Shutdown();
m_nWidth = LGLCD_QVGA_BMP_WIDTH;
m_nHeight = LGLCD_QVGA_BMP_HEIGHT;
HRESULT hRes = CLCDGfxBase::Initialize();
if(FAILED(hRes))
{
return hRes;
}
hRes = CLCDGfxBase::CreateBitmap(32);
if(FAILED(hRes))
{
return hRes;
}
return S_OK;
}
//************************************************************************
//
// CLCDGfxColor::GetLCDScreen
//
//************************************************************************
lgLcdBitmap* CLCDGfxColor::GetLCDScreen(void)
{
LCDUIASSERT(m_pLCDScreen == (lgLcdBitmap *) &m_LCDScreen);
m_LCDScreen.hdr.Format = LGLCD_BMP_FORMAT_QVGAx32;
memcpy(m_LCDScreen.pixels, m_pBitmapBits, m_nWidth * m_nHeight * 4);
return m_pLCDScreen;
}
//** end of LCDGfxColor.cpp **********************************************