mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
GE Debugger: Allow relative prim counts.
This commit is contained in:
parent
e029168be2
commit
f88dc9e821
@ -71,8 +71,12 @@ void SetBreakNext(BreakNext next) {
|
||||
GPUStepping::ResumeFromStepping();
|
||||
}
|
||||
|
||||
void SetBreakCount(int c) {
|
||||
void SetBreakCount(int c, bool relative) {
|
||||
if (relative) {
|
||||
breakAtCount = primsThisFrame + c;
|
||||
} else {
|
||||
breakAtCount = c;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsBreakpoint(u32 pc, u32 op) {
|
||||
|
@ -37,7 +37,7 @@ void SetActive(bool flag);
|
||||
bool IsActive();
|
||||
|
||||
void SetBreakNext(BreakNext next);
|
||||
void SetBreakCount(int c);
|
||||
void SetBreakCount(int c, bool relative = false);
|
||||
|
||||
// While debugging is active, these may block.
|
||||
void NotifyCommand(u32 pc);
|
||||
|
@ -730,7 +730,13 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
std::string value;
|
||||
int count;
|
||||
if (InputBox_GetString(GetModuleHandle(NULL), m_hDlg, L"Prim count", "", value)) {
|
||||
if (TryParse(value, &count)) {
|
||||
if (value.length() > 1 && value[0] == '+' && TryParse(value.substr(1), &count)) {
|
||||
SetBreakNext(BreakNext::COUNT);
|
||||
SetBreakCount(count, true);
|
||||
} else if (value.length() > 1 && value[0] == '-' && TryParse(value.substr(1), &count)) {
|
||||
SetBreakNext(BreakNext::COUNT);
|
||||
SetBreakCount(-count, true);
|
||||
} else if (TryParse(value, &count)) {
|
||||
SetBreakNext(BreakNext::COUNT);
|
||||
SetBreakCount(count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user