1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Console perf improvements

This commit is contained in:
Brian Fiete 2024-09-09 14:51:23 -04:00
parent 0880839252
commit db0af3a8e5
2 changed files with 19 additions and 2 deletions

View file

@ -456,7 +456,7 @@ class ConsolePanel : Panel
}
}*/
if (Paused || !mConsoleProvider.Attached)
if ((Paused || !mConsoleProvider.Attached) && (gApp.mIsUpdateBatchStart))
{
int scrollTop = (.)(mScrollableWidget.mVertScrollbar.mContentPos / mCellHeight);
float wantScrollPos = scrollTop * mCellHeight;
@ -687,7 +687,21 @@ class ConsolePanel : Panel
public override void DrawAll(Graphics g)
{
if (!mConsoleProvider.Attached)
if ((mConsoleProvider is WinNativeConsoleProvider) && (gApp.mSettings.mDebugConsoleKind != .Embedded))
{
using (g.PushColor(0xFFA0A0A0))
{
base.DrawAll(g);
}
using (g.PushColor(0x40A0A0A0))
g.FillRect(0, 0, mWidth, mHeight);
g.SetFont(DarkTheme.sDarkTheme.mSmallFont);
using (g.PushColor(0xFFA0A0A0))
g.DrawString("Enable embedded Debug Console in Settings", GS!(16), GS!(16), .Centered, mScrollableWidget.mVertScrollbar.mX - GS!(32));
}
else if (!mConsoleProvider.Attached)
{
//using (g.PushColor(0x80FFFFFF))
using (g.PushColor(0xFFA0A0A0))

View file

@ -490,6 +490,9 @@ class WinNativeConsoleProvider : ConsoleProvider
if (mScreenInfo == null)
return;
if (mScreenInfo.mScrollTop == row)
return;
GetFullScreenInfo(mScreenInfo);
mScreenInfo.mScrollTop = (.)row;