ULTIMA4: Added frame delay

This commit is contained in:
Paul Gilbert
2020-04-09 18:00:54 -07:00
committed by Paul Gilbert
parent 66cde21d65
commit bea4cc4e4e
2 changed files with 6 additions and 1 deletions
@@ -333,6 +333,10 @@ void EventHandler::run() {
break;
}
// Brief delay
g_system->delayMillis(10);
// Check for frame expiry
uint32 time = g_system->getMillis();
if (time >= (_lastTickTime + FRAME_TIME)) {
_lastTickTime = time;
+2 -1
View File
@@ -106,10 +106,11 @@ void Screen::loadCursors() {
void Screen::setCursor(MouseCursor cursor) {
const Cursor *c = _cursors[cursor];
const uint TRANSPARENT = g_screen->format.RGBToColor(0x80, 0x80, 0x80);
if (c && cursor != _currentCursor) {
_currentCursor = cursor;
const uint TRANSPARENT = g_screen->format.RGBToColor(0x80, 0x80, 0x80);
CursorMan.replaceCursor(c->getPixels(), CURSOR_SIZE, CURSOR_SIZE,
c->_hotspot.x, c->_hotspot.y, TRANSPARENT, false, &g_screen->format);
}