@@ -71,6 +71,7 @@ static float sdl_dc_v1 = 0.9f;
7171static float sdl_dc_v2 = 0.6f ;
7272
7373static void * VideoThread (void * ptr );
74+ static void SDL_DS_Blit_Cursor (void );
7475
7576
7677SDL_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,21 +555,24 @@ 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
577568 plx_cxt_texture (plx_cursor_txr );
578569 plx_cxt_culling (PLX_CULL_NONE );
579570 plx_cxt_send (PLX_LIST_TR_POLY );
580571
581- plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x , mouse_cursor_y , 1 .0f , color , 0.0f , 0.0f );
582- plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x + plx_cursor_txr -> w , mouse_cursor_y , 1 .0f , color , 1.0f , 0.0f );
583- plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x , mouse_cursor_y + plx_cursor_txr -> w , 1 .0f , color , 0.0f , 1.0f );
584- plx_vert_ifpm3 (PLX_VERT_EOS , mouse_cursor_x + plx_cursor_txr -> w , mouse_cursor_y + plx_cursor_txr -> w , 1 .0f , color , 1.0f , 1.0f );
572+ plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x , mouse_cursor_y , sdl_dc_z - 2 .0f , color , 0.0f , 0.0f );
573+ plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x + plx_cursor_txr -> w , mouse_cursor_y , sdl_dc_z - 2 .0f , color , 1.0f , 0.0f );
574+ plx_vert_ifpm3 (PLX_VERT , mouse_cursor_x , mouse_cursor_y + plx_cursor_txr -> w , sdl_dc_z - 2 .0f , color , 0.0f , 1.0f );
575+ plx_vert_ifpm3 (PLX_VERT_EOS , mouse_cursor_x + plx_cursor_txr -> w , mouse_cursor_y + plx_cursor_txr -> w , sdl_dc_z - 2 .0f , color , 1.0f , 1.0f );
585576 }
586577}
587578
@@ -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