(OSX) Add HAVE_LAKKA to OSX solution

This commit is contained in:
Twinaphex 2014-09-10 04:53:07 +02:00
parent 857457a615
commit 916367e686
5 changed files with 55 additions and 44 deletions

View File

@ -352,6 +352,7 @@
"-DHAVE_COMPRESSION",
"-D_7ZIP_ST",
"-DHAVE_7ZIP",
"-DHAVE_LAKKA",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
@ -422,6 +423,7 @@
"-DHAVE_COMPRESSION",
"-DHAVE_7ZIP",
"-DHAVE_7ZIP",
"-DHAVE_LAKKA",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;

View File

@ -259,9 +259,9 @@ NSWindowDelegate>
else
{
char buffer[PATH_MAX];
const rarch_setting_t* setting_data, *setting;
setting_data = (const rarch_setting_t*)setting_data_get_list();
setting = (const rarch_setting_t*)&setting_data[[item intValue]];
rarch_setting_t* setting_data, *setting = NULL;
setting_data = (rarch_setting_t*)setting_data_get_list();
setting = (rarch_setting_t*)&setting_data[[item intValue]];
if ([[tableColumn identifier] isEqualToString:BOXSTRING("left")])
return BOXSTRING(setting->short_description);

View File

@ -45,7 +45,7 @@ static void lakka_switch_categories(void)
int i, j;
// translation
add_tween(DELAY, -menu_active_category * hspacing, &all_categories_x, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, -menu_active_category * hspacing, &all_categories_x, &inOutQuad, NULL);
// alpha tweening
for (i = 0; i < num_categories; i++)
@ -58,15 +58,15 @@ static void lakka_switch_categories(void)
ca = (i == menu_active_category) ? 1.0 : 0.5;
cz = (i == menu_active_category) ? c_active_zoom : c_passive_zoom;
add_tween(DELAY, ca, &category->alpha, &inOutQuad, NULL);
add_tween(DELAY, cz, &category->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, ca, &category->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, cz, &category->zoom, &inOutQuad, NULL);
for (j = 0; j < category->num_items; j++)
{
float ia = (i != menu_active_category ) ? 0 :
(j == category->active_item) ? 1.0 : 0.5;
add_tween(DELAY, ia, &category->items[j].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, ia, &category->items[j].alpha, &inOutQuad, NULL);
}
}
}
@ -90,9 +90,9 @@ static void lakka_switch_items(void)
(j < active_category->active_item) ? vspacing*(j - active_category->active_item + above_item_offset) :
vspacing*(j - active_category->active_item + under_item_offset);
add_tween(DELAY, ia, &active_item->alpha, &inOutQuad, NULL);
add_tween(DELAY, iz, &active_item->zoom, &inOutQuad, NULL);
add_tween(DELAY, iy, &active_item->y, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, ia, &active_item->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, iz, &active_item->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, iy, &active_item->y, &inOutQuad, NULL);
}
}
@ -111,24 +111,24 @@ static void lakka_switch_subitems(void)
if (k < item->active_subitem)
{
// Above items
add_tween(DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(DELAY, vspacing*(k - item->active_subitem + above_subitem_offset), &subitem->y, &inOutQuad, NULL);
add_tween(DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
/* Above items */
add_tween(LAKKA_DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, vspacing*(k - item->active_subitem + above_subitem_offset), &subitem->y, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
}
else if (k == item->active_subitem)
{
// Active item
add_tween(DELAY, 1.0, &subitem->alpha, &inOutQuad, NULL);
add_tween(DELAY, vspacing*active_item_factor, &subitem->y, &inOutQuad, NULL);
add_tween(DELAY, i_active_zoom, &subitem->zoom, &inOutQuad, NULL);
/* Active item */
add_tween(LAKKA_DELAY, 1.0, &subitem->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, vspacing*active_item_factor, &subitem->y, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, i_active_zoom, &subitem->zoom, &inOutQuad, NULL);
}
else if (k > item->active_subitem)
{
// Under items
add_tween(DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(DELAY, vspacing*(k - item->active_subitem + under_item_offset), &subitem->y, &inOutQuad, NULL);
add_tween(DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
/* Under items */
add_tween(LAKKA_DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, vspacing*(k - item->active_subitem + under_item_offset), &subitem->y, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
}
}
}
@ -174,8 +174,9 @@ static void lakka_reset_submenu(void)
static void lakka_open_submenu(void)
{
int i, j, k;
add_tween(DELAY, -hspacing * (menu_active_category+1), &all_categories_x, &inOutQuad, NULL);
add_tween(DELAY, 1.0, &arrow_alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, -hspacing * (menu_active_category+1), &all_categories_x, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &arrow_alpha, &inOutQuad, NULL);
// Reset contextual menu style
lakka_reset_submenu();
@ -188,10 +189,10 @@ static void lakka_open_submenu(void)
continue;
if (i != menu_active_category)
add_tween(DELAY, 0, &category->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0, &category->alpha, &inOutQuad, NULL);
else
{
add_tween(DELAY, 1.0, &category->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &category->alpha, &inOutQuad, NULL);
for (j = 0; j < category->num_items; j++)
{
@ -203,18 +204,18 @@ static void lakka_open_submenu(void)
if (k == category->items[j].active_subitem)
{
add_tween(DELAY, 1.0, &subitem->alpha, &inOutQuad, NULL);
add_tween(DELAY, i_active_zoom, &subitem->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &subitem->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, i_active_zoom, &subitem->zoom, &inOutQuad, NULL);
}
else
{
add_tween(DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0.5, &subitem->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, i_passive_zoom, &subitem->zoom, &inOutQuad, NULL);
}
}
}
else
add_tween(DELAY, 0, &category->items[j].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0, &category->items[j].alpha, &inOutQuad, NULL);
}
}
}
@ -223,8 +224,9 @@ static void lakka_open_submenu(void)
static void lakka_close_submenu(void)
{
int i, j, k;
add_tween(DELAY, -hspacing * menu_active_category, &all_categories_x, &inOutQuad, NULL);
add_tween(DELAY, 0.0, &arrow_alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, -hspacing * menu_active_category, &all_categories_x, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0.0, &arrow_alpha, &inOutQuad, NULL);
for (i = 0; i < num_categories; i++)
{
@ -235,29 +237,29 @@ static void lakka_close_submenu(void)
if (i == menu_active_category)
{
add_tween(DELAY, 1.0, &category->alpha, &inOutQuad, NULL);
add_tween(DELAY, c_active_zoom, &category->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &category->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, c_active_zoom, &category->zoom, &inOutQuad, NULL);
for (j = 0; j < category->num_items; j++)
{
if (j == category->active_item)
{
add_tween(DELAY, 1.0, &category->items[j].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &category->items[j].alpha, &inOutQuad, NULL);
for (k = 0; k < category->items[j].num_subitems; k++)
add_tween(DELAY, 0, &category->items[j].subitems[k].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0, &category->items[j].subitems[k].alpha, &inOutQuad, NULL);
}
else
add_tween(DELAY, 0.5, &category->items[j].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0.5, &category->items[j].alpha, &inOutQuad, NULL);
}
}
else
{
add_tween(DELAY, 0.5, &category->alpha, &inOutQuad, NULL);
add_tween(DELAY, c_passive_zoom, &category->zoom, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0.5, &category->alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, c_passive_zoom, &category->zoom, &inOutQuad, NULL);
for (j = 0; j < category->num_items; j++)
add_tween(DELAY, 0, &category->items[j].alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 0, &category->items[j].alpha, &inOutQuad, NULL);
}
}
}
@ -385,7 +387,7 @@ static int menu_lakka_iterate(unsigned action)
}
else if (depth == 0 && menu_active_category == 0 && active_category->active_item == active_category->num_items-1)
{
add_tween(DELAY, 1.0, &global_alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &global_alpha, &inOutQuad, NULL);
rarch_main_set_state(RARCH_ACTION_STATE_RUNNING_FINISHED);
return -1;
}

View File

@ -542,6 +542,8 @@ static void lakka_draw_items(int i)
menu_item_t *active_item = (menu_item_t*)
&active_category->items[active_category->active_item];
(void)active_item;
for(j = 0; j < category->num_items; j++)
{
menu_item_t *item = (menu_item_t*)&category->items[j];
@ -662,6 +664,8 @@ static void lakka_context_destroy(void *data)
int i, j, k;
gl_t *gl = (gl_t*)driver.video_data;
(void)gl;
for (i = 0; i < TEXTURE_LAST; i++)
glDeleteTextures(1, &textures[i].id);
@ -1076,7 +1080,7 @@ static int lakka_input_postprocess(uint64_t old_state)
}
if (! global_alpha)
add_tween(DELAY, 1.0, &global_alpha, &inOutQuad, NULL);
add_tween(LAKKA_DELAY, 1.0, &global_alpha, &inOutQuad, NULL);
return 0;
}

View File

@ -22,7 +22,10 @@
#include "../../../gfx/fonts/fonts.h"
#define THEME "monochrome" // flatui or monochrome themes are available
#define DELAY 0.02
#ifndef LAKKA_DELAY
#define LAKKA_DELAY 0.02
#endif
extern int depth;
extern int num_categories;