Remove menu_common_list.c - make menu_common_list_delete a static

function inside menu_list.c
This commit is contained in:
twinaphex 2015-05-19 22:43:07 +02:00
parent 23b2dc5c93
commit df2b80a14c
5 changed files with 24 additions and 79 deletions

View File

@ -337,7 +337,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/menu_input.o \
menu/menu.o \
menu/menu_entry.o \
menu/menu_common_list.o \
menu/menu_navigation.o \
menu/menu_setting.o \
menu/menu_database.o \

View File

@ -713,7 +713,6 @@ MENU
#include "../menu/menu_input.c"
#include "../menu/menu.c"
#include "../menu/menu_entry.c"
#include "../menu/menu_common_list.c"
#include "../menu/menu_setting.c"
#include "../menu/menu_list.c"
#include "../menu/menu_entries_cbs_ok.c"

View File

@ -1,43 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2015 - 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 "menu_common_list.h"
#include "menu.h"
#include "menu_entries_cbs.h"
void menu_common_list_delete(void *data, size_t idx,
size_t list_size)
{
menu_file_list_cbs_t *cbs = NULL;
file_list_t *list = (file_list_t*)data;
if (!list)
return;
cbs = (menu_file_list_cbs_t*)list->list[idx].actiondata;
if (cbs)
{
cbs->action_start = NULL;
cbs->action_ok = NULL;
cbs->action_cancel = NULL;
cbs->action_left = NULL;
cbs->action_right = NULL;
cbs->action_deferred_push = NULL;
free(list->list[idx].actiondata);
}
list->list[idx].actiondata = NULL;
}

View File

@ -1,33 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2015 - 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 MENU_COMMON_LIST_H__
#define MENU_COMMON_LIST_H__
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void menu_common_list_delete(void *data, size_t idx,
size_t list_size);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -20,7 +20,6 @@
#include "../driver.h"
#include "menu.h"
#include "menu_common_list.h"
#include "menu_entries_cbs.h"
#include "menu_list.h"
#include "menu_navigation.h"
@ -144,6 +143,30 @@ void menu_list_refresh(file_list_t *list)
menu_navigation_clear(nav, true);
}
static void menu_common_list_delete(void *data, size_t idx,
size_t list_size)
{
menu_file_list_cbs_t *cbs = NULL;
file_list_t *list = (file_list_t*)data;
if (!list)
return;
cbs = (menu_file_list_cbs_t*)list->list[idx].actiondata;
if (cbs)
{
cbs->action_start = NULL;
cbs->action_ok = NULL;
cbs->action_cancel = NULL;
cbs->action_left = NULL;
cbs->action_right = NULL;
cbs->action_deferred_push = NULL;
free(list->list[idx].actiondata);
}
list->list[idx].actiondata = NULL;
}
static void menu_list_destroy(file_list_t *list)
{
unsigned i;