mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Moved expression parser to native and changed how it's accessed
This commit is contained in:
1 parent
41ed77f66a
commit
e3d3d75e38
17 files changed
+108
-513
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#include "DebuggerShared.h"
|
||||
#include "../InputBox.h"
|
||||
|
||||
bool parseExpression(char* exp, DebugInterface* cpu, u32& dest)
|
||||
{
|
||||
PostfixExpression postfix;
|
||||
if (cpu->initExpression(exp,postfix) == false) return false;
|
||||
return cpu->parseExpression(postfix,dest);
|
||||
}
|
||||
|
||||
void displayExpressionError(HWND hwnd)
|
||||
{
|
||||
MessageBox(hwnd,getExpressionError(),"Invalid expression",MB_OK);
|
||||
}
|
||||
|
||||
bool executeExpressionWindow(HWND hwnd, DebugInterface* cpu, u32& dest)
|
||||
{
|
||||
char expression[1024];
|
||||
if (InputBox_GetString(GetModuleHandle(NULL), hwnd, "Expression", "",expression) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parseExpression(expression,cpu,dest) == false)
|
||||
{
|
||||
displayExpressionError(hwnd);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user