diff options
Diffstat (limited to 'backends/platform/n64/osys_n64_base.cpp')
-rw-r--r-- | backends/platform/n64/osys_n64_base.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index 5e4b84ba3f..06ff38e586 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -346,8 +346,7 @@ int16 OSystem_N64::getWidth() { } void OSystem_N64::setPalette(const byte *colors, uint start, uint num) { - for (int i = 0; i < num; ++i) { - uint8 c[4]; + for (uint i = 0; i < num; ++i) { _screenPalette[start + i] = colRGB888toBGR555(colors[2], colors[1], colors[0]); colors += 4; } @@ -413,7 +412,7 @@ void OSystem_N64::grabPalette(byte *colors, uint start, uint num) { } void OSystem_N64::setCursorPalette(const byte *colors, uint start, uint num) { - for (int i = 0; i < num; ++i) { + for (uint i = 0; i < num; ++i) { _cursorPalette[start + i] = colRGB888toBGR555(colors[2], colors[1], colors[0]); colors += 4; } @@ -878,6 +877,8 @@ FilesystemFactory *OSystem_N64::getFilesystemFactory() { } void OSystem_N64::setTimerCallback(TimerProc callback, int interval) { + assert (interval > 0); + if (callback != NULL) { _timerCallbackTimer = interval; _timerCallbackNext = getMillis() + interval; |