Add new header file_ext.h - refactor out frontend_console.h

This commit is contained in:
twinaphex 2013-07-15 14:54:40 +02:00
parent 328ce6ad31
commit fe433b2322
8 changed files with 54 additions and 40 deletions

View File

@ -1,5 +1,6 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - 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-
@ -178,26 +179,6 @@ enum
#define DEFAULT_ASPECT_RATIO -1.0f
#endif
#ifdef HAVE_DYNAMIC
#ifdef _WIN32
#define EXT_EXECUTABLES "dll|DLL"
#elif defined(__APPLE__)
#define EXT_EXECUTABLES "dylib"
#else
#define EXT_EXECUTABLES "so|SO"
#endif
#else
#if defined(__CELLOS_LV2__)
#define EXT_EXECUTABLES "self|SELF|bin|BIN"
#elif defined(_XBOX1)
#define EXT_EXECUTABLES "xbe|XBE"
#elif defined(_XBOX360)
#define EXT_EXECUTABLES "xex|XEX"
#elif defined(GEKKO)
#define EXT_EXECUTABLES "dol|DOL"
#endif
#endif
////////////////
// Video
////////////////

View File

@ -16,6 +16,7 @@
#include "core_info.h"
#include "general.h"
#include "file.h"
#include "file_ext.h"
#include "config.def.h"
core_info_list_t *get_core_info_list(const char *modules_path)

48
file_ext.h Normal file
View File

@ -0,0 +1,48 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - 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/>.
*/
#ifndef _FILE_EXT_H
#define _FILE_EXT_H
#ifdef HAVE_DYNAMIC
#ifdef _WIN32
#define EXT_EXECUTABLES "dll|DLL"
#elif defined(__APPLE__)
#define EXT_EXECUTABLES "dylib"
#else
#define EXT_EXECUTABLES "so|SO"
#endif
#else
#if defined(__CELLOS_LV2__)
#define EXT_EXECUTABLES "self|SELF|bin|BIN"
#define SALAMANDER_FILE "EBOOT.BIN"
#define DEFAULT_EXE_EXT ".SELF"
#elif defined(_XBOX1)
#define EXT_EXECUTABLES "xbe|XBE"
#define SALAMANDER_FILE "default.xbe"
#define DEFAULT_EXE_EXT ".xbe"
#elif defined(_XBOX360)
#define EXT_EXECUTABLES "xex|XEX"
#define SALAMANDER_FILE "default.xex"
#define DEFAULT_EXE_EXT ".xex"
#elif defined(GEKKO)
#define EXT_EXECUTABLES "dol|DOL"
#define SALAMANDER_FILE "boot.dol"
#define DEFAULT_EXE_EXT ".dol"
#endif
#endif
#endif

View File

@ -52,10 +52,10 @@
#undef HAVE_MENU
#endif
#include "../file_ext.h"
#ifdef RARCH_CONSOLE
#include "../config.def.h"
#include "frontend_console.h"
default_paths_t default_paths;

View File

@ -1,18 +0,0 @@
#ifndef _FRONTEND_CONSOLE_H
#define _FRONTEND_CONSOLE_H
#ifdef GEKKO
#define SALAMANDER_FILE "boot.dol"
#define DEFAULT_EXE_EXT ".dol"
#elif defined(__CELLOS_LV2__)
#define SALAMANDER_FILE "EBOOT.BIN"
#define DEFAULT_EXE_EXT ".SELF"
#elif defined(_XBOX1)
#define SALAMANDER_FILE "default.xbe"
#define DEFAULT_EXE_EXT ".xbe"
#elif defined(_XBOX360)
#define SALAMANDER_FILE "default.xex"
#define DEFAULT_EXE_EXT ".xex"
#endif
#endif

View File

@ -19,7 +19,7 @@
#include <stddef.h>
#include <string.h>
#include "frontend_console.h"
#include "../file_ext.h"
#include "frontend_salamander.h"
#if defined(__CELLOS_LV2__)

View File

@ -24,6 +24,7 @@
#include "rgui.h"
#include "utils/file_list.h"
#include "../../general.h"
#include "../../file_ext.h"
#include "../../gfx/gfx_common.h"
#include "../../config.def.h"
#include "../../file.h"

View File

@ -32,6 +32,7 @@ static void rarch_console_exec(const char *path, bool should_load_game)
RARCH_LOG("Attempt to load executable: [%s].\n", path);
char spawn_data[256];
char game_path[256];
(void)game_path;
for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
spawn_data[i] = i & 0xff;