mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(VITA) Temporal fix for clear screen
This commit is contained in:
parent
f1df24e065
commit
8e631df6c4
2
deps/libvita2d/include/vita2d.h
vendored
2
deps/libvita2d/include/vita2d.h
vendored
@ -54,6 +54,8 @@ void vita2d_end_drawing();
|
||||
int vita2d_common_dialog_update();
|
||||
|
||||
void vita2d_set_clear_color(unsigned int color);
|
||||
unsigned int vita2d_get_clear_color();
|
||||
|
||||
void vita2d_set_vblank_wait(int enable);
|
||||
void *vita2d_get_current_fb();
|
||||
|
||||
|
6
deps/libvita2d/source/vita2d.c
vendored
6
deps/libvita2d/source/vita2d.c
vendored
@ -56,6 +56,7 @@ static const SceGxmProgram *const textureTintFragmentProgramGxp = &texture_tint_
|
||||
|
||||
static int vita2d_initialized = 0;
|
||||
static float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
static unsigned int clear_color_u = 0xff000000;
|
||||
static int vblank_wait = 1;
|
||||
|
||||
static SceUID vdmRingBufferUid;
|
||||
@ -765,6 +766,11 @@ void vita2d_set_clear_color(unsigned int color)
|
||||
clear_color[1] = ((color >> 8*1) & 0xFF)/255.0f;
|
||||
clear_color[2] = ((color >> 8*2) & 0xFF)/255.0f;
|
||||
clear_color[3] = ((color >> 8*3) & 0xFF)/255.0f;
|
||||
clear_color_u = color;
|
||||
}
|
||||
|
||||
unsigned int vita2d_get_clear_color(){
|
||||
return clear_color_u;
|
||||
}
|
||||
|
||||
void vita2d_set_vblank_wait(int enable)
|
||||
|
@ -188,7 +188,8 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
vita2d_gfx_update_viewport(vita);
|
||||
|
||||
vita2d_start_drawing();
|
||||
vita2d_clear_screen();
|
||||
|
||||
vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color());
|
||||
|
||||
if (vita->texture)
|
||||
{
|
||||
@ -224,6 +225,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
|
||||
if (vita->menu.active)
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
||||
|
||||
if(vita->menu.texture){
|
||||
if (vita->fullscreen)
|
||||
@ -252,7 +254,6 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
}
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
||||
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "../../gfx/video_context_driver.h"
|
||||
#include "../../gfx/video_shader_driver.h"
|
||||
#include "../../gfx/common/vita2d_common.h"
|
||||
#include "../../defines/psp_defines.h"
|
||||
|
||||
static const float vita2d_vertexes[] = {
|
||||
0, 0,
|
||||
@ -218,7 +219,10 @@ static void menu_display_vita2d_clear_color(menu_display_ctx_clearcolor_t *clear
|
||||
(int)(clearcolor->g*255.f),
|
||||
(int)(clearcolor->b*255.f),
|
||||
(int)(clearcolor->a*255.f)));
|
||||
vita2d_clear_screen();
|
||||
vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,RGBA8((int)(clearcolor->r*255.f),
|
||||
(int)(clearcolor->g*255.f),
|
||||
(int)(clearcolor->b*255.f),
|
||||
(int)(clearcolor->a*255.f)));
|
||||
}
|
||||
|
||||
static bool menu_display_vita2d_font_init_first(
|
||||
|
Loading…
Reference in New Issue
Block a user