@@ -64,18 +64,7 @@ static void dreameye_preview_frame() {
6464 return ;
6565 }
6666
67- if (is_fullscreen ) {
68- plx_mat3d_identity ();
69- plx_mat_identity ();
70- plx_mat3d_apply_all ();
71-
72- plx_mat3d_rotate (0.0f , 1.0f , 0.0f , 0.0f );
73- plx_mat3d_rotate (0.0f , 0.0f , 1.0f , 0.0f );
74- plx_mat3d_rotate (0.0f , 0.0f , 0.0f , 1.0f );
75- plx_mat3d_translate (0 , 0 , 0 );
76- } else if (ScreenIsHidden ()) {
77- return ;
78- }
67+ plx_mat3d_translate (0 , 0 , 0.1f );
7968
8069 plx_cxt_texture (plx_txr );
8170 plx_cxt_culling (PLX_CULL_NONE );
@@ -98,7 +87,9 @@ static void DrawHandler(void *ds_event, void *param, int action) {
9887 }
9988 break ;
10089 case EVENT_ACTION_RENDER_POST :
101- dreameye_preview_frame ();
90+ if (!is_fullscreen && !ScreenIsHidden () && !ConsoleIsVisible ()) {
91+ dreameye_preview_frame ();
92+ }
10293 break ;
10394 case EVENT_ACTION_UPDATE :
10495 break ;
@@ -149,6 +140,7 @@ static void onPreviewClick(void) {
149140static void EventHandler (void * ds_event , void * param , int action ) {
150141
151142 SDL_Event * event = (SDL_Event * ) param ;
143+ static int inside_video_area = 0 ;
152144
153145 switch (event -> type ) {
154146 case SDL_JOYBUTTONDOWN :
@@ -167,6 +159,18 @@ static void EventHandler(void *ds_event, void *param, int action) {
167159 onPreviewClick ();
168160 }
169161 break ;
162+ case SDL_MOUSEMOTION :
163+ int mx = event -> motion .x , my = event -> motion .y ;
164+ if (mx >= frame_x && mx <= frame_x + (frame_txr_width * frame_scale ) &&
165+ my >= frame_y && my <= frame_y + (frame_txr_height * frame_scale )) {
166+ if (!inside_video_area ) {
167+ ds_sfx_play (DS_SFX_CLICK2 );
168+ inside_video_area = 1 ;
169+ }
170+ }
171+ else {
172+ inside_video_area = 0 ;
173+ }
170174 default :
171175 break ;
172176 }
0 commit comments