Do away with no_content member

This commit is contained in:
twinaphex 2016-03-02 06:20:36 +01:00
parent 50f0e19263
commit 75c05a5d7f
5 changed files with 14 additions and 5 deletions

View File

@ -1578,7 +1578,7 @@ static bool init_content_file_set_attribs(
attr.i = system->info.block_extract;
attr.i |= system->info.need_fullpath << 1;
attr.i |= (!system->no_content) << 2;
attr.i |= (!content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL)) << 2;
if (content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL)
&& settings->set_supports_no_game_enable)
@ -1684,6 +1684,9 @@ bool content_ctl(enum content_ctl_state state, void *data)
case CONTENT_CTL_SET_DOES_NOT_NEED_CONTENT:
core_does_not_need_content = true;
break;
case CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT:
core_does_not_need_content = false;
break;
case CONTENT_CTL_GET_CRC:
{
uint32_t **content_crc_ptr = (uint32_t**)data;

View File

@ -40,6 +40,8 @@ enum content_ctl_state
CONTENT_CTL_SET_DOES_NOT_NEED_CONTENT,
CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT,
/* Initializes and loads a content file for the currently
* selected libretro core. */
CONTENT_CTL_INIT,

View File

@ -40,6 +40,7 @@
#include "cores/internal_cores.h"
#include "frontend/frontend_driver.h"
#include "content.h"
#include "retroarch.h"
#include "configuration.h"
#include "general.h"
@ -953,7 +954,11 @@ bool rarch_environment_cb(unsigned cmd, void *data)
{
bool state = *(const bool*)data;
RARCH_LOG("Environ SET_SUPPORT_NO_GAME: %s.\n", state ? "yes" : "no");
system->no_content = state;
if (state)
content_ctl(CONTENT_CTL_SET_DOES_NOT_NEED_CONTENT, NULL);
else
content_ctl(CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT, NULL);
break;
}

View File

@ -133,7 +133,7 @@ int rarch_main(int argc, char *argv[], void *data)
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
if (content_ctl(CONTENT_CTL_IS_INITED, NULL) || system->no_content)
if (content_ctl(CONTENT_CTL_IS_INITED, NULL) || content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
{
char tmp[PATH_MAX_LENGTH];
struct retro_system_info *info = system ? &system->info : NULL;
@ -149,7 +149,7 @@ int rarch_main(int argc, char *argv[], void *data)
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) || !info)
content_push_to_history_playlist(
system->no_content || *tmp,
content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL) || *tmp,
*tmp ? tmp : NULL,
info);
}

View File

@ -40,7 +40,6 @@ typedef struct rarch_system_info
unsigned performance_level;
bool force_nonblock;
bool no_content;
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
char valid_extensions[PATH_MAX_LENGTH];