mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Do away with no_content member
This commit is contained in:
parent
50f0e19263
commit
75c05a5d7f
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user