Remove some fxo->need calls

This commit is contained in:
Eladash 2023-12-17 17:03:14 +02:00 committed by Elad Ashkenazi
parent 14c92efd38
commit edf74313ef
2 changed files with 4 additions and 4 deletions

View File

@ -1377,7 +1377,6 @@ error_code cellRecClose(s32 isDiscard)
cellRec.error("cellRecClose: Unexpected recording mode %s found while stopping video capture.", old_mode);
}
g_fxo->need<utils::video_provider>();
utils::video_provider& video_provider = g_fxo->get<utils::video_provider>();
if (!video_provider.set_video_sink(nullptr, recording_mode::cell))
@ -1465,7 +1464,6 @@ error_code cellRecStart()
// Setup a video sink if it is needed
if (rec.param.use_internal_video() || rec.param.use_internal_audio())
{
g_fxo->need<utils::video_provider>();
utils::video_provider& video_provider = g_fxo->get<utils::video_provider>();
if (rec.sink && !video_provider.set_video_sink(rec.sink, recording_mode::cell))

View File

@ -144,8 +144,10 @@ bool vfs::unmount(std::string_view vpath)
vfs_log.notice("About to unmount '%s'", vpath);
// Workaround
g_fxo->need<vfs_manager>();
if (!g_fxo->is_init<vfs_manager>())
{
return false;
}
auto& table = g_fxo->get<vfs_manager>();