Some cleanups

This commit is contained in:
Twinaphex 2019-04-08 19:36:44 +02:00
parent 8d7a0117bc
commit d6dfa240c8
4 changed files with 9 additions and 10 deletions

View File

@ -393,11 +393,11 @@ void GONG_CORE_PREFIX(retro_init)(void)
else
GONG_CORE_PREFIX(log_cb) = NULL;
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned));
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned char));
game_buffer.width = WIDTH;
game_buffer.width = WIDTH;
game_buffer.height = HEIGHT;
game_buffer.pitch = WIDTH * sizeof(unsigned);
game_buffer.pitch = WIDTH * sizeof(unsigned);
game_buffer.memory = video_buf;
}

View File

@ -119,8 +119,8 @@ uint32_t file_crc32(uint32_t crc, const char *path)
for(i = 0; i < CRC32_MAX_MB; i++)
{
int nread = filestream_read(file, buf, CRC32_BUFFER_SIZE);
if (nread < 0)
int64_t nread = filestream_read(file, buf, CRC32_BUFFER_SIZE);
if (nread < 0)
goto error;
crc = encoding_crc32(crc, buf, nread);

View File

@ -4152,8 +4152,7 @@ static enum runloop_state runloop_check_state(
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!video_driver_has_widgets())
#endif
if (state_manager_check_rewind(BIT256_GET(current_input, RARCH_REWIND),
settings->uints.rewind_granularity, runloop_is_paused, s, sizeof(s), &t))
if (rewinding)
runloop_msg_queue_push(s, 0, t, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);

View File

@ -775,9 +775,9 @@ void runtime_log_convert_hms2usec(unsigned hours, unsigned minutes, unsigned sec
/* Convert from microseconds to hours, minutes, seconds */
void runtime_log_convert_usec2hms(retro_time_t usec, unsigned *hours, unsigned *minutes, unsigned *seconds)
{
*seconds = usec / 1000000;
*minutes = *seconds / 60;
*hours = *minutes / 60;
*seconds = usec / 1000000;
*minutes = *seconds / 60;
*hours = *minutes / 60;
*seconds -= *minutes * 60;
*minutes -= *hours * 60;