From a27f042731cfd7a02814baba6e0f7fbcbb264bbf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Aug 2016 19:10:31 +0200 Subject: [PATCH] Start preparing XMB for Vita --- Makefile.griffin | 5 +++++ config.def.h | 2 +- configuration.c | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile.griffin b/Makefile.griffin index d87c3733b5..ee917a6498 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -245,6 +245,7 @@ else ifeq ($(platform), vita) HAVE_NETWORKING := 1 HAVE_NETPLAY := 1 HAVE_OVERLAY := 1 + #HAVE_XMB := 1 RARCH_CONSOLE = 1 HAVE_THREADS := 1 endif @@ -355,6 +356,10 @@ endif CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL +ifeq ($(HAVE_XMB), 1) +CFLAGS += -DHAVE_XMB +endif + ifeq ($(HAVE_LANGEXTRA), 1) CFLAGS += -DHAVE_LANGEXTRA endif diff --git a/config.def.h b/config.def.h index febc768071..2731eef61f 100644 --- a/config.def.h +++ b/config.def.h @@ -545,7 +545,7 @@ static float menu_footer_opacity = 1.000; static float menu_header_opacity = 1.000; -#ifdef HAVE_MATERIALUI +#if defined(HAVE_MATERIALUI) || defined(HAVE_XMB) static unsigned menu_background_gradient = 4; #endif diff --git a/configuration.c b/configuration.c index 6aeb8c5106..bf6171feb2 100644 --- a/configuration.c +++ b/configuration.c @@ -494,7 +494,9 @@ static void config_set_defaults(void) settings->menu.xmb.theme = xmb_icon_theme; settings->menu.xmb.menu_color_theme = menu_background_gradient; settings->menu.xmb.shadows_enable = xmb_shadows_enable; +#ifdef HAVE_SHADERPIPELINE settings->menu.xmb.shader_pipeline = menu_shader_pipeline; +#endif settings->menu.xmb.show_settings = xmb_show_settings; #ifdef HAVE_IMAGEVIEWER settings->menu.xmb.show_images = xmb_show_images; @@ -1455,12 +1457,14 @@ static bool config_load_file(const char *path, bool set_defaults) #ifdef HAVE_MENU { "xmb_scale_factor", &settings->menu.xmb.scale_factor}, { "xmb_alpha_factor", &settings->menu.xmb.alpha_factor}, - { "xmb_theme", &settings->menu.xmb.theme}, #ifdef HAVE_XMB + { "xmb_theme", &settings->menu.xmb.theme}, { "xmb_menu_color_theme", &settings->menu.xmb.menu_color_theme}, #endif { "materialui_menu_color_theme", &settings->menu.materialui.menu_color_theme}, +#ifdef HAVE_SHADERPIPELINE { "menu_shader_pipeline", &settings->menu.xmb.shader_pipeline}, +#endif #endif { "audio_out_rate", &settings->audio.out_rate}, { "audio_block_frames", &settings->audio.block_frames}, @@ -2970,12 +2974,14 @@ bool config_save_file(const char *path) { "menu_thumbnails", settings->menu.thumbnails}, { "xmb_scale_factor", settings->menu.xmb.scale_factor}, { "xmb_alpha_factor", settings->menu.xmb.alpha_factor}, - { "xmb_theme", settings->menu.xmb.theme}, #ifdef HAVE_XMB + { "xmb_theme", settings->menu.xmb.theme}, { "xmb_menu_color_theme", settings->menu.xmb.menu_color_theme}, #endif { "materialui_menu_color_theme", settings->menu.materialui.menu_color_theme}, +#ifdef HAVE_SHADERPIPELINE { "menu_shader_pipeline", settings->menu.xmb.shader_pipeline}, +#endif #endif { "audio_out_rate", settings->audio.out_rate}, { "custom_viewport_width", settings->video_viewport_custom.width},