2013-02-20 19:52:52 -05:00
|
|
|
/* 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
|
2013-02-20 19:52:52 -05:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
2013-02-06 09:54:15 -05:00
|
|
|
|
2013-06-11 06:07:09 -04:00
|
|
|
#include <string.h>
|
2013-04-04 07:54:33 +02:00
|
|
|
|
2013-07-06 18:24:25 -04:00
|
|
|
#import "RetroArch_Apple.h"
|
2013-12-28 21:08:30 +01:00
|
|
|
#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"
|
2013-02-10 19:32:22 -05:00
|
|
|
|
2013-07-07 17:50:17 -04:00
|
|
|
id<RetroArch_Platform> apple_platform;
|
2013-07-06 18:24:25 -04:00
|
|
|
|
2014-10-17 05:27:54 +02:00
|
|
|
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)
|
2013-12-24 14:21:57 -05:00
|
|
|
{
|
2014-07-20 07:00:02 +02:00
|
|
|
[apple_platform unloadingCore];
|
2013-12-24 14:21:57 -05:00
|
|
|
}
|
|
|
|
|
2014-10-17 02:57:02 +02:00
|
|
|
void apple_run_core(int argc, char **argv)
|
2013-07-06 18:24:25 -04:00
|
|
|
{
|
2014-10-17 02:57:02 +02:00
|
|
|
static char config_path[PATH_MAX];
|
2014-10-17 05:27:54 +02:00
|
|
|
[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-01-03 17:16:02 -05:00
|
|
|
|
2014-07-24 03:42:03 +02:00
|
|
|
static const char* const argv_menu[] = { "retroarch", "-c", config_path, "--menu", 0 };
|
|
|
|
|
|
|
|
if (argc == 0)
|
2014-10-17 02:57:02 +02:00
|
|
|
argc = 4;
|
2014-07-24 03:42:03 +02:00
|
|
|
if (!argv)
|
2014-10-17 02:57:02 +02:00
|
|
|
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();
|
2013-07-06 18:24:25 -04:00
|
|
|
}
|