mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Create menu_displaylist.c
This commit is contained in:
parent
297fc772c0
commit
78c55c55c5
@ -357,6 +357,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
|||||||
menu/menu_entries_cbs.o \
|
menu/menu_entries_cbs.o \
|
||||||
menu/menu_list.o \
|
menu/menu_list.o \
|
||||||
menu/menu_display.o \
|
menu/menu_display.o \
|
||||||
|
menu/menu_displaylist.o \
|
||||||
menu/menu_animation.o \
|
menu/menu_animation.o \
|
||||||
menu/drivers/null.o
|
menu/drivers/null.o
|
||||||
endif
|
endif
|
||||||
|
@ -732,6 +732,7 @@ MENU
|
|||||||
#include "../menu/menu_shader.c"
|
#include "../menu/menu_shader.c"
|
||||||
#include "../menu/menu_navigation.c"
|
#include "../menu/menu_navigation.c"
|
||||||
#include "../menu/menu_display.c"
|
#include "../menu/menu_display.c"
|
||||||
|
#include "../menu/menu_displaylist.c"
|
||||||
#include "../menu/menu_animation.c"
|
#include "../menu/menu_animation.c"
|
||||||
#include "../menu/menu_database.c"
|
#include "../menu/menu_database.c"
|
||||||
|
|
||||||
|
37
menu/menu_displaylist.c
Normal file
37
menu/menu_displaylist.c
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* 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 "menu.h"
|
||||||
|
#include "menu_display.h"
|
||||||
|
#include "menu_entries.h"
|
||||||
|
|
||||||
|
int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
||||||
|
{
|
||||||
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
int ret = menu_entries_deferred_push(list, menu_list);
|
||||||
|
|
||||||
|
menu->need_refresh = false;
|
||||||
|
|
||||||
|
if (ret == 0)
|
||||||
|
{
|
||||||
|
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
||||||
|
|
||||||
|
if (ui)
|
||||||
|
ui->notify_list_loaded(driver->ui_companion_data, list, menu_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
31
menu/menu_displaylist.h
Normal file
31
menu/menu_displaylist.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MENU_DISPLAYLIST_H
|
||||||
|
#define _MENU_DISPLAYLIST_H
|
||||||
|
|
||||||
|
#include "menu_list.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int menu_displaylist_push(file_list_t *list, file_list_t *menu_list);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "menu_displaylist.h"
|
||||||
#include "menu_entries_cbs.h"
|
#include "menu_entries_cbs.h"
|
||||||
#include "menu_setting.h"
|
#include "menu_setting.h"
|
||||||
#include "menu_entries.h"
|
#include "menu_entries.h"
|
||||||
@ -2090,7 +2091,7 @@ int deferred_push_content_list(void *data, void *userdata,
|
|||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return -1;
|
return -1;
|
||||||
return menu_entries_deferred_push((file_list_t*)data, menu->menu_list->selection_buf);
|
return menu_displaylist_push((file_list_t*)data, menu->menu_list->selection_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int deferred_push_database_manager_list(void *data, void *userdata,
|
static int deferred_push_database_manager_list(void *data, void *userdata,
|
||||||
|
@ -14,30 +14,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "menu_displaylist.h"
|
||||||
#include "menu_entries.h"
|
#include "menu_entries.h"
|
||||||
#include "menu_entries_cbs.h"
|
#include "menu_entries_cbs.h"
|
||||||
|
|
||||||
static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
return menu_displaylist_push(list, menu_list);
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
|
||||||
if (!menu)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
ret = menu_entries_deferred_push(list, menu_list);
|
|
||||||
|
|
||||||
menu->need_refresh = false;
|
|
||||||
|
|
||||||
if (ret == 0)
|
|
||||||
{
|
|
||||||
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
|
||||||
|
|
||||||
if (ui)
|
|
||||||
ui->notify_list_loaded(driver->ui_companion_data, list, menu_list);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_entries_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
|
void menu_entries_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user