mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Add a button to break on a particular texture.
This commit is contained in:
1 parent
dd314c83bd
commit
5a90ddcb47
3 files changed
+20
-3
No files matched your search
@@ -25,6 +25,7 @@
|
||||
#include "Windows/GEDebugger/CtrlDisplayListView.h"
|
||||
#include "Windows/GEDebugger/TabDisplayLists.h"
|
||||
#include "Windows/GEDebugger/TabState.h"
|
||||
#include "Windows/InputBox.h"
|
||||
#include "Windows/WindowsHost.h"
|
||||
#include "Windows/WndMainWindow.h"
|
||||
#include "Windows/main.h"
|
||||
@@ -104,7 +105,7 @@ bool CGEDebugger::IsTextureBreakPoint(u32 op) {
|
||||
// Otherwise we get garbage widths and colors. It's annoying.
|
||||
bool textureCmd = interesting || cmd == GE_CMD_CLUTADDR || cmd == GE_CMD_CLUTADDRUPPER || cmd == GE_CMD_LOADCLUT || cmd == GE_CMD_CLUTFORMAT;
|
||||
textureCmd = textureCmd || (cmd >= GE_CMD_TEXSIZE0 && cmd <= GE_CMD_TEXSIZE7);
|
||||
textureCmd = textureCmd || cmd == GE_CMD_TEXFORMAT || cmd == GE_CMD_TEXMODE;
|
||||
textureCmd = textureCmd || cmd == GE_CMD_TEXFORMAT || cmd == GE_CMD_TEXMODE || cmd == GE_CMD_TEXTUREMAPENABLE;
|
||||
if (!textureCmd) {
|
||||
return true;
|
||||
}
|
||||
@@ -125,7 +126,7 @@ bool CGEDebugger::IsTextureBreakPoint(u32 op) {
|
||||
}
|
||||
|
||||
lock_guard guard(breaksLock);
|
||||
if (breakTextures.find(state.getTextureAddress(level)) != breakTextures.end()) {
|
||||
if (breakTextures.find(state.getTextureAddress(level)) != breakTextures.end() && breakNext == BREAK_NONE) {
|
||||
breakNext = BREAK_NEXT_NONTEX;
|
||||
}
|
||||
return false;
|
||||
@@ -464,6 +465,20 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
SetBreakNext(BREAK_NEXT_FRAME);
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_BREAKTEX:
|
||||
{
|
||||
u32 texAddr;
|
||||
// TODO: Better interface that allows add/remove or something.
|
||||
if (InputBox_GetHex(GetModuleHandle(NULL), m_hDlg, L"Texture Address", lastTexture, texAddr)) {
|
||||
if (breakTextures.find(texAddr) != breakTextures.end()) {
|
||||
breakTextures.erase(texAddr);
|
||||
} else {
|
||||
breakTextures.insert(texAddr);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_RESUME:
|
||||
frameWindow->Clear();
|
||||
texWindow->Clear();
|
||||
|
||||
@@ -183,6 +183,7 @@ BEGIN
|
||||
CONTROL "",IDC_GEDBG_MAINTAB,"SysTabControl32",TCS_TABS | TCS_FOCUSNEVER,10,216,480,180
|
||||
EDITTEXT IDC_GEDBG_FRAMEBUFADDR,148,192,128,12,ES_READONLY | NOT WS_BORDER
|
||||
EDITTEXT IDC_GEDBG_TEXADDR,10,152,128,12,ES_READONLY | NOT WS_BORDER
|
||||
PUSHBUTTON "Break on Texture...",IDC_GEDBG_BREAKTEX,24,172,100,14
|
||||
CONTROL "",IDC_GEDBG_FBTABS,"SysTabControl32",TCS_BUTTONS | TCS_FOCUSNEVER,384,192,110,12
|
||||
END
|
||||
|
||||
|
||||
+2
-1
@@ -292,6 +292,7 @@
|
||||
#define ID_GEDBG_GOTOADDR 40132
|
||||
#define IDC_GEDBG_STEPTEX 40133
|
||||
#define IDC_GEDBG_STEPFRAME 40134
|
||||
#define IDC_GEDBG_BREAKTEX 40135
|
||||
|
||||
// Dummy option to let the buffered rendering hotkey cycle through all the options.
|
||||
#define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500
|
||||
@@ -304,7 +305,7 @@
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 254
|
||||
#define _APS_NEXT_COMMAND_VALUE 40135
|
||||
#define _APS_NEXT_COMMAND_VALUE 40136
|
||||
#define _APS_NEXT_CONTROL_VALUE 1193
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user