View Single Post
Old 02-17-2010, 10:13 PM   #6
joelypolly
Member
joelypolly has a complete set of Star Wars action figures.joelypolly has a complete set of Star Wars action figures.joelypolly has a complete set of Star Wars action figures.joelypolly has a complete set of Star Wars action figures.
 
Posts: 22
Karma: 328
Join Date: Jul 2008
Device: iliad
Try this one

I looked at your other posts regarding this and you are using xepdmgr to manage screen updates. Wouldn't you be better of going directly to the driver to perform the update since for FBReader it will always be a full screen update?

Also I would just update in the .refreshWindow(); method instead of putting refresh code in the scroll action class. Hope this can help a bit.

Updated scrollingaction.cpp below
Code:
	if (view->typeId() == ZLTextView::TYPE_ID) {
		//if button press is forward and I have a page preloaded refresh the screen now
		if(myForward && preload)
		{
			FBReader::Instance().refreshWindow();	
		}
		
		//load the page regardless of forward or back press
		((ZLTextView&)*view).scrollPage(myForward, myTextScrollingMode, textOptionValue());
		
		//if back is clicked turn off preload
		if(!myForward)
		{
			//if a page is already preloaded we must go back one more page to get to the last page
			if(preload)
			{
				((ZLTextView&)*view).scrollPage(myForward, myTextScrollingMode, textOptionValue());
			}
			preload = false
		}
		//refresh if nothing has been preloaded
		if(!preload)
		{
			FBReader::Instance().refreshWindow();
			//preload next page
			((ZLTextView&)*view).scrollPage(myForward, myTextScrollingMode, textOptionValue());
			preload = true;
		}
		
	} else if (view->typeId() == ZLBlockTreeView::TYPE_ID) {
		((ZLBlockTreeView&)*view).scroll(myBlockScrollingMode, !myForward);
	}

Last edited by joelypolly; 02-17-2010 at 10:17 PM. Reason: spelling
joelypolly is offline   Reply With Quote