mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 21:40:02 +00:00
(Apple) Implement environment_get in Apple frontend context driver
This commit is contained in:
parent
e19d2320b2
commit
29b13676c5
@ -150,11 +150,8 @@ int rarch_main(int argc, char *argv[])
|
|||||||
if (frontend_ctx && frontend_ctx->init)
|
if (frontend_ctx && frontend_ctx->init)
|
||||||
frontend_ctx->init();
|
frontend_ctx->init();
|
||||||
|
|
||||||
#if !defined(__APPLE__)
|
|
||||||
rarch_main_clear_state();
|
rarch_main_clear_state();
|
||||||
rarch_get_environment(argc, argv);
|
rarch_get_environment(argc, argv);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(RARCH_CONSOLE)
|
#if !defined(RARCH_CONSOLE)
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
@ -176,13 +173,6 @@ int rarch_main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
#ifdef IOS
|
|
||||||
char* system_directory = ios_get_rarch_system_directory();
|
|
||||||
strlcpy(g_extern.savestate_dir, system_directory, sizeof(g_extern.savestate_dir));
|
|
||||||
strlcpy(g_extern.savefile_dir, system_directory, sizeof(g_extern.savefile_dir));
|
|
||||||
free(system_directory);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
menu_init();
|
menu_init();
|
||||||
|
|
||||||
if (frontend_ctx && frontend_ctx->process_args)
|
if (frontend_ctx && frontend_ctx->process_args)
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* PURPOSE. See the GNU General Public License for more details.
|
||||||
*
|
* * You should have received a copy of the GNU General Public License along with RetroArch.
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -82,8 +81,21 @@ static void system_shutdown(bool force)
|
|||||||
dispatch_async_f(dispatch_get_main_queue(), 0, apple_rarch_exited);
|
dispatch_async_f(dispatch_get_main_queue(), 0, apple_rarch_exited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void environment_get(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
|
||||||
|
#ifdef IOS
|
||||||
|
char* system_directory = ios_get_rarch_system_directory();
|
||||||
|
strlcpy(g_extern.savestate_dir, system_directory, sizeof(g_extern.savestate_dir));
|
||||||
|
strlcpy(g_extern.savefile_dir, system_directory, sizeof(g_extern.savefile_dir));
|
||||||
|
free(system_directory);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
const frontend_ctx_driver_t frontend_ctx_apple = {
|
const frontend_ctx_driver_t frontend_ctx_apple = {
|
||||||
NULL, /* get_environment_settings */
|
environment_get, /* environment_get */
|
||||||
NULL, /* init */
|
NULL, /* init */
|
||||||
NULL, /* deinit */
|
NULL, /* deinit */
|
||||||
NULL, /* exitspawn */
|
NULL, /* exitspawn */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user