diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index 0e7b1c11b9..7cfd22c53a 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -61,10 +61,6 @@ default_paths_t default_paths; #include "../rarch_console_settings.c" -#ifdef HAVE_LIBRETRO_MANAGEMENT -#include "../rarch_console_libretro_mgmt.c" -#endif - #endif diff --git a/console/rarch_console.h b/console/rarch_console.h index 9358dbd9c6..e6bcc791c0 100644 --- a/console/rarch_console.h +++ b/console/rarch_console.h @@ -32,6 +32,17 @@ #define EXT_CGP_PRESETS "cgp|CGP" #define EXT_INPUT_PRESETS "cfg|CFG" +enum +{ + EXTERN_LAUNCHER_SALAMANDER, +#ifdef HAVE_MULTIMAN + EXTERN_LAUNCHER_MULTIMAN, +#endif +#ifdef GEKKO + EXTERN_LAUNCHER_CHANNEL, +#endif +}; + enum { MENU_ITEM_LOAD_STATE = 0, MENU_ITEM_SAVE_STATE, diff --git a/console/rarch_console_libretro_mgmt.c b/console/rarch_console_libretro_mgmt.c deleted file mode 100644 index 999a2078b3..0000000000 --- a/console/rarch_console_libretro_mgmt.c +++ /dev/null @@ -1,38 +0,0 @@ -/* 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 . - */ - -#include -#include "../boolean.h" -#include "../file.h" -#include "rarch_console.h" - -#include "rarch_console_libretro_mgmt.h" - -bool rarch_manage_libretro_extension_supported(const char *filename) -{ - bool ext_supported = false; - struct string_list *ext_list = NULL; - const char *file_ext = path_get_extension(filename); - const char *ext = rarch_console_get_rom_ext(); - - if (ext) - ext_list = string_split(ext, "|"); - - if (ext_list && string_list_find_elem(ext_list, file_ext)) - ext_supported = true; - - return ext_supported; -} diff --git a/console/rarch_console_libretro_mgmt.h b/console/rarch_console_libretro_mgmt.h deleted file mode 100644 index 7a25bcd1c9..0000000000 --- a/console/rarch_console_libretro_mgmt.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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 . - */ - -#ifndef LIBRETRO_MGMT_H__ -#define LIBRETRO_MGMT_H__ - -#include "../boolean.h" - -enum -{ - EXTERN_LAUNCHER_SALAMANDER, -#ifdef HAVE_MULTIMAN - EXTERN_LAUNCHER_MULTIMAN, -#endif -#ifdef GEKKO - EXTERN_LAUNCHER_CHANNEL, -#endif -}; - -bool rarch_manage_libretro_extension_supported(const char *filename); - -#endif diff --git a/console/rarch_console_rzlib.c b/console/rarch_console_rzlib.c index 1b06d3426e..fab1815beb 100644 --- a/console/rarch_console_rzlib.c +++ b/console/rarch_console_rzlib.c @@ -27,10 +27,6 @@ #include "../boolean.h" -#ifdef HAVE_LIBRETRO_MANAGEMENT -#include "rarch_console_libretro_mgmt.h" -#endif - #include "rarch_console_rzlib.h" static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir, char *slash, char *write_filename, size_t write_filename_size, unsigned extract_zip_mode) @@ -174,7 +170,16 @@ int rarch_extract_zipfile(const char *zip_path, char *first_file, size_t first_f { if(!found_first_file) { - found_first_file = rarch_manage_libretro_extension_supported(write_filename); + // is the extension of the file supported by the libretro core? + struct string_list *ext_list = NULL; + const char *file_ext = path_get_extension(write_filename); + const char *ext = rarch_console_get_rom_ext(); + + if (ext) + ext_list = string_split(ext, "|"); + + if (ext_list && string_list_find_elem(ext_list, file_ext)) + found_first_file = true; if(found_first_file) snprintf(first_file, first_file_size, write_filename); diff --git a/frontend/platform/platform_gx.c b/frontend/platform/platform_gx.c index 439ece205d..e10b380820 100644 --- a/frontend/platform/platform_gx.c +++ b/frontend/platform/platform_gx.c @@ -29,7 +29,6 @@ #endif #include "../../console/rarch_console.h" -#include "../../console/rarch_console_libretro_mgmt.h" #include "../../console/rarch_console_input.h" #include "../../console/rarch_console_settings.h" #include "../../file.h" diff --git a/frontend/platform/platform_ps3.c b/frontend/platform/platform_ps3.c index bc7404aa0d..b2262fb1e1 100644 --- a/frontend/platform/platform_ps3.c +++ b/frontend/platform/platform_ps3.c @@ -23,7 +23,6 @@ #include "../../console/rarch_console.h" -#include "../../console/rarch_console_libretro_mgmt.h" #include "../../console/rarch_console_config.h" #include "../../console/rarch_console_settings.h" #include "../../conf/config_file.h" diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index f90191f784..3194ef53a0 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -38,7 +38,6 @@ #endif #include "../../console/rarch_console.h" -#include "../../console/rarch_console_libretro_mgmt.h" #include "../../console/rarch_console_config.h" #include "../../conf/config_file.h" #include "../../conf/config_file_macros.h"