@@ -203,7 +203,6 @@ typedef struct ctr_video
203203 bool state_data_exist ;
204204 bool bottom_check_idle ;
205205 bool bottom_is_idle ;
206- bool bottom_is_fading ;
207206 char state_date [CTR_STATE_DATE_SIZE ];
208207} ctr_video_t ;
209208
@@ -250,7 +249,6 @@ typedef struct
250249 * externally, otherwise cannot detect current state
251250 * when reinitialising... */
252251static bool ctr_bottom_screen_enabled = true;
253- static int fade_count = 256 ;
254252
255253/*
256254 * FORWARD DECLARATIONS
@@ -1197,15 +1195,11 @@ static void ctr_bottom_menu_control(void* data,
11971195 if (ctr -> bottom_is_idle )
11981196 {
11991197 ctr -> bottom_is_idle = false;
1200- ctr -> bottom_is_fading = false;
1201- fade_count = 256 ;
12021198 ctr_set_bottom_screen_enable (true,true);
12031199 }
12041200 else if (ctr -> bottom_check_idle )
12051201 {
12061202 ctr -> bottom_check_idle = false;
1207- ctr -> bottom_is_fading = false;
1208- fade_count = 256 ;
12091203 }
12101204
12111205 if (ctr -> bottom_menu == CTR_BOTTOM_MENU_NOT_AVAILABLE )
@@ -1567,34 +1561,6 @@ static void ctr_render_bottom_screen(void *data)
15671561 }
15681562}
15691563
1570- /* graphic function originates from here:
1571- * https://github.com/smealum/3ds_hb_menu/blob/master/source/gfx.c
1572- */
1573- void ctr_fade_bottom_screen (gfxScreen_t screen , gfx3dSide_t side , u32 f )
1574- {
1575- #ifndef CONSOLE_LOG
1576- int i ;
1577- u16 fbWidth , fbHeight ;
1578- u8 * fbAdr = gfxGetFramebuffer (screen , side , & fbWidth , & fbHeight );
1579-
1580- for (i = 0 ; i < fbWidth * fbHeight / 2 ; i ++ )
1581- {
1582- * fbAdr = (* fbAdr * f ) >> 8 ;
1583- fbAdr ++ ;
1584- * fbAdr = (* fbAdr * f ) >> 8 ;
1585- fbAdr ++ ;
1586- * fbAdr = (* fbAdr * f ) >> 8 ;
1587- fbAdr ++ ;
1588- * fbAdr = (* fbAdr * f ) >> 8 ;
1589- fbAdr ++ ;
1590- * fbAdr = (* fbAdr * f ) >> 8 ;
1591- fbAdr ++ ;
1592- * fbAdr = (* fbAdr * f ) >> 8 ;
1593- fbAdr ++ ;
1594- }
1595- #endif
1596- }
1597-
15981564static void ctr_set_bottom_screen_idle (ctr_video_t * ctr )
15991565{
16001566 u64 elapsed_tick ;
@@ -1605,28 +1571,10 @@ static void ctr_set_bottom_screen_idle(ctr_video_t * ctr)
16051571
16061572 if ( elapsed_tick > 2000000000 )
16071573 {
1608- if (!ctr -> bottom_is_fading )
1609- {
1610- ctr -> bottom_is_fading = true;
1611- ctr -> refresh_bottom_menu = true;
1612- return ;
1613- }
1614-
1615- if (fade_count > 0 )
1616- {
1617- fade_count -- ;
1618- ctr_fade_bottom_screen (GFX_BOTTOM , GFX_LEFT , fade_count );
1619-
1620- if (fade_count <= 128 )
1621- {
1622- ctr -> bottom_is_idle = true;
1623- ctr -> bottom_is_fading = false;
1624- ctr -> bottom_check_idle = false;
1625- fade_count = 256 ;
1626- ctr_set_bottom_screen_enable (false,true);
1627- return ;
1628- }
1629- }
1574+ ctr -> bottom_is_idle = true;
1575+ ctr -> bottom_check_idle = false;
1576+ ctr_set_bottom_screen_enable (false,true);
1577+ return ;
16301578 }
16311579}
16321580
@@ -1817,7 +1765,6 @@ static void* ctr_init(const video_info_t* video,
18171765 ctr -> prev_bottom_menu = CTR_BOTTOM_MENU_NOT_AVAILABLE ;
18181766 ctr -> bottom_check_idle = false;
18191767 ctr -> bottom_is_idle = false;
1820- ctr -> bottom_is_fading = false;
18211768 ctr -> idle_timestamp = 0 ;
18221769 ctr -> state_slot = settings -> ints .state_slot ;
18231770
@@ -2476,10 +2423,6 @@ static bool ctr_frame(void* data, const void* frame,
24762423 gspPresentBuffer (GFX_BOTTOM , ctr -> current_buffer_bottom , bottom , bottom ,
24772424 stride , GSP_BGR8_OES );
24782425 }
2479- else if (ctr -> bottom_is_fading )
2480- {
2481- gfxScreenSwapBuffers (GFX_BOTTOM ,false);
2482- }
24832426#endif
24842427#else
24852428 topFramebufferInfo .
@@ -2550,7 +2493,7 @@ static bool ctr_frame(void* data, const void* frame,
25502493#endif
25512494#endif
25522495 ctr -> current_buffer_top ^= 1 ;
2553- if (ctr -> refresh_bottom_menu || ctr -> bottom_is_fading )
2496+ if (ctr -> refresh_bottom_menu )
25542497 ctr -> current_buffer_bottom ^= 1 ;
25552498
25562499 ctr -> p3d_event_pending = true;
0 commit comments