mirror of
https://github.com/libretro/RetroArch
synced 2025-03-24 22:43:41 +00:00
(Samples) tasks/database - should work again
This commit is contained in:
parent
9220248c32
commit
1a1418ccfb
14
playlist.c
14
playlist.c
@ -85,15 +85,17 @@ typedef int (playlist_sort_fun_t)(
|
|||||||
**/
|
**/
|
||||||
static bool playlist_path_equal(const char *real_path, const char *entry_path)
|
static bool playlist_path_equal(const char *real_path, const char *entry_path)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
bool real_path_is_compressed;
|
bool real_path_is_compressed;
|
||||||
bool entry_real_path_is_compressed;
|
bool entry_real_path_is_compressed;
|
||||||
char entry_real_path[PATH_MAX_LENGTH];
|
char entry_real_path[PATH_MAX_LENGTH];
|
||||||
|
#ifdef RARCH_INTERNAL
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
#endif
|
||||||
|
|
||||||
entry_real_path[0] = '\0';
|
entry_real_path[0] = '\0';
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if (string_is_empty(real_path) || string_is_empty(entry_path) || !settings)
|
if (string_is_empty(real_path) || string_is_empty(entry_path))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Get entry 'real' path */
|
/* Get entry 'real' path */
|
||||||
@ -113,9 +115,11 @@ static bool playlist_path_equal(const char *real_path, const char *entry_path)
|
|||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RARCH_INTERNAL
|
||||||
/* If fuzzy matching is disabled, we can give up now */
|
/* If fuzzy matching is disabled, we can give up now */
|
||||||
if (!settings->bools.playlist_fuzzy_archive_match)
|
if (!settings || !settings->bools.playlist_fuzzy_archive_match)
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If we reach this point, we have to work
|
/* If we reach this point, we have to work
|
||||||
* harder...
|
* harder...
|
||||||
@ -1114,7 +1118,9 @@ void playlist_write_file(playlist_t *playlist)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
RFILE *file = NULL;
|
RFILE *file = NULL;
|
||||||
|
#ifdef RARCH_INTERNAL
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!playlist || !playlist->modified)
|
if (!playlist || !playlist->modified)
|
||||||
return;
|
return;
|
||||||
@ -1128,6 +1134,7 @@ void playlist_write_file(playlist_t *playlist)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RARCH_INTERNAL
|
||||||
if (settings->bools.playlist_use_old_format)
|
if (settings->bools.playlist_use_old_format)
|
||||||
{
|
{
|
||||||
for (i = 0; i < playlist->size; i++)
|
for (i = 0; i < playlist->size; i++)
|
||||||
@ -1141,6 +1148,7 @@ void playlist_write_file(playlist_t *playlist)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
JSONContext context = {0};
|
JSONContext context = {0};
|
||||||
context.writer = JSON_Writer_Create(NULL);
|
context.writer = JSON_Writer_Create(NULL);
|
||||||
|
@ -90,6 +90,8 @@ SOURCES_C := \
|
|||||||
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
|
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
|
||||||
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
||||||
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
|
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
|
||||||
|
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax.c \
|
||||||
|
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.c \
|
||||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.c \
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.c \
|
||||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
||||||
$(LIBRETRO_COMM_DIR)/queues/task_queue.c \
|
$(LIBRETRO_COMM_DIR)/queues/task_queue.c \
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
#ifdef RARCH_INTERNAL
|
#ifdef RARCH_INTERNAL
|
||||||
#include "../configuration.h"
|
#include "../configuration.h"
|
||||||
#include "../retroarch.h"
|
#include "../retroarch.h"
|
||||||
|
#include "../ui/ui_companion_driver.h"
|
||||||
#endif
|
#endif
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
#include "../ui/ui_companion_driver.h"
|
|
||||||
#ifndef COLLECTION_SIZE
|
#ifndef COLLECTION_SIZE
|
||||||
#define COLLECTION_SIZE 99999
|
#define COLLECTION_SIZE 99999
|
||||||
#endif
|
#endif
|
||||||
@ -1314,10 +1314,10 @@ static void task_database_handler(retro_task_t *task)
|
|||||||
task_free_title(task);
|
task_free_title(task);
|
||||||
task_set_title(task, strdup(msg));
|
task_set_title(task, strdup(msg));
|
||||||
task_set_progress(task, 100);
|
task_set_progress(task, 100);
|
||||||
|
ui_companion_driver_notify_refresh();
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "msg: %s\n", msg);
|
fprintf(stderr, "msg: %s\n", msg);
|
||||||
#endif
|
#endif
|
||||||
ui_companion_driver_notify_refresh();
|
|
||||||
goto task_finished;
|
goto task_finished;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user