1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

BeefPerf '%p' support

This commit is contained in:
Brian Fiete 2025-03-31 08:58:14 -04:00
parent f750d44d8d
commit 149d5f22ed
5 changed files with 43 additions and 3 deletions

View file

@ -155,8 +155,9 @@ namespace BeefPerf
LogLine(text); LogLine(text);
mFailed = true; mFailed = true;
if (!mShuttingDown) /*if (!mShuttingDown)
Shutdown(); Shutdown();*/
//Stop();
return; return;
} }
@ -647,7 +648,7 @@ namespace BeefPerf
public override void UnhandledCommandLine(String key, String value) public override void UnhandledCommandLine(String key, String value)
{ {
Fail(StackStringFormat!("Unhandled command line param: {0}", key)); Fail(scope:: String()..AppendF("Unhandled command line param: {0}", key));
} }
void SetupNewWindow(WidgetWindow window) void SetupNewWindow(WidgetWindow window)
@ -729,6 +730,9 @@ namespace BeefPerf
public override void Update(bool batchStart) public override void Update(bool batchStart)
{ {
if (mFailed)
Stop();
base.Update(batchStart); base.Update(batchStart);
/*if (!mListenSocket.IsConnected) /*if (!mListenSocket.IsConnected)

View file

@ -1441,6 +1441,8 @@ namespace BeefPerf
if (cNext == 'd') if (cNext == 'd')
zoneName.mParamsSize += 4; zoneName.mParamsSize += 4;
else if (cNext == 'p')
zoneName.mParamsSize += 8;
else if (cNext == 'f') else if (cNext == 'f')
zoneName.mParamsSize += 4; zoneName.mParamsSize += 4;
else if (cNext == 's') else if (cNext == 's')

View file

@ -216,6 +216,12 @@ namespace BeefPerf
Read(&val, 4); Read(&val, 4);
val.ToString(outStr); val.ToString(outStr);
} }
else if (cNext == 'p')
{
int64 val = 0;
Read(&val, 8);
val.ToString(outStr, "X", null);
}
else if (cNext == 'f') else if (cNext == 'f')
{ {
float val = 0; float val = 0;

View file

@ -767,6 +767,12 @@ namespace BeefPerf
stateCtx.Read(&val, 4); stateCtx.Read(&val, 4);
val.ToString(str); val.ToString(str);
} }
else if (cNext == 'p')
{
int64 val = 0;
stateCtx.Read(&val, 8);
val.ToString(str, "X", null);
}
else if (cNext == 'f') else if (cNext == 'f')
{ {
float val = 0; float val = 0;
@ -2316,6 +2322,11 @@ namespace BeefPerf
{ {
switch (keyCode) switch (keyCode)
{ {
case (KeyCode)'C':
if (DarkTooltipManager.sTooltip != null)
{
gApp.SetClipboardText(DarkTooltipManager.sTooltip.mText);
}
case (KeyCode)'Z': case (KeyCode)'Z':
mUndoManager.Undo(); mUndoManager.Undo();
case (KeyCode)'Y': case (KeyCode)'Y':

View file

@ -430,6 +430,11 @@ void BpCmdTarget::Enter(const char* name, va_list args)
intptr val = va_arg(args, intptr); intptr val = va_arg(args, intptr);
paramSize += 4; // int32 paramSize += 4; // int32
} }
else if (nextC == 'p')
{
intptr val = va_arg(args, intptr);
paramSize += 8; // int64
}
else if (nextC == 's') else if (nextC == 's')
{ {
const char* str = ToStrPtr(va_arg(args, char*)); const char* str = ToStrPtr(va_arg(args, char*));
@ -488,6 +493,10 @@ void BpCmdTarget::Enter(const char* name, va_list args)
{ {
BPCMD_MEMBER(int32) = (int32)va_arg(args, intptr); BPCMD_MEMBER(int32) = (int32)va_arg(args, intptr);
} }
else if (nextC == 'p')
{
BPCMD_MEMBER(int64) = (int64)va_arg(args, intptr);
}
else if (nextC == 's') else if (nextC == 's')
{ {
const char* str = ToStrPtr(va_arg(args, char*)); const char* str = ToStrPtr(va_arg(args, char*));
@ -1120,6 +1129,10 @@ void BpManager::ThreadProc()
{ {
zoneName->mSize += 4; zoneName->mSize += 4;
} }
else if (nextC == 'p')
{
zoneName->mSize += 8;
}
else if (nextC == 's') else if (nextC == 's')
{ {
isDyn = true; isDyn = true;
@ -1175,6 +1188,10 @@ void BpManager::ThreadProc()
{ {
checkDataIn += 4; checkDataIn += 4;
} }
else if (nextC == 'p')
{
checkDataIn += 8;
}
else if (nextC == 's') else if (nextC == 's')
{ {
int len = (int)strlen((const char*)checkDataIn); int len = (int)strlen((const char*)checkDataIn);