Debugger for DX9 plugin.

Debugger panel is displayed only if Dolphin is started with /d option.
Dump features are not implemented.
Pause/Resume buttons works, only if the plugin is built in DEBUG or DEBUGFAST configuration, not in RELEASE. These features are really only for devs, not for regular gamers.

You will be able to pause frame by frame, or by n frames, or by n primitive flushes. Other pausing options are not implemented yet.

When other pausing and dumping features are implemented, debugging will be much easier.

I have changed the DX9 project setting to use unicode character set in order to use wxWidge tools. If this causes Dolphin building problems for you, check your project setting.txt




git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4154 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
rice1964
2009-09-02 06:33:41 +00:00
parent 3bba897799
commit d616f132d7
23 changed files with 775 additions and 100 deletions

View File

@ -104,7 +104,7 @@ namespace W32Util
mojs[4]=0;
*(int*)mojs=cookie;
sprintf(temp,"W32Util::File: Magic Cookie %s is bad!",mojs);
MessageBox(0,temp,"Error reading file",MB_ICONERROR);
MessageBoxA(0,temp,"Error reading file",MB_ICONERROR);
return false;
}
else

View File

@ -82,7 +82,7 @@ namespace W32Util
{
OpenClipboard(hwnd);
EmptyClipboard();
HANDLE hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (strlen(text) + 1) * sizeof(TCHAR));
HANDLE hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (wcslen(text) + 1) * sizeof(TCHAR));
if (hglbCopy == NULL)
{
CloseClipboard();
@ -92,8 +92,8 @@ namespace W32Util
// Lock the handle and copy the text to the buffer.
TCHAR *lptstrCopy = (TCHAR *)GlobalLock(hglbCopy);
strcpy(lptstrCopy, text);
lptstrCopy[strlen(text)] = (TCHAR) 0; // null character
wcscpy(lptstrCopy, text);
lptstrCopy[wcslen(text)] = (TCHAR) 0; // null character
GlobalUnlock(hglbCopy);
SetClipboardData(CF_TEXT,hglbCopy);
CloseClipboard();

View File

@ -4,6 +4,6 @@ namespace W32Util
{
void CenterWindow(HWND hwnd);
HBITMAP CreateBitmapFromARGB(HWND someHwnd, DWORD *image, int w, int h);
void NiceSizeFormat(size_t size, char *out);
BOOL CopyTextToClipboard(HWND hwnd, TCHAR *text);
void NiceSizeFormat(size_t size, char * out);
BOOL CopyTextToClipboard(HWND hwnd, char * text);
}

View File

@ -60,7 +60,7 @@ namespace W32Util
return 0;
}
void PropSheet::Show(HINSTANCE hInstance, HWND hParent, std::string title, int startpage, bool floating, bool wizard)
void PropSheet::Show(HINSTANCE hInstance, HWND hParent, LPCTSTR title, int startpage, bool floating, bool wizard)
{
HPROPSHEETPAGE *pages = new HPROPSHEETPAGE[list.size()];
PROPSHEETPAGE page;
@ -118,7 +118,7 @@ namespace W32Util
if (icon)
sheet.dwFlags |= PSH_USEHICON;
sheet.pszCaption = title.c_str();
sheet.pszCaption = title;
sheet.nPages = (UINT)list.size();
sheet.phpage = pages;
sheet.nStartPage = startpage;

View File

@ -75,7 +75,7 @@ namespace W32Util
void SetHeader(LPCTSTR _header) {header=_header;}
void SetIcon(HICON _icon) {icon = _icon;}
void Add(Tab *tab, LPCTSTR resource, LPCTSTR title, LPCTSTR subtitle = 0);
void Show(HINSTANCE hInstance, HWND hParent, std::string title, int startpage=0, bool floating = false, bool wizard = false);
void Show(HINSTANCE hInstance, HWND hParent, LPCTSTR title, int startpage=0, bool floating = false, bool wizard = false);
HFONT GetTitleFont() {return hTitleFont;}
HFONT GetFont() {return hDialogFont;}
static int CALLBACK Callback(HWND hwndDlg, UINT uMsg, LPARAM lParam);

View File

@ -8,17 +8,17 @@ namespace W32Util
{
std::string BrowseForFolder(HWND parent, char *title)
{
BROWSEINFO info;
BROWSEINFOA info;
memset(&info,0,sizeof(info));
info.hwndOwner = parent;
info.lpszTitle = title;
info.ulFlags = BIF_EDITBOX | BIF_RETURNONLYFSDIRS;
//info.pszDisplayName
LPCITEMIDLIST idList = SHBrowseForFolder(&info);
LPCITEMIDLIST idList = SHBrowseForFolderA(&info);
char temp[MAX_PATH];
SHGetPathFromIDList(idList, temp);
SHGetPathFromIDListA(idList, temp);
if (strlen(temp))
{
return temp;
@ -37,7 +37,7 @@ namespace W32Util
char szFile [MAX_PATH+1] = {0};
char szFileTitle [MAX_PATH+1] = {0};
OPENFILENAME ofn;
OPENFILENAMEA ofn;
ZeroMemory (&ofn,sizeof (ofn));
ofn.lStructSize = sizeof (OPENFILENAME);
ofn.lpstrInitialDir = _pInitialFolder;
@ -53,7 +53,7 @@ namespace W32Util
if (_strFileName.size () != 0)
ofn.lpstrFile = (char *)_strFileName.c_str();
if (((_bLoad) ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn)))
if (((_bLoad) ? GetOpenFileNameA(&ofn) : GetSaveFileNameA(&ofn)))
{
_strFileName = ofn.lpstrFile;
return true;
@ -70,7 +70,7 @@ namespace W32Util
strcpy (szFile,"");
strcpy (szFileTitle,"");
OPENFILENAME ofn;
OPENFILENAMEA ofn;
ZeroMemory (&ofn,sizeof (ofn));
@ -87,7 +87,7 @@ namespace W32Util
std::vector<std::string> files;
if (((_bLoad)?GetOpenFileName (&ofn):GetSaveFileName (&ofn)))
if (((_bLoad)?GetOpenFileNameA (&ofn):GetSaveFileNameA (&ofn)))
{
std::string directory = ofn.lpstrFile;
char *temp = ofn.lpstrFile;

View File

@ -27,7 +27,7 @@ namespace W32Util
//
HWND TabControl::AddItem (char* _szText,int _iResource,DLGPROC _lpDialogFunc)
{
TCITEM tcItem;
TCITEMA tcItem;
ZeroMemory (&tcItem,sizeof (tcItem));
@ -40,7 +40,7 @@ namespace W32Util
int nResult = TabCtrl_InsertItem (m_hTabCtrl,TabCtrl_GetItemCount (m_hTabCtrl),&tcItem);
HWND hDialog = CreateDialog(m_hInstance,(LPCSTR)_iResource,m_hTabCtrl,_lpDialogFunc);
HWND hDialog = CreateDialogA(m_hInstance,(LPCSTR)_iResource,m_hTabCtrl,_lpDialogFunc);
RECT rectInnerWindow = {0,0,0,0};
GetWindowRect (m_hTabCtrl,&rectInnerWindow);