mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 22:20:31 +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.block_extract;
|
||||||
attr.i |= system->info.need_fullpath << 1;
|
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)
|
if (content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL)
|
||||||
&& settings->set_supports_no_game_enable)
|
&& 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:
|
case CONTENT_CTL_SET_DOES_NOT_NEED_CONTENT:
|
||||||
core_does_not_need_content = true;
|
core_does_not_need_content = true;
|
||||||
break;
|
break;
|
||||||
|
case CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT:
|
||||||
|
core_does_not_need_content = false;
|
||||||
|
break;
|
||||||
case CONTENT_CTL_GET_CRC:
|
case CONTENT_CTL_GET_CRC:
|
||||||
{
|
{
|
||||||
uint32_t **content_crc_ptr = (uint32_t**)data;
|
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_SET_DOES_NOT_NEED_CONTENT,
|
||||||
|
|
||||||
|
CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT,
|
||||||
|
|
||||||
/* Initializes and loads a content file for the currently
|
/* Initializes and loads a content file for the currently
|
||||||
* selected libretro core. */
|
* selected libretro core. */
|
||||||
CONTENT_CTL_INIT,
|
CONTENT_CTL_INIT,
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#include "cores/internal_cores.h"
|
#include "cores/internal_cores.h"
|
||||||
#include "frontend/frontend_driver.h"
|
#include "frontend/frontend_driver.h"
|
||||||
|
#include "content.h"
|
||||||
#include "retroarch.h"
|
#include "retroarch.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
@ -953,7 +954,11 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
|||||||
{
|
{
|
||||||
bool state = *(const bool*)data;
|
bool state = *(const bool*)data;
|
||||||
RARCH_LOG("Environ SET_SUPPORT_NO_GAME: %s.\n", state ? "yes" : "no");
|
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;
|
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_SYSTEM_INFO_GET, &system);
|
||||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
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];
|
char tmp[PATH_MAX_LENGTH];
|
||||||
struct retro_system_info *info = system ? &system->info : NULL;
|
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)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) || !info)
|
||||||
content_push_to_history_playlist(
|
content_push_to_history_playlist(
|
||||||
system->no_content || *tmp,
|
content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL) || *tmp,
|
||||||
*tmp ? tmp : NULL,
|
*tmp ? tmp : NULL,
|
||||||
info);
|
info);
|
||||||
}
|
}
|
||||||
|
1
system.h
1
system.h
@ -40,7 +40,6 @@ typedef struct rarch_system_info
|
|||||||
unsigned performance_level;
|
unsigned performance_level;
|
||||||
|
|
||||||
bool force_nonblock;
|
bool force_nonblock;
|
||||||
bool no_content;
|
|
||||||
|
|
||||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||||
char valid_extensions[PATH_MAX_LENGTH];
|
char valid_extensions[PATH_MAX_LENGTH];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user