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;
|
content_playlist_t *db_playlist;
|
||||||
char db_playlist_file[PATH_MAX_LENGTH];
|
char db_playlist_file[PATH_MAX_LENGTH];
|
||||||
database_info_handle_t *db;
|
|
||||||
|
|
||||||
} menu_handle_t;
|
} menu_handle_t;
|
||||||
|
|
||||||
typedef struct menu_ctx_driver
|
typedef struct menu_ctx_driver
|
||||||
|
|
|
@ -103,11 +103,9 @@ static void data_runloop_iterate(bool is_thread, data_runloop_t *runloop)
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
rarch_main_data_http_iterate (is_thread, runloop);
|
rarch_main_data_http_iterate (is_thread, runloop);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_MENU
|
|
||||||
#ifdef HAVE_LIBRETRODB
|
#ifdef HAVE_LIBRETRODB
|
||||||
rarch_main_data_db_iterate (is_thread, runloop);
|
rarch_main_data_db_iterate (is_thread, runloop);
|
||||||
#endif
|
#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;
|
struct http_connection_t *http_conn = http ? http->connection.handle : NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBRETRODB
|
#ifdef HAVE_LIBRETRODB
|
||||||
#ifdef HAVE_MENU
|
database_info_handle_t *db = runloop ? runloop->db.handle : NULL;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
|
||||||
database_info_handle_t *db = menu ? menu->db : NULL;
|
|
||||||
db_active = db && db->status != DATABASE_STATUS_NONE;
|
db_active = db && db->status != DATABASE_STATUS_NONE;
|
||||||
active = active || db_active;
|
active = active || db_active;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
overlay_active = driver && driver->overlay &&
|
overlay_active = driver && driver->overlay &&
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
#include <rthreads/rthreads.h>
|
#include <rthreads/rthreads.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_LIBRETRODB
|
||||||
|
#include "database_info.h"
|
||||||
|
#endif
|
||||||
#include "tasks/tasks.h"
|
#include "tasks/tasks.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -122,6 +125,7 @@ typedef struct nbio_handle
|
||||||
|
|
||||||
typedef struct db_handle
|
typedef struct db_handle
|
||||||
{
|
{
|
||||||
|
database_info_handle_t *handle;
|
||||||
msg_queue_t *msg_queue;
|
msg_queue_t *msg_queue;
|
||||||
unsigned status;
|
unsigned status;
|
||||||
} db_handle_t;
|
} db_handle_t;
|
||||||
|
|
|
@ -17,15 +17,12 @@
|
||||||
#include "../file_ext.h"
|
#include "../file_ext.h"
|
||||||
#include "../file_ops.h"
|
#include "../file_ops.h"
|
||||||
|
|
||||||
#include "../menu/menu_driver.h"
|
|
||||||
|
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "../runloop_data.h"
|
#include "../runloop_data.h"
|
||||||
#include "tasks.h"
|
#include "tasks.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBRETRODB
|
#ifdef HAVE_LIBRETRODB
|
||||||
#ifdef HAVE_MENU
|
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
static int zlib_compare_crc32(const char *name, const char *valid_exts,
|
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)
|
void rarch_main_data_db_iterate(bool is_thread, void *data)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)data;
|
data_runloop_t *runloop = (data_runloop_t*)data;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
database_info_handle_t *db = runloop ? runloop->db.handle : NULL;
|
||||||
database_info_handle_t *db = menu ? menu->db : NULL;
|
|
||||||
|
|
||||||
if (!db || !menu || !runloop)
|
if (!db || !runloop)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (db->status)
|
switch (db->status)
|
||||||
|
@ -144,4 +140,3 @@ void rarch_main_data_db_iterate(bool is_thread, void *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in New Issue