baseport/syborg/pointer/syborg_pointer.cpp
branchgraphics-phase-3
changeset 97 c7e943dbf70f
parent 75 bb16bb5b2818
equal deleted inserted replaced
77:b3dcdc7f8f12 97:c7e943dbf70f
   106   if(r != KErrNone)
   106   if(r != KErrNone)
   107 	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::Init3(): Kern::HalFunction(EDisplayHalCurrentModeInfo)=%d", r));
   107 	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::Init3(): Kern::HalFunction(EDisplayHalCurrentModeInfo)=%d", r));
   108 
   108 
   109   iScreenWidth  = videoInfo.iSizeInPixels.iWidth;
   109   iScreenWidth  = videoInfo.iSizeInPixels.iWidth;
   110   iScreenHeight = videoInfo.iSizeInPixels.iHeight;
   110   iScreenHeight = videoInfo.iSizeInPixels.iHeight;
       
   111   Kern::Printf("TPointerRv::Init3(): width: %d height: %d", iScreenWidth, iScreenHeight);
       
   112 
   111   iDisplayMode  = videoInfo.iDisplayMode;
   113   iDisplayMode  = videoInfo.iDisplayMode;
       
   114 
   112 
   115 
   113   iVideoMem = videoInfo.iVideoAddress + videoInfo.iOffsetToFirstPixel;
   116   iVideoMem = videoInfo.iVideoAddress + videoInfo.iOffsetToFirstPixel;
   114   iOffSetBetweenEachLine = iScreenWidth;
   117   iOffSetBetweenEachLine = iScreenWidth;
       
   118   Kern::Printf("TPointerRv::Init3(): iOffsetToFirstPixel: %d", iVideoMem);
   115 
   119 
   116   ix = iy = 0;
   120   ix = iy = 0;
   117 
   121 
   118   iXFactor = Fixed(iScreenWidth) / Fixed(0x6000);
   122   iXFactor = Fixed(iScreenWidth) / Fixed(0x6000);
   119   iYFactor = Fixed(iScreenHeight) / Fixed(0x8000);
   123   iYFactor = Fixed(iScreenHeight) / Fixed(0x8000);
   196 {
   200 {
   197 
   201 
   198 TUint32 *pMem =0;
   202 TUint32 *pMem =0;
   199 TInt k=0;
   203 TInt k=0;
   200 
   204 
       
   205 	TLinAddr activeFrameLin = ReadReg( KHwBaseClcd, 14 /*FB_VBASE*/ ); 
       
   206 	Kern::Printf("activeFrameLin: 0x%08x", activeFrameLin);
       
   207 	if( activeFrameLin == 0 )
       
   208 		{
       
   209 		return;
       
   210 		}
       
   211 
   201 	if(!iFirstTime)
   212 	if(!iFirstTime)
   202 	{
   213 	{
   203 
   214 
   204 	//restore old pointer position
   215 	//restore old pointer position
   205 	pMem = (TUint32 *)iVideoMem;
   216 	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
   206 
   217 
   207 	pMem+= iYtop* iOffSetBetweenEachLine;
   218 	pMem+= iYtop* iOffSetBetweenEachLine;
   208 	pMem+= iXleft;
   219 	pMem+= iXleft;
   209 
   220 
   210 
   221 
   244 	iYbottom = iy +5;
   255 	iYbottom = iy +5;
   245 
   256 
   246 	if(iYbottom> iScreenHeight)
   257 	if(iYbottom> iScreenHeight)
   247 		iYbottom=iScreenHeight;
   258 		iYbottom=iScreenHeight;
   248 
   259 
   249 	pMem = (TUint32 *)iVideoMem;
   260 	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
   250 	k=0;
   261 	k=0;
   251 
   262 
   252 	pMem+= iYtop* iOffSetBetweenEachLine;
   263 	pMem+= iYtop* iOffSetBetweenEachLine;
   253 	pMem+= iXleft;
   264 	pMem+= iXleft;
   254 
   265