Skip to content

Commit

Permalink
Merge branch 'fix/homefreeze' into fix/duptitle
Browse files Browse the repository at this point in the history
  • Loading branch information
w3irDv committed Aug 3, 2024
2 parents 8eb1ec3 + a22b7af commit a887ea9
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/utils/DrawUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ uint32_t DrawUtils::sBufferSizeDRC = 0;
static SFT pFont = {};

static Color font_col(0xFFFFFFFF);
static Color black(0x000000FF);

void *DrawUtils::sBufferTV = NULL, *DrawUtils::sBufferDRC = NULL;
uint32_t DrawUtils::sBufferSizeTV = 0, DrawUtils::sBufferSizeDRC = 0;
Expand All @@ -52,10 +53,25 @@ DrawUtils::ConsoleProcCallbackAcquired(void *context)
sBufferDRC = MEMAllocFromFrmHeapEx(heap, sBufferSizeDRC, 4);
}


sConsoleHasForeground = TRUE;
DrawUtils::setRedraw(true);

OSScreenSetBufferEx(SCREEN_TV, sBufferTV);
OSScreenSetBufferEx(SCREEN_DRC, sBufferDRC);
DrawUtils::initBuffers(sBufferTV, sBufferDRC);

OSScreenEnableEx(SCREEN_TV, 1);
OSScreenEnableEx(SCREEN_DRC, 1);


for (int i = 0; i<2; i++) // both buffers to black
{
DrawUtils::clear(black);
DrawUtils::endDraw();
}

DrawUtils::setRedraw(true); // force a redraw when reentering

return 0;
}

Expand All @@ -77,13 +93,9 @@ DrawUtils::LogConsoleInit()
sBufferSizeDRC = OSScreenGetBufferSizeEx(SCREEN_DRC);

ConsoleProcCallbackAcquired(NULL);
OSScreenEnableEx(SCREEN_TV, 1);
OSScreenEnableEx(SCREEN_DRC, 1);


State::registerProcUICallbacks();

DrawUtils::initBuffers(sBufferTV, sBufferDRC);

return FALSE;
}

Expand Down

0 comments on commit a887ea9

Please sign in to comment.