mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1469 from dumganhar/gles20
fixed #1511: Changed '#if(WINVER >= 0x0601)' to '#if(_MSC_VER >= 1600)'.
This commit is contained in:
commit
1e45a72db0
|
@ -35,7 +35,7 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600) // Visual Studio 2010 or higher version.
|
||||
// Windows Touch define
|
||||
#define MOUSEEVENTF_FROMTOUCH 0xFF515700
|
||||
|
||||
|
@ -64,7 +64,7 @@ bool CheckTouchSupport()
|
|||
return (s_pfRegisterTouchWindowFunction && s_pfUnregisterTouchWindowFunction && s_pfGetMessageExtraInfoFunction && s_pfGetTouchInputInfoFunction && s_pfCloseTouchInputHandleFunction);
|
||||
}
|
||||
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
|
||||
static void SetupPixelFormat(HDC hDC)
|
||||
{
|
||||
|
@ -320,13 +320,13 @@ bool CCEGLView::Create()
|
|||
bRet = true;
|
||||
} while (0);
|
||||
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
m_bSupportTouch = CheckTouchSupport();
|
||||
if(m_bSupportTouch)
|
||||
{
|
||||
m_bSupportTouch = (s_pfRegisterTouchWindowFunction(m_hWnd, 0) != 0);
|
||||
}
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
@ -338,10 +338,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
switch (message)
|
||||
{
|
||||
case WM_LBUTTONDOWN:
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
// Don't process message generated by Windows Touch
|
||||
if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break;
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
|
||||
if (m_pDelegate && MK_LBUTTON == wParam)
|
||||
{
|
||||
|
@ -361,10 +361,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
// Don't process message generated by Windows Touch
|
||||
if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break;
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
if (MK_LBUTTON == wParam && m_bCaptured)
|
||||
{
|
||||
POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
|
||||
|
@ -377,10 +377,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
// Don't process message generated by Windows Touch
|
||||
if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break;
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
if (m_bCaptured)
|
||||
{
|
||||
POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
|
||||
|
@ -394,7 +394,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
m_bCaptured = false;
|
||||
}
|
||||
break;
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
case WM_TOUCH:
|
||||
{
|
||||
BOOL bHandled = FALSE;
|
||||
|
@ -436,7 +436,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
case WM_SIZE:
|
||||
switch (wParam)
|
||||
{
|
||||
|
@ -552,12 +552,12 @@ void CCEGLView::end()
|
|||
{
|
||||
if (m_hWnd)
|
||||
{
|
||||
#if(WINVER >= 0x0601)
|
||||
#if(_MSC_VER >= 1600)
|
||||
if(m_bSupportTouch)
|
||||
{
|
||||
s_pfUnregisterTouchWindowFunction(m_hWnd);
|
||||
}
|
||||
#endif /* #if(WINVER >= 0x0601) */
|
||||
#endif /* #if(_MSC_VER >= 1600) */
|
||||
DestroyWindow(m_hWnd);
|
||||
m_hWnd = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue