Skip to content

Commit

Permalink
New menu driver : ozone (Nintendo Switch lookalike)
Browse files Browse the repository at this point in the history
  • Loading branch information
natinusala committed Oct 26, 2018
1 parent 20b9d12 commit 158ddc0
Show file tree
Hide file tree
Showing 17 changed files with 3,118 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include"
"${workspaceFolder}/libretro-common/include",
"${workspaceRoot}/libretro-common/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
Expand All @@ -51,7 +52,8 @@
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
"${workspaceRoot}"
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include"
],
"defines": [
"_DEBUG",
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"ios": "c",
"list": "c",
"input_driver.h": "c",
"video_driver.h": "c"
"video_driver.h": "c",
"menu_driver.h": "c",
"file_path.h": "c",
"unordered_map": "c",
"unordered_set": "c"
},
"C_Cpp.dimInactiveRegions": false,
}
11 changes: 11 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,17 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
ifeq ($(HAVE_STRIPES),)
HAVE_STRIPES = 1
endif

ifeq ($(HAVE_OZONE),)
HAVE_OZONE = 1
endif
else
HAVE_ZARCH ?= 0
HAVE_MATERIALUI ?= 0
#HAVE_NUKLEAR ?= 0
HAVE_XMB ?= 0
HAVE_STRIPES ?= 0
HAVE_OZONE ?= 0
endif

ifeq ($(HAVE_RGUI), 1)
Expand Down Expand Up @@ -714,6 +719,12 @@ ifeq ($(HAVE_XMB), 1)
HAVE_MENU_COMMON = 1
endif

ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone.o
DEFINES += -DHAVE_OZONE
HAVE_MENU_COMMON = 1
endif

ifeq ($(HAVE_STRIPES), 1)
OBJ += menu/drivers/stripes.o
DEFINES += -DHAVE_STRIPES
Expand Down
2 changes: 2 additions & 0 deletions Makefile.libnx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ifeq ($(HAVE_OPENGL), 1)

HAVE_ZARCH = 0
HAVE_XMB = 1
HAVE_OZONE = 0
HAVE_STRIPES = 0

HAVE_OVERLAY = 1
Expand All @@ -67,6 +68,7 @@ else
HAVE_ZARCH = 0
HAVE_MATERIALUI = 0
HAVE_XMB = 0
HAVE_OZONE = 0
HAVE_STRIPES = 0
endif

Expand Down
5 changes: 4 additions & 1 deletion cheevos-new/cheevos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,10 @@ static int cheevos_iterate(coro_t* coro)

{
settings_t *settings = config_get_ptr();
if (!string_is_equal(settings->arrays.menu_driver, "xmb") ||
if (!(
string_is_equal(settings->arrays.menu_driver, "xmb") ||
!string_is_equal(settings->arrays.menu_driver, "ozone")
) ||
!settings->bools.cheevos_badges_enable)
CORO_RET();
}
Expand Down
5 changes: 4 additions & 1 deletion cheevos/cheevos.c
Original file line number Diff line number Diff line change
Expand Up @@ -3229,7 +3229,10 @@ static int cheevos_iterate(coro_t *coro)

{
settings_t *settings = config_get_ptr();
if (!string_is_equal(settings->arrays.menu_driver, "xmb") ||
if (!(
string_is_equal(settings->arrays.menu_driver, "xmb") ||
!string_is_equal(settings->arrays.menu_driver, "ozone")
) ||
!settings->bools.cheevos_badges_enable)
CORO_RET();
}
Expand Down
5 changes: 5 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ enum menu_driver_enum
MENU_XMB,
MENU_STRIPES,
MENU_NUKLEAR,
MENU_OZONE,
MENU_NULL
};

Expand Down Expand Up @@ -534,6 +535,8 @@ static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL;
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI;
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_MATERIALUI;
#elif defined(HAVE_OZONE) && defined(HAVE_LIBNX)
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_OZONE;
#elif defined(HAVE_XMB) && !defined(_XBOX)
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XMB;
#elif defined(HAVE_RGUI)
Expand Down Expand Up @@ -1028,6 +1031,8 @@ const char *config_get_default_menu(void)
return "rgui";
case MENU_XUI:
return "xui";
case MENU_OZONE:
return "ozone";
case MENU_MATERIALUI:
return "glui";
case MENU_XMB:
Expand Down
3 changes: 3 additions & 0 deletions griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,9 @@ MENU
#ifdef HAVE_XMB
#include "../menu/drivers/xmb.c"
#endif
#ifdef HAVE_OZONE
#include "../menu/drivers/ozone.c"
#endif

#ifdef HAVE_STRIPES
#include "../menu/drivers/stripes.c"
Expand Down
8 changes: 0 additions & 8 deletions menu/drivers/materialui.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,6 @@ typedef struct materialui_handle

} materialui_handle_t;

static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
{
rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */
rgba[1] = rgba[5] = rgba[9] = rgba[13] = ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f); /* g */
rgba[2] = rgba[6] = rgba[10] = rgba[14] = ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f); /* b */
rgba[3] = rgba[7] = rgba[11] = rgba[15] = alpha;
}

static const char *materialui_texture_path(unsigned id)
{
switch (id)
Expand Down
Loading

0 comments on commit 158ddc0

Please sign in to comment.