mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Vita) silence some warnings
This commit is contained in:
parent
bb211b7621
commit
82fecdbc70
@ -10729,16 +10729,19 @@ static void vita2d_font_render_msg(void *data, const char *msg,
|
|||||||
x = params->x*width;
|
x = params->x*width;
|
||||||
y = (1-params->y)*height;//-(text_height/4);
|
y = (1-params->y)*height;//-(text_height/4);
|
||||||
color = params->color;
|
color = params->color;
|
||||||
if(params)
|
if(params)
|
||||||
switch (params->text_align)
|
switch (params->text_align)
|
||||||
{
|
{
|
||||||
case TEXT_ALIGN_RIGHT:
|
case TEXT_ALIGN_LEFT:
|
||||||
x -= vita2d_font_get_message_width(vita, msg, strlen(msg), scale);
|
/* TODO/FIXME - not implemented? */
|
||||||
break;
|
break;
|
||||||
case TEXT_ALIGN_CENTER:
|
case TEXT_ALIGN_RIGHT:
|
||||||
x -= vita2d_font_get_message_width(vita, msg, strlen(msg), scale) / 2.0;
|
x -= vita2d_font_get_message_width(vita, msg, strlen(msg), scale);
|
||||||
break;
|
break;
|
||||||
}
|
case TEXT_ALIGN_CENTER:
|
||||||
|
x -= vita2d_font_get_message_width(vita, msg, strlen(msg), scale) / 2.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -41,13 +41,11 @@ static const float vita2d_tex_coords[] = {
|
|||||||
|
|
||||||
static const float *menu_display_vita2d_get_default_vertices(void)
|
static const float *menu_display_vita2d_get_default_vertices(void)
|
||||||
{
|
{
|
||||||
//RARCH_LOG("DEFAULT VERTICES\n");
|
|
||||||
return &vita2d_vertexes[0];
|
return &vita2d_vertexes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static const float *menu_display_vita2d_get_default_tex_coords(void)
|
static const float *menu_display_vita2d_get_default_tex_coords(void)
|
||||||
{
|
{
|
||||||
//RARCH_LOG("DEFAULT TEX\n");
|
|
||||||
return &vita2d_tex_coords[0];
|
return &vita2d_tex_coords[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +59,7 @@ static void *menu_display_vita2d_get_default_mvp(void)
|
|||||||
return &vita2d->mvp_no_rot;
|
return &vita2d->mvp_no_rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static SceGxmPrimitiveType menu_display_prim_to_vita2d_enum(
|
static SceGxmPrimitiveType menu_display_prim_to_vita2d_enum(
|
||||||
enum menu_display_prim_type type)
|
enum menu_display_prim_type type)
|
||||||
{
|
{
|
||||||
@ -77,6 +76,7 @@ static SceGxmPrimitiveType menu_display_prim_to_vita2d_enum(
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void menu_display_vita2d_blend_begin(void)
|
static void menu_display_vita2d_blend_begin(void)
|
||||||
{
|
{
|
||||||
@ -96,21 +96,24 @@ static void menu_display_vita2d_viewport(void *data)
|
|||||||
if (!vita2d || !draw)
|
if (!vita2d || !draw)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//vita2d_texture_set_wvp(draw->x, draw->y, draw->width, draw->height);
|
#if 0
|
||||||
|
vita2d_texture_set_wvp(draw->x, draw->y, draw->width, draw->height);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void menu_display_vita2d_draw(void *data)
|
static void menu_display_vita2d_draw(void *data)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
unsigned i;
|
unsigned i;
|
||||||
struct vita2d_texture *texture = NULL;
|
#endif
|
||||||
const float *vertex = NULL;
|
|
||||||
const float *tex_coord = NULL;
|
|
||||||
const float *color = NULL;
|
|
||||||
unsigned int tex_width, tex_height;
|
unsigned int tex_width, tex_height;
|
||||||
|
struct vita2d_texture *texture = NULL;
|
||||||
vita_video_t *vita2d = (vita_video_t*)video_driver_get_ptr(false);
|
const float *vertex = NULL;
|
||||||
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
const float *tex_coord = NULL;
|
||||||
|
const float *color = NULL;
|
||||||
|
vita_video_t *vita2d = (vita_video_t*)video_driver_get_ptr(false);
|
||||||
|
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
|
||||||
|
|
||||||
if (!vita2d || !draw)
|
if (!vita2d || !draw)
|
||||||
return;
|
return;
|
||||||
@ -127,32 +130,36 @@ static void menu_display_vita2d_draw(void *data)
|
|||||||
if (!draw->coords->lut_tex_coord)
|
if (!draw->coords->lut_tex_coord)
|
||||||
draw->coords->lut_tex_coord = menu_display_vita2d_get_default_tex_coords();
|
draw->coords->lut_tex_coord = menu_display_vita2d_get_default_tex_coords();
|
||||||
if (!texture)
|
if (!texture)
|
||||||
return;//texture = &vk->display.blank_texture;*/
|
return;
|
||||||
|
#if 0
|
||||||
|
texture = &vk->display.blank_texture;*/
|
||||||
|
#endif
|
||||||
|
|
||||||
tex_width = vita2d_texture_get_width(texture);
|
tex_width = vita2d_texture_get_width(texture);
|
||||||
tex_height = vita2d_texture_get_height(texture);
|
tex_height = vita2d_texture_get_height(texture);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
vita2d_texture_set_program();
|
||||||
|
menu_display_vita2d_viewport(draw);
|
||||||
|
|
||||||
/*vita2d_texture_set_program();
|
RARCH_LOG("DRAW BG %d %d \n",draw->width,draw->height);
|
||||||
menu_display_vita2d_viewport(draw);
|
|
||||||
|
|
||||||
RARCH_LOG("DRAW BG %d %d \n",draw->width,draw->height);
|
vita2d_texture_vertex *pv = (vita2d_texture_vertex *)vita2d_pool_memalign(
|
||||||
|
draw->coords->vertices * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||||
|
sizeof(vita2d_texture_vertex));
|
||||||
|
|
||||||
vita2d_texture_vertex *pv = (vita2d_texture_vertex *)vita2d_pool_memalign(
|
for (i = 0; i < draw->coords->vertices; i++)
|
||||||
draw->coords->vertices * sizeof(vita2d_texture_vertex), // 4 vertices
|
{
|
||||||
sizeof(vita2d_texture_vertex));
|
pv[i].x = *vertex++;
|
||||||
|
pv[i].y = *vertex++; // Y-flip. Vulkan is top-left clip space
|
||||||
for (i = 0; i < draw->coords->vertices; i++)
|
pv[i].z = +0.5f;
|
||||||
{
|
pv[i].u = *tex_coord++;
|
||||||
pv[i].x = *vertex++;
|
pv[i].v = *tex_coord++;
|
||||||
pv[i].y = *vertex++; // Y-flip. Vulkan is top-left clip space
|
snprintf(msg, sizeof(msg), "%.2f %.2f %.2f %.2f %.2f\n",pv[i].x,pv[i].y,pv[i].z,pv[i].u,pv[i].v);
|
||||||
pv[i].z = +0.5f;
|
RARCH_LOG(msg);
|
||||||
pv[i].u = *tex_coord++;
|
RARCH_LOG("%x %x %x %x %x\n",pv[i].x,pv[i].y,pv[i].z,pv[i].u,pv[i].v);
|
||||||
pv[i].v = *tex_coord++;
|
}
|
||||||
snprintf(msg, sizeof(msg), "%.2f %.2f %.2f %.2f %.2f\n",pv[i].x,pv[i].y,pv[i].z,pv[i].u,pv[i].v);
|
#endif
|
||||||
RARCH_LOG(msg);
|
|
||||||
RARCH_LOG("%x %x %x %x %x\n",pv[i].x,pv[i].y,pv[i].z,pv[i].u,pv[i].v);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
switch (draw->pipeline.id)
|
switch (draw->pipeline.id)
|
||||||
{
|
{
|
||||||
@ -164,17 +171,23 @@ static void menu_display_vita2d_draw(void *data)
|
|||||||
int colorB = (int)((*color++)*255.f);
|
int colorB = (int)((*color++)*255.f);
|
||||||
int colorA = (int)((*color++)*255.f);
|
int colorA = (int)((*color++)*255.f);
|
||||||
|
|
||||||
//vita2d_texture_set_tint_color_uniform(RGBA8((int)((*color++)*255.f), (int)((*color++)*255.f), (int)((*color++)*255.f), (int)((*color++)*255.f)));
|
#if 0
|
||||||
//vita2d_texture_set_tint_color_uniform(RGBA8(0xFF, 0xFF, 0xFF, 0xAA));
|
vita2d_texture_set_tint_color_uniform(RGBA8((int)((*color++)*255.f), (int)((*color++)*255.f), (int)((*color++)*255.f), (int)((*color++)*255.f)));
|
||||||
//vita2d_draw_texture_part_generic(texture, menu_display_prim_to_vita2d_enum(
|
vita2d_texture_set_tint_color_uniform(RGBA8(0xFF, 0xFF, 0xFF, 0xAA));
|
||||||
//draw->prim_type), pv, draw->coords->vertices);
|
vita2d_draw_texture_part_generic(texture, menu_display_prim_to_vita2d_enum(
|
||||||
|
draw->prim_type), pv, draw->coords->vertices);
|
||||||
|
#endif
|
||||||
|
|
||||||
vita2d_draw_texture_tint_scale(texture, draw->x,
|
vita2d_draw_texture_tint_scale(texture, draw->x,
|
||||||
PSP_FB_HEIGHT-draw->y-draw->height,
|
PSP_FB_HEIGHT-draw->y-draw->height,
|
||||||
(float)draw->width/(float)tex_width,
|
(float)draw->width/(float)tex_width,
|
||||||
(float)draw->height/(float)tex_height,
|
(float)draw->height/(float)tex_height,
|
||||||
RGBA8(colorR,colorG,colorB,colorA));
|
RGBA8(colorR,colorG,colorB,colorA));
|
||||||
//if(texture)vita2d_draw_texture(NULL,0,0);
|
|
||||||
|
#if 0
|
||||||
|
if(texture)
|
||||||
|
vita2d_draw_texture(NULL,0,0);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,7 @@ static bool screenshot_dump(
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(VITA)
|
||||||
static bool take_screenshot_viewport(const char *global_name_base)
|
static bool take_screenshot_viewport(const char *global_name_base)
|
||||||
{
|
{
|
||||||
char screenshot_path[PATH_MAX_LENGTH] = {0};
|
char screenshot_path[PATH_MAX_LENGTH] = {0};
|
||||||
@ -188,6 +189,7 @@ done:
|
|||||||
free(buffer);
|
free(buffer);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool take_screenshot_raw(const char *global_name_base)
|
static bool take_screenshot_raw(const char *global_name_base)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user