Skip to content

Commit

Permalink
Avoid cross-deinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Nov 18, 2024
1 parent f659806 commit fec2c61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libogc/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ static int __gecko_close(void *c)

void CON_EnableGecko(s32 chan,bool safe)
{
if(chan<0 && __gecko_chan==-1) return;
if(chan>=0 && (__gecko_chan==chan || !usb_isgeckoalive(chan))) return;

fclose(stdcon);
Expand Down Expand Up @@ -706,6 +707,8 @@ static int __uart_write(void *c,const char *buf,int n)

void CON_EnableBarnacle(s32 chan,s32 dev)
{
if(chan<0 && __gecko_chan>=0) return;

fclose(stdcon);
stdcon = NULL;

Expand Down

0 comments on commit fec2c61

Please sign in to comment.