Skip to content

Commit ffe9e85

Browse files
author
龙虾机器人
committed
fix(vfs): add platform guards for VFS browser
- Add HAVE_VFS guard to menu_vfs_browser.h - Add HAVE_VFS guard to menu_vfs_browser.c - Move menu_vfs_browser.o to HAVE_VFS conditional in Makefile Fixes build on platforms without VFS support (3DS, Wii, PS2, etc.)
1 parent 35850dd commit ffe9e85

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

Makefile.common

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,11 @@ ifeq ($(HAVE_LIBRETRODB), 1)
588588

589589
ifeq ($(HAVE_MENU), 1)
590590
OBJ += menu/menu_explore.o \
591-
menu/menu_vfs_browser.o \
592591
tasks/task_menu_explore.o
593592
endif
593+
ifeq ($(HAVE_VFS), 1)
594+
OBJ += menu/menu_vfs_browser.o
595+
endif
594596
endif
595597

596598
ifeq ($(HAVE_BUILTINBEARSSL), 1)

menu/menu_vfs_browser.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16+
#if defined(HAVE_VFS) && !defined(__3DS__) && !defined(GEKKO) && !defined(PS2) && !defined(WIIU) && !defined(__DJGPP__) && !defined(WEBOS)
17+
1618
#include <stdio.h>
1719
#include <stdlib.h>
1820
#include <string.h>
@@ -404,3 +406,5 @@ enum vfs_scheme menu_vfs_browser_get_scheme(void)
404406
{
405407
return g_vfs_browser.scheme;
406408
}
409+
410+
#endif /* HAVE_VFS guard */

menu/menu_vfs_browser.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16+
#if defined(HAVE_VFS) && !defined(__3DS__) && !defined(GEKKO) && !defined(PS2) && !defined(WIIU) && !defined(__DJGPP__) && !defined(WEBOS)
17+
1618
#ifndef __MENU_VFS_BROWSER_H
1719
#define __MENU_VFS_BROWSER_H
1820

@@ -111,3 +113,5 @@ RETRO_END_DECLS
111113

112114
#endif /* __MENU_VFS_BROWSER_H */
113115

116+
#endif /* HAVE_VFS guard */
117+

0 commit comments

Comments
 (0)