Skip to content

Commit dc864e9

Browse files
committed
[core] Adjusted depth for cursor rendering.
Also remove useless code.
1 parent 4edb21a commit dc864e9

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

src/video.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ static float sdl_dc_v1 = 0.9f;
7171
static float sdl_dc_v2 = 0.6f;
7272

7373
static void *VideoThread(void *ptr);
74+
static void SDL_DS_Blit_Cursor(void);
7475

7576

7677
SDL_Surface *GetScreen() {
@@ -542,20 +543,7 @@ void SDL_DS_Blit_Textured() {
542543
plx_fcxt_end(plx_cxt);
543544
}
544545

545-
plx_mat3d_identity();
546546
plx_mat3d_translate(sdl_dc_trans_x, sdl_dc_trans_y, sdl_dc_trans_z);
547-
//plx_mat3d_translate((sdl_dc_wtex/2)+512.0f*sdl_dc_trans_x/native_width,(sdl_dc_htex/2)+512.0f*sdl_dc_trans_y/native_height,sdl_dc_trans_z - 3);
548-
549-
/* Clear internal to an identity matrix */
550-
plx_mat_identity();
551-
552-
/* "Applying" all matrixs: multiply a matrix onto the "internal" one */
553-
plx_mat3d_apply_all();
554-
555-
plx_mat3d_rotate(sdl_dc_rot_x, 1.0f, 0.0f, 0.0f);
556-
plx_mat3d_rotate(sdl_dc_rot_y, 0.0f, 1.0f, 0.0f);
557-
plx_mat3d_rotate(sdl_dc_rot_z, 0.0f, 0.0f, 1.0f);
558-
plx_mat3d_translate(0, 0, 0);
559547

560548
plx_cxt_texture(plx_screen_txr);
561549
plx_cxt_culling(PLX_CULL_NONE);
@@ -567,10 +555,13 @@ void SDL_DS_Blit_Textured() {
567555
plx_vert_ifpm3(PLX_VERT, sdl_dc_x + native_width, sdl_dc_y, sdl_dc_z, color, sdl_dc_u2, sdl_dc_v1);
568556
plx_vert_ifpm3(PLX_VERT, sdl_dc_x, sdl_dc_y + native_height, sdl_dc_z, color, sdl_dc_u1, sdl_dc_v2);
569557
plx_vert_ifpm3(PLX_VERT_EOS, sdl_dc_x + native_width, sdl_dc_y + native_height, sdl_dc_z, color, sdl_dc_u2, sdl_dc_v2);
558+
}
570559

571-
if (!ConsoleIsVisible()) {
560+
static void SDL_DS_Blit_Cursor(void) {
561+
if (!ConsoleIsVisible() && plx_cursor_txr) {
572562
int mouse_cursor_x = 0;
573563
int mouse_cursor_y = 0;
564+
uint32 color = PVR_PACK_COLOR(screen_opacity, 1.0f, 1.0f, 1.0f);
574565

575566
SDL_GetMouseState(&mouse_cursor_x, &mouse_cursor_y);
576567

@@ -626,6 +617,7 @@ static void *VideoThread(void *ptr) {
626617
ProcessVideoEventsRender();
627618
SDL_DS_Blit_Textured();
628619
ProcessVideoEventsRenderPost();
620+
SDL_DS_Blit_Cursor();
629621

630622
pvr_list_finish();
631623
} else {

0 commit comments

Comments
 (0)