mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
apple: small changes necessary to get ffmpeg record driver working (#17145)
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
This commit is contained in:
parent
b8b0de3716
commit
a51160a155
@ -71,10 +71,7 @@ const char* config_get_record_driver_options(void)
|
||||
return char_list_new_special(STRING_LIST_RECORD_DRIVERS, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* TODO/FIXME - not used apparently */
|
||||
static void find_record_driver(const char *prefix,
|
||||
bool verbosity_enabled)
|
||||
static void find_record_driver(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int i = (int)driver_find_index(
|
||||
@ -85,16 +82,16 @@ static void find_record_driver(const char *prefix,
|
||||
recording_state.driver = (const record_driver_t*)record_drivers[i];
|
||||
else
|
||||
{
|
||||
if (verbosity_enabled)
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
unsigned d;
|
||||
|
||||
RARCH_ERR("[Recording]: Couldn't find any %s named \"%s\".\n", prefix,
|
||||
RARCH_ERR("[Recording]: Couldn't find any record driver named \"%s\".\n",
|
||||
settings->arrays.record_driver);
|
||||
RARCH_LOG_OUTPUT("Available %ss are:\n", prefix);
|
||||
RARCH_LOG_OUTPUT("Available record drivers are:\n");
|
||||
for (d = 0; record_drivers[d]; d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", record_drivers[d].ident);
|
||||
RARCH_WARN("[Recording]: Going to default to first %s...\n", prefix);
|
||||
RARCH_LOG_OUTPUT("\t%s\n", record_drivers[d]->ident);
|
||||
RARCH_WARN("[Recording]: Going to default to first record driver...\n");
|
||||
}
|
||||
|
||||
recording_state.driver = (const record_driver_t*)record_drivers[0];
|
||||
@ -104,6 +101,8 @@ static void find_record_driver(const char *prefix,
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* TODO/FIXME - not used apparently */
|
||||
/**
|
||||
* ffemu_find_backend:
|
||||
* @ident : Identifier of driver to find.
|
||||
@ -149,26 +148,15 @@ static void recording_driver_free_state(void)
|
||||
*
|
||||
* @return true if successful, otherwise false.
|
||||
**/
|
||||
static bool record_driver_init_first(
|
||||
const record_driver_t **backend, void **data,
|
||||
static bool record_driver_init(
|
||||
const struct record_params *params)
|
||||
{
|
||||
unsigned i;
|
||||
find_record_driver();
|
||||
if (!recording_state.driver)
|
||||
return false;
|
||||
|
||||
for (i = 0; record_drivers[i]; i++)
|
||||
{
|
||||
void *handle = NULL;
|
||||
if (!record_drivers[i]->init)
|
||||
continue;
|
||||
if (!(handle = record_drivers[i]->init(params)))
|
||||
continue;
|
||||
|
||||
*backend = record_drivers[i];
|
||||
*data = handle;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
recording_state.data = recording_state.driver->init(params);
|
||||
return recording_state.data != NULL;
|
||||
}
|
||||
|
||||
bool recording_deinit(void)
|
||||
@ -286,6 +274,8 @@ bool recording_init(void)
|
||||
else
|
||||
{
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
if (!path_is_directory(recording_st->output_dir))
|
||||
path_mkdir(recording_st->output_dir);
|
||||
/* Fallback to core name if started without content */
|
||||
if (string_is_empty(game_name))
|
||||
game_name = runloop_st->system.info.library_name;
|
||||
@ -448,9 +438,7 @@ bool recording_init(void)
|
||||
params.fb_width, params.fb_height,
|
||||
(unsigned)params.pix_fmt);
|
||||
|
||||
if (!record_driver_init_first(
|
||||
&recording_state.driver,
|
||||
&recording_state.data, ¶ms))
|
||||
if (!record_driver_init(¶ms))
|
||||
{
|
||||
RARCH_ERR("[Recording]: %s\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_START_RECORDING));
|
||||
|
Loading…
Reference in New Issue
Block a user