(Apple) Implement environment_get in Apple frontend context driver

This commit is contained in:
twinaphex 2013-07-27 17:45:56 +02:00
parent e19d2320b2
commit 29b13676c5
2 changed files with 15 additions and 13 deletions

View File

@ -150,11 +150,8 @@ int rarch_main(int argc, char *argv[])
if (frontend_ctx && frontend_ctx->init)
frontend_ctx->init();
#if !defined(__APPLE__)
rarch_main_clear_state();
rarch_get_environment(argc, argv);
#endif
#if !defined(RARCH_CONSOLE)
#if defined(__APPLE__)
@ -176,13 +173,6 @@ int rarch_main(int argc, char *argv[])
#endif
#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();
if (frontend_ctx && frontend_ctx->process_args)

View File

@ -9,8 +9,7 @@
* 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
* 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/>.
*/
@ -82,8 +81,21 @@ static void system_shutdown(bool force)
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 = {
NULL, /* get_environment_settings */
environment_get, /* environment_get */
NULL, /* init */
NULL, /* deinit */
NULL, /* exitspawn */