diff --git a/360/main.c b/360/main.c
index c416fb9c39..dffd2137aa 100644
--- a/360/main.c
+++ b/360/main.c
@@ -25,7 +25,6 @@
#include "xdk360_video.h"
#include "../console/console_ext.h"
-#include "../console/main_wrap.h"
#include "../conf/config_file.h"
#include "../conf/config_file_macros.h"
#include "../file.h"
diff --git a/console/console_ext.c b/console/console_ext.c
index 747dbaa2ed..122b0e7ce4 100644
--- a/console/console_ext.c
+++ b/console/console_ext.c
@@ -24,7 +24,6 @@
#include "../libretro.h"
#include "../general.h"
#include "../compat/strl.h"
-#include "main_wrap.h"
#include "console_ext.h"
#include "../file.h"
@@ -201,48 +200,6 @@ int ssnes_extract_zipfile(const char *zip_path)
#endif
-int ssnes_main_init_wrap(const struct ssnes_main_wrap *args)
-{
- int argc = 0;
- char *argv[MAX_ARGS] = {NULL};
-
- argv[argc++] = strdup("ssnes");
-
- if (args->rom_path)
- argv[argc++] = strdup(args->rom_path);
-
- if (args->sram_path)
- {
- argv[argc++] = strdup("-s");
- argv[argc++] = strdup(args->sram_path);
- }
-
- if (args->state_path)
- {
- argv[argc++] = strdup("-S");
- argv[argc++] = strdup(args->state_path);
- }
-
- if (args->config_path)
- {
- argv[argc++] = strdup("-c");
- argv[argc++] = strdup(args->config_path);
- }
-
- if (args->verbose)
- argv[argc++] = strdup("-v");
-
- int ret = ssnes_main_init(argc, argv);
-
- char **tmp = argv;
- while (*tmp)
- {
- free(*tmp);
- tmp++;
- }
-
- return ret;
-}
/*============================================================
INPUT EXTENSIONS
@@ -657,6 +614,49 @@ void ssnes_startup (const char * config_path)
}
}
+int ssnes_main_init_wrap(const struct ssnes_main_wrap *args)
+{
+ int argc = 0;
+ char *argv[MAX_ARGS] = {NULL};
+
+ argv[argc++] = strdup("ssnes");
+
+ if (args->rom_path)
+ argv[argc++] = strdup(args->rom_path);
+
+ if (args->sram_path)
+ {
+ argv[argc++] = strdup("-s");
+ argv[argc++] = strdup(args->sram_path);
+ }
+
+ if (args->state_path)
+ {
+ argv[argc++] = strdup("-S");
+ argv[argc++] = strdup(args->state_path);
+ }
+
+ if (args->config_path)
+ {
+ argv[argc++] = strdup("-c");
+ argv[argc++] = strdup(args->config_path);
+ }
+
+ if (args->verbose)
+ argv[argc++] = strdup("-v");
+
+ int ret = ssnes_main_init(argc, argv);
+
+ char **tmp = argv;
+ while (*tmp)
+ {
+ free(*tmp);
+ tmp++;
+ }
+
+ return ret;
+}
+
#endif
#ifdef HAVE_SSNES_EXEC
diff --git a/console/console_ext.h b/console/console_ext.h
index bcf76500aa..1c5f7646c0 100644
--- a/console/console_ext.h
+++ b/console/console_ext.h
@@ -14,8 +14,8 @@
* If not, see .
*/
-#ifndef ROM_EXT_H__
-#define ROM_EXT_H__
+#ifndef CONSOLE_EXT_H__
+#define CONSOLE_EXT_H__
enum aspect_ratio
{
@@ -85,16 +85,27 @@ void ssnes_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t
bool ssnes_manage_libretro_core(const char *full_path, const char *path, const char *exe_ext);
#endif
-#endif
-
/*============================================================
SSNES
============================================================ */
#ifdef HAVE_SSNES_MAIN_WRAP
+
+struct ssnes_main_wrap
+{
+ const char *rom_path;
+ const char *sram_path;
+ const char *state_path;
+ const char *config_path;
+ bool verbose;
+};
+
+int ssnes_main_init_wrap(const struct ssnes_main_wrap *args);
void ssnes_startup (const char * config_path);
#endif
#ifdef HAVE_SSNES_EXEC
void ssnes_exec (void);
#endif
+
+#endif
diff --git a/console/main_wrap.h b/console/main_wrap.h
deleted file mode 100644
index 20efce3cd1..0000000000
--- a/console/main_wrap.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SSNES - A frontend for libretro.
- * Copyright (C) 2010-2012 - Hans-Kristian Arntzen
- * Copyright (C) 2011-2012 - Daniel De Matteis
- *
- * SSNES 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.
- *
- * SSNES 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 SSNES.
- * If not, see .
- */
-
-// Builds argc/argv and calls ssnes_main_init().
-
-#ifndef _SSNES_WRAP_H
-#define _SSNES_WRAP_H
-
-struct ssnes_main_wrap
-{
- const char *rom_path;
- const char *sram_path;
- const char *state_path;
- const char *config_path;
- bool verbose;
-};
-
-int ssnes_main_init_wrap(const struct ssnes_main_wrap *args);
-
-#endif
diff --git a/console/salamander/main.c b/console/salamander/main.c
index 63c703ddf0..69941c77a8 100644
--- a/console/salamander/main.c
+++ b/console/salamander/main.c
@@ -299,13 +299,13 @@ int main(int argc, char *argv[])
if(state.Gamepad.wButtons & XINPUT_GAMEPAD_Y)
{
- //override path, boot first XEX in cores directory
- SSNES_LOG("Fallback - Will boot first XEX in SSNES directory.\n");
+ //override path, boot first executable in cores directory
+ SSNES_LOG("Fallback - Will boot first executable in SSNES cores directory.\n");
find_and_set_first_file();
}
else
{
- //normal XEX loading path
+ //normal executable loading path
init_settings();
}
@@ -339,13 +339,13 @@ int main(int argc, char *argv[])
if(pad_data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE)
{
- //override path, boot first SELF in cores directory
- SSNES_LOG("Fallback - Will boot first SELF in SSNES cores/ directory.\n");
+ //override path, boot first executable in cores directory
+ SSNES_LOG("Fallback - Will boot first executable in SSNES cores/ directory.\n");
find_and_set_first_file();
}
else
{
- //normal SELF loading path
+ //normal executable loading path
init_settings();
}
@@ -372,7 +372,7 @@ int main(int argc, char *argv[])
if(ret < 0)
{
- SSNES_LOG("SELF file is not of NPDRM type, trying another approach to boot it...\n");
+ SSNES_LOG("Executable file is not of NPDRM type, trying another approach to boot it...\n");
sys_game_process_exitspawn2(libretro_path, NULL, NULL, NULL, 0, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
}
diff --git a/ps3/main.c b/ps3/main.c
index 96bc6e25f1..b98e1919bf 100644
--- a/ps3/main.c
+++ b/ps3/main.c
@@ -42,7 +42,6 @@
#include "ps3_video_psgl.h"
#include "../console/console_ext.h"
-#include "../console/main_wrap.h"
#include "../conf/config_file.h"
#include "../conf/config_file_macros.h"
#include "../general.h"