(PSP) Style nits

This commit is contained in:
twinaphex 2015-03-21 23:25:46 +01:00
parent 2ec7fdde51
commit f517c41070

View File

@ -59,8 +59,6 @@
#define FROM_GU_POINTER(ptr) ((void *)((uint32_t)(ptr)|0x44000000))
#define TO_GU_POINTER(ptr) ((void *)((uint32_t)(ptr)&~0x44000000))
typedef struct __attribute__((packed)) psp1_vertex
{
float u,v;
@ -72,7 +70,6 @@ typedef struct __attribute__((packed)) psp1_sprite
{
psp1_vertex_t v0;
psp1_vertex_t v1;
} psp1_sprite_t;
typedef struct psp1_menu_frame
@ -84,7 +81,6 @@ typedef struct psp1_menu_frame
bool active;
PspGeContext context_storage;
} psp1_menu_frame_t;
typedef struct psp1_video
@ -100,7 +96,6 @@ typedef struct psp1_video
bool rgb32;
int bpp_log2;
psp1_menu_frame_t menu;
video_viewport_t vp;
@ -110,7 +105,6 @@ typedef struct psp1_video
bool keep_aspect;
bool should_resize;
bool hw_render;
} psp1_video_t;
// both row and column count need to be a power of 2
@ -123,8 +117,8 @@ static INLINE void psp_set_screen_coords (psp1_sprite_t* framecoords,
int x, int y, int width, int height, unsigned rotation)
{
int i;
int current_column = 0;
float x0, y0, step_x, step_y;
int current_column = 0;
if (rotation == 0)
{
@ -224,7 +218,6 @@ static INLINE void psp_set_tex_coords (psp1_sprite_t* framecoords,
{
int i;
int current_column = 0;
float u0 = 0;
float v0 = 0;
float step_u = ((float) width) / PSP_FRAME_COLUMNS_COUNT;
@ -251,15 +244,16 @@ static void psp_update_viewport(psp1_video_t* psp);
static void psp_on_vblank(u32 sub, psp1_video_t *psp)
{
if (psp)
psp->vblank_not_reached = false;
}
static void *psp_init(const video_info_t *video,
const input_driver_t **input, void **input_data)
{
/* to-do : add ASSERT() checks or use main RAM if
/* TODO : add ASSERT() checks or use main RAM if
* VRAM is too low for desired video->input_scale. */
void *pspinput;
void *pspinput = NULL;
int pixel_format, lut_pixel_format, lut_block_count;
unsigned int red_shift, color_mask;
void *displayBuffer, *LUT_r, *LUT_b;
@ -320,6 +314,7 @@ static void *psp_init(const video_info_t *video,
if(psp->rgb32)
{
u32 i;
uint32_t* LUT_r_local = (uint32_t*)(SCEGU_VRAM_BP32_2);
uint32_t* LUT_b_local = (uint32_t*)(SCEGU_VRAM_BP32_2) + (1 << 8);
@ -336,7 +331,8 @@ static void *psp_init(const video_info_t *video,
displayBuffer = SCEGU_VRAM_BP32_1;
for (u32 i=0; i < (1 << 8); i++){
for (i = 0; i < (1 << 8); i++)
{
LUT_r_local[i] = i;
LUT_b_local[i] = i << (8 + 8);
}
@ -347,6 +343,7 @@ static void *psp_init(const video_info_t *video,
}
else
{
u16 i;
uint16_t* LUT_r_local = (uint16_t*)(SCEGU_VRAM_BP_2);
uint16_t* LUT_b_local = (uint16_t*)(SCEGU_VRAM_BP_2) + (1 << 5);
@ -366,7 +363,7 @@ static void *psp_init(const video_info_t *video,
displayBuffer = SCEGU_VRAM_BP_1;
for (u16 i = 0; i < (1 << 5); i++)
for (i = 0; i < (1 << 5); i++)
{
LUT_r_local[i] = i;
LUT_b_local[i] = i << (5 + 6);