(PS3 RMenu) Fix PS3 build

This commit is contained in:
twinaphex 2013-11-04 20:33:49 +01:00
parent 0eea9eb6e9
commit 87ffd4eb06
3 changed files with 18 additions and 16 deletions

View File

@ -371,7 +371,7 @@ bool menu_replace_config(const char *path);
bool menu_save_new_config(void);
int rgui_settings_toggle_setting(rgui_handle_t *rgui, unsigned setting, unsigned action, unsigned menu_type);
int menu_set_settings(unsigned setting, unsigned action);
int menu_set_settings(void *data, unsigned setting, unsigned action);
void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w, unsigned type);
void menu_key_event(bool down, unsigned keycode, uint32_t character, uint16_t key_modifiers);
@ -379,7 +379,7 @@ void menu_populate_entries(void *data, unsigned menu_type);
unsigned menu_type_is(unsigned type);
#ifdef HAVE_RMENU
void rgui_init_textures(void);
void rgui_init_textures(void *data);
#endif
#ifdef __cplusplus

View File

@ -167,7 +167,7 @@ static int shader_manager_toggle_setting(rgui_handle_t *rgui, unsigned setting,
}
}
else if (setting == RGUI_SETTINGS_SHADER_APPLY || setting == RGUI_SETTINGS_SHADER_PASSES)
return menu_set_settings(setting, action);
return menu_set_settings(rgui, setting, action);
else if ((dist_shader % 3) == 0 || setting == RGUI_SETTINGS_SHADER_PRESET)
{
dist_shader /= 3;
@ -279,11 +279,12 @@ int rgui_settings_toggle_setting(rgui_handle_t *rgui, unsigned setting, rgui_act
if (setting >= RGUI_SETTINGS_CORE_OPTION_START)
return rgui_core_setting_toggle(setting, action);
return menu_set_settings(setting, action);
return menu_set_settings(rgui, setting, action);
}
int menu_set_settings(unsigned setting, unsigned action)
int menu_set_settings(void *data, unsigned setting, unsigned action)
{
rgui_handle_t *rgui = (rgui_handle_t*)data;
unsigned port = rgui->current_pad;
switch (setting)
@ -938,7 +939,7 @@ int menu_set_settings(unsigned setting, unsigned action)
}
driver.video->restart();
#ifdef HAVE_RMENU
rgui_init_textures();
rgui_init_textures(rgui);
#endif
}
break;

View File

@ -1291,8 +1291,9 @@ static bool osk_callback_enter_filename_init(void *data)
#endif
#endif
void rgui_init_textures(void)
void rgui_init_textures(void *data)
{
rgui_handle_t *rgui = (rgui_handle_t*)data;
#ifdef HAVE_MENU_PANEL
texture_image_load("D:\\Media\\menuMainRomSelectPanel.png", menu_panel);
#endif
@ -1303,9 +1304,10 @@ void rgui_init_textures(void)
rmenu_set_texture(rgui, true);
}
static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t action_ori)
static int set_setting_action(void *data, uint8_t menu_type, unsigned switchvalue, uint64_t action_ori)
{
unsigned action = (unsigned)action_ori;
rgui_handle_t *rgui = (rgui_handle_t*)data;
switch (switchvalue)
{
@ -1334,7 +1336,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
#ifdef __CELLOS_LV2__
case SETTING_CHANGE_RESOLUTION:
#endif
return menu_set_settings(settings_lut[switchvalue], action);
return menu_set_settings(rgui, settings_lut[switchvalue], action);
#ifdef __CELLOS_LV2__
case SETTING_PAL60_MODE:
switch (action)
@ -1354,7 +1356,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
}
driver.video->restart();
rgui_init_textures();
rgui_init_textures(rgui);
}
break;
case RGUI_ACTION_START:
@ -1363,7 +1365,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
driver.video->restart();
rgui_init_textures();
rgui_init_textures(rgui);
}
break;
}
@ -1437,7 +1439,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
settings_set(1ULL << S_TRIPLE_BUFFERING);
driver.video->restart();
rgui_init_textures();
rgui_init_textures(rgui);
break;
case RGUI_ACTION_START:
settings_set(1ULL << S_DEF_TRIPLE_BUFFERING);
@ -1445,7 +1447,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE)))
{
driver.video->restart();
rgui_init_textures();
rgui_init_textures(rgui);
}
break;
}
@ -1960,7 +1962,7 @@ static int select_setting(void *data, uint64_t action)
case RGUI_ACTION_LEFT:
case RGUI_ACTION_RIGHT:
case RGUI_ACTION_OK:
ret = set_setting_action(rgui->menu_type, rgui->selection_ptr, action);
ret = set_setting_action(data, rgui->menu_type, rgui->selection_ptr, action);
break;
}
@ -2239,8 +2241,7 @@ static void* rmenu_init(void)
menu_panel = (struct texture_image*)calloc(1, sizeof(*menu_panel));
#endif
rgui_init_textures();
rgui_init_textures(rgui);
#ifdef HAVE_OSKUTIL
oskutil_params *osk = &rgui->oskutil_handle;