Cleanups/style nits

This commit is contained in:
LibretroAdmin 2025-01-17 20:06:25 +01:00
parent 69ceb95ddc
commit fce755127c
4 changed files with 11 additions and 9 deletions

View File

@ -238,7 +238,8 @@ static int libretrodb_find_index(libretrodb_t *db, const char *index_name,
"key_size", &idx->key_size,
"next", &idx->next,
"count", &idx->count,
NULL) < 0) {
NULL) < 0)
{
printf("Invalid index header\n");
break;
}
@ -309,13 +310,13 @@ int libretrodb_find_entry(libretrodb_t *db, const char *index_name,
rv = binsearch(buff, key, idx.count, (ssize_t)idx.key_size, &offset);
free(buff);
if (rv == 0) {
if (rv == 0)
{
filestream_seek(db->fd, (ssize_t)offset, RETRO_VFS_SEEK_POSITION_START);
rmsgpack_dom_read(db->fd, out);
return 0;
} else {
return -1;
}
return -1;
}
/**

View File

@ -513,7 +513,8 @@ static void state_manager_push_do(state_manager_t *state)
uint8_t *compressed;
const uint8_t *oldb, *newb;
size_t headpos, tailpos, remaining;
if (state->capacity < sizeof(size_t) + state->maxcompsize) {
if (state->capacity < sizeof(size_t) + state->maxcompsize)
{
RARCH_ERR("State capacity insufficient\n");
return;
}

View File

@ -911,10 +911,11 @@ static bool content_load_rastate1(unsigned char* input, size_t len)
input += CONTENT_ALIGN_SIZE(block_size);
}
if (!seen_core) {
if (!seen_core)
{
RARCH_LOG("[State] no core\n");
return false;
}
}
#ifdef HAVE_CHEEVOS
if (!seen_cheevos)

View File

@ -59,9 +59,8 @@ namespace
Windows::UI::Core::CoreWindow^ corewindow = Windows::UI::Core::CoreWindow::GetForCurrentThread();
while (!finished)
{
if (corewindow) {
if (corewindow)
corewindow->Dispatcher->ProcessEvents(Windows::UI::Core::CoreProcessEventsOption::ProcessAllIfPresent);
}
}
if (exception != nullptr)