50 lines
1.5 KiB
Mathematica
Raw Normal View History

/* RetroArch - A frontend for libretro.
2014-01-01 01:50:59 +01:00
* Copyright (C) 2013-2014 - Jason Fetters
* Copyright (C) 2011-2014 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* 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.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#import "RetroArch_Apple.h"
#include "../../frontend/frontend.h"
2014-02-11 19:03:38 +11:00
#include "../../file.h"
2014-08-09 10:25:33 +02:00
#include "../../general.h"
id<RetroArch_Platform> apple_platform;
void apple_rarch_exited(void);
2014-10-15 03:15:43 +02:00
2014-05-03 07:17:59 +02:00
void apple_rarch_exited(void)
{
2014-07-20 07:00:02 +02:00
[apple_platform unloadingCore];
}
void apple_run_core(int argc, char **argv)
{
static char config_path[PATH_MAX];
[apple_platform loadingCore:nil withFile:nil];
2014-07-24 03:42:03 +02:00
strlcpy(config_path, g_defaults.config_path, sizeof(config_path));
2014-07-24 03:42:03 +02:00
static const char* const argv_menu[] = { "retroarch", "-c", config_path, "--menu", 0 };
if (argc == 0)
argc = 4;
2014-07-24 03:42:03 +02:00
if (!argv)
argv = (char**)(argv_menu);
2014-07-24 03:42:03 +02:00
if (rarch_main(argc, argv))
2014-10-17 05:03:51 +02:00
apple_rarch_exited();
}