mirror of https://github.com/stella-emu/stella.git
Fixed a few code warnings in the new jitter code.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3201 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
3c691a91ec
commit
92fcba53a5
|
@ -43,14 +43,13 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
|||
myNumRows(numrows),
|
||||
myPageSize(pagesize)
|
||||
{
|
||||
int xpos, ypos, lwidth;
|
||||
const int bwidth = lfont.getStringWidth("Compare "),
|
||||
bheight = myLineHeight + 2;
|
||||
|
||||
ypos = y + myLineHeight; lwidth = 4 * myFontWidth;
|
||||
int ypos = y + myLineHeight;
|
||||
|
||||
// Add RAM grid (with scrollbar)
|
||||
xpos = x + _font.getStringWidth("xxxx");
|
||||
int xpos = x + _font.getStringWidth("xxxx");
|
||||
myRamGrid = new DataGridWidget(_boss, _nfont, xpos, ypos,
|
||||
16, myNumRows, 2, 8, Common::Base::F_16, true);
|
||||
myRamGrid->setTarget(this);
|
||||
|
|
|
@ -667,26 +667,28 @@ inline void TIA::endFrame()
|
|||
// between the scanline counts of the prior two frames.
|
||||
myNextFrameJitter = myScanlineCountForLastFrame - previousCount;
|
||||
|
||||
if(myNextFrameJitter < 0)
|
||||
if(myNextFrameJitter < -1)
|
||||
{
|
||||
myNextFrameJitter = --myNextFrameJitter >> 1;
|
||||
myNextFrameJitter = (myNextFrameJitter-1) / 2;
|
||||
|
||||
// Make sure currentFrameBuffer() doesn't return a pointer that
|
||||
// results in memory being accessed outside of the 160*320 bytes
|
||||
// allocated for the frame buffer
|
||||
if(myNextFrameJitter < -myFrameYStart)
|
||||
if(myNextFrameJitter < -(Int32)(myFrameYStart))
|
||||
myNextFrameJitter = myFrameYStart;
|
||||
}
|
||||
else if(myNextFrameJitter > 0)
|
||||
else if(myNextFrameJitter > 1)
|
||||
{
|
||||
myNextFrameJitter = ++myNextFrameJitter >> 1;
|
||||
myNextFrameJitter = (myNextFrameJitter+1) / 2;
|
||||
|
||||
// Make sure currentFrameBuffer() doesn't return a pointer that
|
||||
// results in memory being accessed outside of the 160*320 bytes
|
||||
// allocated for the frame buffer
|
||||
if(myNextFrameJitter > 320 - myFrameYStart - myFrameHeight)
|
||||
if(myNextFrameJitter > 320 - (Int32)myFrameYStart - (Int32)myFrameHeight)
|
||||
myNextFrameJitter = 320 - myFrameYStart - myFrameHeight;
|
||||
}
|
||||
else
|
||||
myNextFrameJitter = 0;
|
||||
}
|
||||
|
||||
// Recalculate framerate. attempting to auto-correct for scanline 'jumps'
|
||||
|
|
Loading…
Reference in New Issue