mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
Move db.handle to runloop_data.h
This commit is contained in:
parent
ba6c563b83
commit
e8691eb4d6
@ -223,8 +223,6 @@ typedef struct
|
||||
|
||||
content_playlist_t *db_playlist;
|
||||
char db_playlist_file[PATH_MAX_LENGTH];
|
||||
database_info_handle_t *db;
|
||||
|
||||
} menu_handle_t;
|
||||
|
||||
typedef struct menu_ctx_driver
|
||||
|
@ -103,11 +103,9 @@ static void data_runloop_iterate(bool is_thread, data_runloop_t *runloop)
|
||||
#ifdef HAVE_NETWORKING
|
||||
rarch_main_data_http_iterate (is_thread, runloop);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
rarch_main_data_db_iterate (is_thread, runloop);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -128,13 +126,10 @@ bool rarch_main_data_active(data_runloop_t *runloop)
|
||||
struct http_connection_t *http_conn = http ? http->connection.handle : NULL;
|
||||
#endif
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
#ifdef HAVE_MENU
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
database_info_handle_t *db = menu ? menu->db : NULL;
|
||||
database_info_handle_t *db = runloop ? runloop->db.handle : NULL;
|
||||
db_active = db && db->status != DATABASE_STATUS_NONE;
|
||||
active = active || db_active;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
overlay_active = driver && driver->overlay &&
|
||||
|
@ -23,6 +23,9 @@
|
||||
#ifdef HAVE_THREADS
|
||||
#include <rthreads/rthreads.h>
|
||||
#endif
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
#include "database_info.h"
|
||||
#endif
|
||||
#include "tasks/tasks.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -122,6 +125,7 @@ typedef struct nbio_handle
|
||||
|
||||
typedef struct db_handle
|
||||
{
|
||||
database_info_handle_t *handle;
|
||||
msg_queue_t *msg_queue;
|
||||
unsigned status;
|
||||
} db_handle_t;
|
||||
|
@ -17,15 +17,12 @@
|
||||
#include "../file_ext.h"
|
||||
#include "../file_ops.h"
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
#include "../general.h"
|
||||
#include "../runloop_data.h"
|
||||
#include "tasks.h"
|
||||
|
||||
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
#ifdef HAVE_MENU
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
static int zlib_compare_crc32(const char *name, const char *valid_exts,
|
||||
@ -123,10 +120,9 @@ static int database_info_iterate(database_info_handle_t *db)
|
||||
void rarch_main_data_db_iterate(bool is_thread, void *data)
|
||||
{
|
||||
data_runloop_t *runloop = (data_runloop_t*)data;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
database_info_handle_t *db = menu ? menu->db : NULL;
|
||||
database_info_handle_t *db = runloop ? runloop->db.handle : NULL;
|
||||
|
||||
if (!db || !menu || !runloop)
|
||||
if (!db || !runloop)
|
||||
return;
|
||||
|
||||
switch (db->status)
|
||||
@ -144,4 +140,3 @@ void rarch_main_data_db_iterate(bool is_thread, void *data)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user