mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Split up cbs_select code to new file
This commit is contained in:
parent
33d5b4f779
commit
1df54e4410
@ -315,6 +315,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/menu_entries_cbs_ok.o \
|
||||
menu/menu_entries_cbs_cancel.o \
|
||||
menu/menu_entries_cbs_start.o \
|
||||
menu/menu_entries_cbs_select.o \
|
||||
menu/menu_entries_cbs_toggle.o \
|
||||
menu/menu_entries_cbs_deferred_push.o \
|
||||
menu/menu_entries_cbs_representation.o \
|
||||
|
@ -682,6 +682,7 @@ MENU
|
||||
#include "../menu/menu_entries_cbs_ok.c"
|
||||
#include "../menu/menu_entries_cbs_cancel.c"
|
||||
#include "../menu/menu_entries_cbs_start.c"
|
||||
#include "../menu/menu_entries_cbs_select.c"
|
||||
#include "../menu/menu_entries_cbs_toggle.c"
|
||||
#include "../menu/menu_entries_cbs_deferred_push.c"
|
||||
#include "../menu/menu_entries_cbs_representation.c"
|
||||
|
@ -225,27 +225,6 @@ static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int action_select_default(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_resolve();
|
||||
if (!menu)
|
||||
return 0;
|
||||
menu_list_push_stack(menu->menu_list, "", "info_screen",
|
||||
0, menu->navigation.selection_ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
||||
cbs->action_select = action_select_default;
|
||||
}
|
||||
|
||||
static void menu_entries_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
|
@ -38,6 +38,10 @@ void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
|
||||
void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
|
||||
void menu_entries_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
|
67
menu/menu_entries_cbs_select.c
Normal file
67
menu/menu_entries_cbs_select.c
Normal file
@ -0,0 +1,67 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* 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 <file/file_path.h>
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_setting.h"
|
||||
#include "menu_input.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_shader.h"
|
||||
#include "menu_navigation.h"
|
||||
|
||||
#include "../file_ext.h"
|
||||
#include "../file_extract.h"
|
||||
#include "../file_ops.h"
|
||||
#include "../config.def.h"
|
||||
#include "../cheats.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../performance.h"
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
#include "../net_http.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
#include "../database_info.h"
|
||||
#endif
|
||||
|
||||
#include "menu_database.h"
|
||||
|
||||
#include "../input/input_autodetect.h"
|
||||
#include "../input/input_remapping.h"
|
||||
|
||||
#include "../gfx/video_viewport.h"
|
||||
|
||||
static int action_select_default(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_resolve();
|
||||
if (!menu)
|
||||
return 0;
|
||||
menu_list_push_stack(menu->menu_list, "", "info_screen",
|
||||
0, menu->navigation.selection_ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
||||
cbs->action_select = action_select_default;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user