mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
remove stuff from ogl debugger that did nothing. (copied from dsp hle a while ago)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2111 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -853,26 +853,10 @@
|
|||||||
RelativePath=".\Src\Debugger\Debugger.h"
|
RelativePath=".\Src\Debugger\Debugger.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Debugger\PBView.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Debugger\PBView.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Logging"
|
Name="Logging"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Debugger\Logging.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Src\Debugger\Logging.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Src\rasterfont.cpp"
|
RelativePath=".\Src\rasterfont.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
#ifndef _CONFIG_H
|
#ifndef _CONFIG_H
|
||||||
#define _CONFIG_H
|
#define _CONFIG_H
|
||||||
|
|
||||||
// Log in two categories, andsave three other options in the same byte
|
// Log in two categories, and save three other options in the same byte
|
||||||
#define CONF_LOG 1
|
#define CONF_LOG 1
|
||||||
#define CONF_PRIMLOG 2
|
#define CONF_PRIMLOG 2
|
||||||
#define CONF_SAVETEXTURES 4
|
#define CONF_SAVETEXTURES 4
|
||||||
#define CONF_SAVETARGETS 8
|
#define CONF_SAVETARGETS 8
|
||||||
#define CONF_SAVESHADERS 16
|
#define CONF_SAVESHADERS 16
|
||||||
|
|
||||||
struct Config
|
struct Config
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,121 +18,62 @@
|
|||||||
#ifndef __CDebugger_h__
|
#ifndef __CDebugger_h__
|
||||||
#define __CDebugger_h__
|
#define __CDebugger_h__
|
||||||
|
|
||||||
|
#include <wx/wx.h>
|
||||||
// wx stuff, I'm not sure if we use all these
|
#include <wx/notebook.h>
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include <wx/wx.h>
|
|
||||||
#include <wx/dialog.h>
|
|
||||||
#else
|
|
||||||
#include <wx/wxprec.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/statbox.h>
|
|
||||||
#include <wx/statbmp.h>
|
|
||||||
|
|
||||||
#include <wx/sizer.h>
|
|
||||||
#include <wx/filepicker.h>
|
|
||||||
#include <wx/listctrl.h>
|
|
||||||
#include <wx/imaglist.h>
|
|
||||||
#include <wx/notebook.h> // notebook
|
|
||||||
|
|
||||||
#include "../Globals.h"
|
#include "../Globals.h"
|
||||||
|
|
||||||
class CPBView;
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
class CDebugger : public wxDialog
|
class CDebugger : public wxDialog
|
||||||
{
|
{
|
||||||
private:
|
public:
|
||||||
DECLARE_EVENT_TABLE();
|
CDebugger(wxWindow *parent,
|
||||||
|
wxWindowID id = 1,
|
||||||
|
const wxString &title = wxT("OGL Debug"),
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
||||||
|
|
||||||
public:
|
virtual ~CDebugger();
|
||||||
CDebugger(wxWindow *parent, wxWindowID id = 1, const wxString &title = _("Sound Debugger"),
|
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
|
|
||||||
virtual ~CDebugger();
|
void SaveSettings() const;
|
||||||
|
void LoadSettings();
|
||||||
|
void DoShowHideConsole();
|
||||||
|
void DoShow();
|
||||||
|
|
||||||
void Save(IniFile& _IniFile) const;
|
void GeneralSettings(wxCommandEvent& event);
|
||||||
void Load(IniFile& _IniFile);
|
|
||||||
void DoHide(); void DoShow();
|
|
||||||
|
|
||||||
void NotifyUpdate();
|
bool bInfoLog;
|
||||||
void OnUpdate(wxCommandEvent& event);
|
bool bPrimLog;
|
||||||
|
bool bSaveTextures;
|
||||||
|
bool bSaveTargets;
|
||||||
|
bool bSaveShaders;
|
||||||
|
|
||||||
void GeneralSettings(wxCommandEvent& event);
|
private:
|
||||||
void LogSettings(wxCommandEvent& event);
|
DECLARE_EVENT_TABLE();
|
||||||
void DoShowHideConsole();
|
|
||||||
void ChangeFrequency(wxCommandEvent& event);
|
|
||||||
void DoChangeFrequency();
|
|
||||||
void ChangePreset(wxCommandEvent& event);
|
|
||||||
void DoChangePreset();
|
|
||||||
|
|
||||||
void Ap(wxCommandEvent& event);
|
wxPanel *m_MainPanel;
|
||||||
void Am(wxCommandEvent& event);
|
|
||||||
void Bp(wxCommandEvent& event);
|
|
||||||
void Bm(wxCommandEvent& event);
|
|
||||||
|
|
||||||
CPBView* m_GPRListView;
|
wxCheckBox *m_Check[7];
|
||||||
|
|
||||||
int gUpdFreq;
|
// WARNING: Make sure these are not also elsewhere
|
||||||
bool bInfoLog;
|
enum
|
||||||
bool bPrimLog;
|
{
|
||||||
|
ID_MAINPANEL = 2000,
|
||||||
|
|
||||||
|
ID_SAVETOFILE,
|
||||||
|
ID_SHOWCONSOLE,
|
||||||
|
ID_INFOLOG,
|
||||||
|
ID_PRIMLOG,
|
||||||
|
ID_SAVETEXTURES,
|
||||||
|
ID_SAVETARGETS,
|
||||||
|
ID_SAVESHADERS,
|
||||||
|
NUM_OPTIONS
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
void OnShow(wxShowEvent& event);
|
||||||
|
void OnClose(wxCloseEvent& event);
|
||||||
// declarations
|
void CreateGUIControls();
|
||||||
wxNotebook *m_Notebook; // notebook
|
|
||||||
wxPanel *m_PageMain;
|
|
||||||
|
|
||||||
wxCheckBox *m_Check[7];
|
|
||||||
wxCheckListBox * m_options, * m_settings;
|
|
||||||
wxRadioButton *m_Radio[5];
|
|
||||||
wxRadioBox *m_RadioBox[3];
|
|
||||||
wxStaticBox *m_Label[2];
|
|
||||||
wxPanel *m_Controller;
|
|
||||||
|
|
||||||
// WARNING: Make sure these are not also elsewhere, for example in resource.h.
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
ID_NOTEBOOK = 2000, ID_PAGEMAIN, // notebook
|
|
||||||
|
|
||||||
ID_SAVETOFILE, ID_SHOWCONSOLE, // options
|
|
||||||
IDC_CHECK2,
|
|
||||||
IDC_CHECK3,
|
|
||||||
IDC_CHECK4,
|
|
||||||
IDC_CHECK5,
|
|
||||||
IDC_CHECK6,
|
|
||||||
IDC_CHECK7,
|
|
||||||
IDC_CHECK8,
|
|
||||||
IDC_CHECK9,
|
|
||||||
|
|
||||||
ID_CHECKLIST1,
|
|
||||||
|
|
||||||
IDC_RADIO0,
|
|
||||||
IDC_RADIO1,
|
|
||||||
IDC_RADIO2,
|
|
||||||
IDC_RADIO3,
|
|
||||||
|
|
||||||
IDG_LABEL1,
|
|
||||||
IDG_LABEL2,
|
|
||||||
|
|
||||||
ID_UPD,
|
|
||||||
ID_AP,
|
|
||||||
ID_AM,
|
|
||||||
ID_BP,
|
|
||||||
ID_BM,
|
|
||||||
ID_GPR,
|
|
||||||
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void OnShow(wxShowEvent& event);
|
|
||||||
void OnClose(wxCloseEvent& event);
|
|
||||||
void CreateGUIControls();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,224 +0,0 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Licensetype: GNU General Public License (GPL)
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, version 2.0.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License 2.0 for more details.
|
|
||||||
//
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
|
||||||
// If not, see http://www.gnu.org/licenses/
|
|
||||||
//
|
|
||||||
// Official SVN repository and contact information can be found at
|
|
||||||
// http://code.google.com/p/dolphin-emu/
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "../Globals.h" // This is the precompiled header and must be the first ...
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <vector>
|
|
||||||
#include <string> // so that we can test std::string == abc
|
|
||||||
#include <math.h> // for the pow() function
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../GLUtil.h"
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
#include "../Debugger/Debugger.h" // For the CDebugger class
|
|
||||||
#include "../Debugger/PBView.h"
|
|
||||||
#include "ConsoleWindow.h" // Open and close console, clear console window
|
|
||||||
#endif
|
|
||||||
#include "../Debugger/Logging.h" // For global logging values
|
|
||||||
|
|
||||||
// Externals
|
|
||||||
extern int nFiles;
|
|
||||||
float ratioFactor; // a global to get the ratio factor from MixAdd
|
|
||||||
int gPreset = 0;
|
|
||||||
u32 gLastBlock;
|
|
||||||
extern bool gSSBM;
|
|
||||||
extern bool gSSBMremedy1;
|
|
||||||
extern bool gSSBMremedy2;
|
|
||||||
extern bool gSequenced;
|
|
||||||
extern bool gReset;
|
|
||||||
bool gOnlyLooping = false;
|
|
||||||
//extern int gleft, gright, gtop, gbottom; // from BPStructs.cpp
|
|
||||||
|
|
||||||
int j = 0;
|
|
||||||
int k = 0;
|
|
||||||
bool iupdonce = false;
|
|
||||||
std::vector<u16> viupd(15); // the length of the update frequency bar
|
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
extern CDebugger* m_frame;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
std::string writeTitle(int a)
|
|
||||||
{
|
|
||||||
std::string b;
|
|
||||||
if(a == 0)
|
|
||||||
{
|
|
||||||
b = "lef rig top bot | wid hei\n";
|
|
||||||
}
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write main message (presets)
|
|
||||||
std::string writeMessage(int a, int i)
|
|
||||||
{
|
|
||||||
char buf [1000] = "";
|
|
||||||
std::string sbuf;
|
|
||||||
|
|
||||||
/*
|
|
||||||
PRESET 0
|
|
||||||
"lef rig top bot | xof yof\n";
|
|
||||||
"000 000 000 000 | 000 00
|
|
||||||
*/
|
|
||||||
if(a == 0)
|
|
||||||
{
|
|
||||||
sprintf(buf,"%03i %03i %03i %03i | %03i %03i",
|
|
||||||
0, OpenGL_GetWidth(), OpenGL_GetHeight(), 0,
|
|
||||||
OpenGL_GetXoff(), OpenGL_GetYoff());
|
|
||||||
}
|
|
||||||
|
|
||||||
sbuf = buf;
|
|
||||||
return sbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Logging
|
|
||||||
void Logging(int a)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
// Control how often the screen is updated, and then update the screen
|
|
||||||
if(a == 0) j++;
|
|
||||||
//if(l == pow((double)2,32)) l=0; // reset l
|
|
||||||
//l++;
|
|
||||||
if (m_frame->gUpdFreq > 0 && j > (30 / m_frame->gUpdFreq))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
// Write header
|
|
||||||
char buffer [1000] = "";
|
|
||||||
std::string sbuff;
|
|
||||||
sbuff = writeTitle(gPreset);
|
|
||||||
|
|
||||||
|
|
||||||
// hopefully this is false if we don't have a debugging window and so it doesn't cause a crash
|
|
||||||
/* // nothing do do here yet
|
|
||||||
if(m_frame)
|
|
||||||
{
|
|
||||||
m_frame->m_GPRListView->m_CachedRegs[1][0] = 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// add new line
|
|
||||||
sbuff = sbuff + writeMessage(gPreset, 0); strcpy(buffer, "");
|
|
||||||
sbuff = sbuff + "\n";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Write global values
|
|
||||||
// ---------------
|
|
||||||
/*
|
|
||||||
sprintf(buffer, "\nThe parameter blocks span from %08x to %08x | distance %i %i\n", m_addressPBs, gLastBlock, (gLastBlock-m_addressPBs), (gLastBlock-m_addressPBs) / 192);
|
|
||||||
sbuff = sbuff + buffer; strcpy(buffer, "");
|
|
||||||
*/
|
|
||||||
// ===============
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
|
||||||
// Write settings
|
|
||||||
// ---------------
|
|
||||||
/*
|
|
||||||
sprintf(buffer, "\nSettings: SSBM fix %i | SSBM rem1 %i | SSBM rem2 %i | Sequenced %i | Reset %i | Only looping %i | Save file %i\n",
|
|
||||||
gSSBM, gSSBMremedy1, gSSBMremedy2, gSequenced, gReset, gOnlyLooping, gSaveFile);
|
|
||||||
sbuff = sbuff + buffer; strcpy(buffer, "");
|
|
||||||
*/
|
|
||||||
// ===============
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
|
||||||
// Show update frequency
|
|
||||||
// ---------------
|
|
||||||
sbuff = sbuff + "\n";
|
|
||||||
if(!iupdonce)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
for (int i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
viupd.at(i) == 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
viupd.at(0) = 1;
|
|
||||||
viupd.at(1) = 1;
|
|
||||||
viupd.at(2) = 1;
|
|
||||||
iupdonce = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (u32 i = 0; i < viupd.size(); i++) // 0, 1,..., 9
|
|
||||||
{
|
|
||||||
if (i < viupd.size()-1)
|
|
||||||
{
|
|
||||||
viupd.at(viupd.size()-i-1) = viupd.at(viupd.size()-i-2); // move all forward
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
viupd.at(0) = viupd.at(viupd.size()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Correction
|
|
||||||
if (viupd.at(viupd.size()-3) == 1 && viupd.at(viupd.size()-2) == 1 && viupd.at(viupd.size()-1) == 1)
|
|
||||||
{
|
|
||||||
viupd.at(0) = 0;
|
|
||||||
}
|
|
||||||
if(viupd.at(0) == 0 && viupd.at(1) == 1 && viupd.at(2) == 1 && viupd.at(3) == 0)
|
|
||||||
{
|
|
||||||
viupd.at(0) = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (u32 i = 0; i < viupd.size(); i++)
|
|
||||||
{
|
|
||||||
if(viupd.at(i) == 0)
|
|
||||||
sbuff = sbuff + " ";
|
|
||||||
else
|
|
||||||
sbuff = sbuff + ".";
|
|
||||||
}
|
|
||||||
// ================
|
|
||||||
|
|
||||||
|
|
||||||
// =======================================================================================
|
|
||||||
// Print
|
|
||||||
// ----------------
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
Console::ClearScreen();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LOG(VIDEO, "%s", sbuff.c_str());
|
|
||||||
sbuff.clear(); strcpy(buffer, "");
|
|
||||||
// ================
|
|
||||||
|
|
||||||
|
|
||||||
// New values are written so update - DISABLED - It flickered a lot, even worse than a
|
|
||||||
// console window. So for now only the console windows is updated.
|
|
||||||
/*
|
|
||||||
if(m_frame)
|
|
||||||
{
|
|
||||||
m_frame->NotifyUpdate();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
k=0;
|
|
||||||
j=0;
|
|
||||||
|
|
||||||
} // end of if (j>20)
|
|
||||||
|
|
||||||
} // end of function
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, version 2.0.
|
|
||||||
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License 2.0 for more details.
|
|
||||||
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
|
||||||
// If not, see http://www.gnu.org/licenses/
|
|
||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
|
||||||
// http://code.google.com/p/dolphin-emu/
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Declarations and definitions
|
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
|
||||||
void Logging(int a);
|
|
||||||
void OpenConsole();
|
|
||||||
void CloseConsole();
|
|
||||||
////////////////////////////////
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, version 2.0.
|
|
||||||
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License 2.0 for more details.
|
|
||||||
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
|
||||||
// If not, see http://www.gnu.org/licenses/
|
|
||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
|
||||||
// http://code.google.com/p/dolphin-emu/
|
|
||||||
|
|
||||||
#include "../Globals.h"
|
|
||||||
#include "PBView.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
extern const char* GetGRPName(unsigned int index);
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(CPBView, wxListCtrl)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
CPBView::CPBView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
|
|
||||||
: wxListCtrl(parent, id, pos, size, style)
|
|
||||||
{
|
|
||||||
InsertColumn(0, wxT("Block"), wxLIST_FORMAT_CENTER, 40);
|
|
||||||
|
|
||||||
SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Segoe UI")));
|
|
||||||
|
|
||||||
for (int i = 0; i < 1; i++)
|
|
||||||
{
|
|
||||||
// Print values from 0 to 63
|
|
||||||
char buffer [33];
|
|
||||||
sprintf(buffer, "%02i", i);
|
|
||||||
int Item = InsertItem(0, wxString::FromAscii(buffer));
|
|
||||||
|
|
||||||
|
|
||||||
wxListItem item;
|
|
||||||
item.SetId(Item);
|
|
||||||
item.SetBackgroundColour(0xFFFFFF);
|
|
||||||
item.SetData(i);
|
|
||||||
SetItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is a wx call that leads to MSWDrawSubItem
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPBView::Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
|
|
||||||
}
|
|
||||||
#ifdef _WIN32
|
|
||||||
bool CPBView::MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem)
|
|
||||||
{
|
|
||||||
bool Result = false;
|
|
||||||
|
|
||||||
// don't change 0, it has the block values
|
|
||||||
if(subitem > 0)
|
|
||||||
{
|
|
||||||
#ifdef __WXMSW__ // what's this? should I use that?
|
|
||||||
const wxChar* bgColor = _T("#ffffff");
|
|
||||||
wxBrush bgBrush(bgColor);
|
|
||||||
wxPen bgPen(bgColor);
|
|
||||||
|
|
||||||
wxRect SubItemRect;
|
|
||||||
this->GetSubItemRect(item, subitem, SubItemRect);
|
|
||||||
rPainDC.SetBrush(bgBrush);
|
|
||||||
rPainDC.SetPen(bgPen);
|
|
||||||
rPainDC.DrawRectangle(SubItemRect);
|
|
||||||
#endif
|
|
||||||
// A somewhat primitive attempt to show the playing history for a certain block.
|
|
||||||
|
|
||||||
wxString text;
|
|
||||||
if(subitem == 1)
|
|
||||||
{
|
|
||||||
char cbuff [33];
|
|
||||||
|
|
||||||
sprintf(cbuff, "%08i", m_CachedRegs[subitem][item]);
|
|
||||||
std::string c = cbuff;
|
|
||||||
int n[8];
|
|
||||||
|
|
||||||
for (int j = 0; j < 8; j++)
|
|
||||||
{
|
|
||||||
|
|
||||||
n[j] = atoi( c.substr(j, 1).c_str());
|
|
||||||
// 149 = dot, 160 = space
|
|
||||||
if (n[j] == 1){
|
|
||||||
n[j] = 149;} else {n[j] = 160;}
|
|
||||||
}
|
|
||||||
// pretty neat huh?
|
|
||||||
text.Printf(wxT("%c%c%c%c%c%c%c%c"), n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text.Printf(wxT("0x%08x"), m_CachedRegs[subitem][item]);
|
|
||||||
}
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
rPainDC.DrawText(text, SubItemRect.GetLeft() + 10, SubItemRect.GetTop() + 4);
|
|
||||||
#else
|
|
||||||
// May not show up pretty in !Win32
|
|
||||||
rPainDC.DrawText(text, 10, 4);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// what does this mean?
|
|
||||||
return Result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, version 2.0.
|
|
||||||
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License 2.0 for more details.
|
|
||||||
|
|
||||||
// A copy of the GPL 2.0 should have been included with the program.
|
|
||||||
// If not, see http://www.gnu.org/licenses/
|
|
||||||
|
|
||||||
// Official SVN repository and contact information can be found at
|
|
||||||
// http://code.google.com/p/dolphin-emu/
|
|
||||||
|
|
||||||
#ifndef __PBView_h__
|
|
||||||
#define __PBView_h__
|
|
||||||
|
|
||||||
#include <wx/listctrl.h>
|
|
||||||
#include <wx/dcclient.h>
|
|
||||||
|
|
||||||
#include "Common.h"
|
|
||||||
|
|
||||||
class CPBView : public wxListCtrl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CPBView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
|
|
||||||
void Update();
|
|
||||||
u32 m_CachedRegs[10][10];
|
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
bool m_CachedRegHasChanged[64];
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
virtual bool MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem);
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -294,11 +294,11 @@ void ConfigDialog::CreateGUIControls()
|
|||||||
sbRendering->Add(sRenderBoxRow1);
|
sbRendering->Add(sRenderBoxRow1);
|
||||||
sAdvanced->Add(sbRendering, 0, wxEXPAND|wxALL, 5);
|
sAdvanced->Add(sbRendering, 0, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
sUtilities = new wxGridBagSizer(0, 0);
|
sUtilities = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sUtilities->Add(m_DumpTextures, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_DumpTextures, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sUtilities->Add(m_TexturePath, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
|
sUtilities->Add(m_TexturePath, 1, wxALL|wxEXPAND, 5);
|
||||||
sbUtilities->Add(sUtilities);
|
sbUtilities->Add(sUtilities, 1, wxEXPAND);
|
||||||
sAdvanced->Add(sbUtilities, 0, wxEXPAND|wxALL, 5);
|
sAdvanced->Add(sbUtilities, 1, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
sHacks = new wxGridBagSizer(0, 0);
|
sHacks = new wxGridBagSizer(0, 0);
|
||||||
sHacks->Add(m_ProjectionHax1, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
sHacks->Add(m_ProjectionHax1, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class ConfigDialog : public wxDialog
|
|||||||
wxStaticBoxSizer* sbRendering;
|
wxStaticBoxSizer* sbRendering;
|
||||||
wxGridBagSizer* sRendering;
|
wxGridBagSizer* sRendering;
|
||||||
wxStaticBoxSizer* sbUtilities;
|
wxStaticBoxSizer* sbUtilities;
|
||||||
wxGridBagSizer* sUtilities;
|
wxBoxSizer* sUtilities;
|
||||||
wxStaticBoxSizer* sbHacks;
|
wxStaticBoxSizer* sbHacks;
|
||||||
wxGridBagSizer* sHacks;
|
wxGridBagSizer* sHacks;
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,7 @@ extern bool LocalLogFile;
|
|||||||
// A global plugin specification
|
// A global plugin specification
|
||||||
extern PLUGIN_GLOBALS* globals;
|
extern PLUGIN_GLOBALS* globals;
|
||||||
|
|
||||||
|
void OpenConsole();
|
||||||
|
void CloseConsole();
|
||||||
|
|
||||||
#endif // _GLOBALS_H
|
#endif // _GLOBALS_H
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader()
|
|||||||
if (g_Config.iLog & CONF_SAVESHADERS && code) {
|
if (g_Config.iLog & CONF_SAVESHADERS && code) {
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
char szTemp[MAX_PATH];
|
char szTemp[MAX_PATH];
|
||||||
sprintf(szTemp, "%s/ps_%04i.txt", g_Config.texDumpPath, counter++);
|
sprintf(szTemp, "%s/ps_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||||
|
|
||||||
SaveData(szTemp, code);
|
SaveData(szTemp, code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
#include "VertexLoader.h"
|
#include "VertexLoader.h"
|
||||||
#include "XFB.h"
|
#include "XFB.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "Debugger/Logging.h" // for Logging()
|
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
#include "Debugger/Debugger.h" // for the CDebugger class
|
#include "Debugger/Debugger.h" // for the CDebugger class
|
||||||
@@ -923,11 +922,6 @@ void Renderer::SwapBuffers()
|
|||||||
fpscount = 0;
|
fpscount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write logging data to debugger
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
if (m_frame)
|
|
||||||
Logging(0);
|
|
||||||
#endif
|
|
||||||
if (g_Config.bOverlayStats) {
|
if (g_Config.bOverlayStats) {
|
||||||
char st[2048];
|
char st[2048];
|
||||||
char *p = st;
|
char *p = st;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ FRAGMENTSHADER& GetOrCreateEncodingShader(u32 format)
|
|||||||
if (g_Config.iLog & CONF_SAVESHADERS && shader) {
|
if (g_Config.iLog & CONF_SAVESHADERS && shader) {
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
char szTemp[MAX_PATH];
|
char szTemp[MAX_PATH];
|
||||||
sprintf(szTemp, "%s/enc_%04i.txt", g_Config.texDumpPath, counter++);
|
sprintf(szTemp, "%s/enc_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||||
|
|
||||||
SaveData(szTemp, shader);
|
SaveData(szTemp, shader);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,10 +205,10 @@ void Flush()
|
|||||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||||
TextureMngr::EnableTex2D(i);
|
TextureMngr::EnableTex2D(i);
|
||||||
}
|
}
|
||||||
if (g_Config.iLog & CONF_PRIMLOG) {
|
if (g_Config.iLog & CONF_SAVETEXTURES) {
|
||||||
// save the textures
|
// save the textures
|
||||||
char strfile[255];
|
char strfile[255];
|
||||||
sprintf(strfile, "frames/tex%.3d_%d.tga", g_Config.iSaveTargetId, i);
|
sprintf(strfile, "%sframes/tex%.3d_%d.tga", FULL_DUMP_DIR, g_Config.iSaveTargetId, i);
|
||||||
SaveTexture(strfile, tentry->isNonPow2?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D, tentry->texture, tentry->w, tentry->h);
|
SaveTexture(strfile, tentry->isNonPow2?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D, tentry->texture, tentry->w, tentry->h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -269,20 +269,20 @@ void Flush()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||||
if (g_Config.iLog & CONF_PRIMLOG) {
|
if (g_Config.iLog & CONF_SAVESHADERS) {
|
||||||
// save the shaders
|
// save the shaders
|
||||||
char strfile[255];
|
char strfile[255];
|
||||||
sprintf(strfile, "frames/ps%.3d.txt", g_Config.iSaveTargetId);
|
sprintf(strfile, "%sframes/ps%.3d.txt", FULL_DUMP_DIR, g_Config.iSaveTargetId);
|
||||||
std::ofstream fps(strfile);
|
std::ofstream fps(strfile);
|
||||||
fps << ps->strprog.c_str();
|
fps << ps->strprog.c_str();
|
||||||
sprintf(strfile, "frames/vs%.3d.txt", g_Config.iSaveTargetId);
|
sprintf(strfile, "%sframes/vs%.3d.txt", FULL_DUMP_DIR, g_Config.iSaveTargetId);
|
||||||
std::ofstream fvs(strfile);
|
std::ofstream fvs(strfile);
|
||||||
fvs << vs->strprog.c_str();
|
fvs << vs->strprog.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Config.iLog & CONF_SAVETARGETS) {
|
if (g_Config.iLog & CONF_SAVETARGETS) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str, "frames/targ%.3d.tga", g_Config.iSaveTargetId);
|
sprintf(str, "%sframes/targ%.3d.tga", FULL_DUMP_DIR, g_Config.iSaveTargetId);
|
||||||
Renderer::SaveRenderTarget(str, 0);
|
Renderer::SaveRenderTarget(str, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ VERTEXSHADER* VertexShaderCache::GetShader(u32 components)
|
|||||||
if (g_Config.iLog & CONF_SAVESHADERS && code) {
|
if (g_Config.iLog & CONF_SAVESHADERS && code) {
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
char szTemp[MAX_PATH];
|
char szTemp[MAX_PATH];
|
||||||
sprintf(szTemp, "%s/vs_%04i.txt", g_Config.texDumpPath, counter++);
|
sprintf(szTemp, "%s/vs_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||||
|
|
||||||
SaveData(szTemp, code);
|
SaveData(szTemp, code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,29 +101,22 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
as the one that is rendering the game. However, that could be done. */
|
as the one that is rendering the game. However, that could be done. */
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
CDebugger* m_frame;
|
CDebugger *m_frame;
|
||||||
void DllDebugger(HWND _hParent, bool Show)
|
void DllDebugger(HWND _hParent, bool Show)
|
||||||
{
|
{
|
||||||
if(m_frame && Show) // if we have created it, let us show it again
|
if(!m_frame && Show)
|
||||||
{
|
|
||||||
m_frame->DoShow();
|
|
||||||
}
|
|
||||||
else if(!m_frame && Show)
|
|
||||||
{
|
{
|
||||||
m_frame = new CDebugger(NULL);
|
m_frame = new CDebugger(NULL);
|
||||||
m_frame->Show();
|
m_frame->Show();
|
||||||
}
|
}
|
||||||
else if(m_frame && !Show)
|
else if (m_frame && !Show)
|
||||||
{
|
{
|
||||||
m_frame->DoHide();
|
if(m_frame->Close())
|
||||||
|
m_frame = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoDllDebugger()
|
void DoDllDebugger(){}
|
||||||
{
|
|
||||||
//m_frame = new CDebugger(NULL);
|
|
||||||
//m_frame->Show();
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
void DllDebugger(HWND _hParent, bool Show) { }
|
void DllDebugger(HWND _hParent, bool Show) { }
|
||||||
void DoDllDebugger() { }
|
void DoDllDebugger() { }
|
||||||
@@ -156,7 +149,6 @@ void DllConfig(HWND _hParent)
|
|||||||
#endif
|
#endif
|
||||||
//win->Reparent(wxGetApp().GetTopWindow());
|
//win->Reparent(wxGetApp().GetTopWindow());
|
||||||
ConfigDialog *frame = new ConfigDialog(win);
|
ConfigDialog *frame = new ConfigDialog(win);
|
||||||
g_Config.Load();
|
|
||||||
OpenGL_AddBackends(frame);
|
OpenGL_AddBackends(frame);
|
||||||
OpenGL_AddResolutions(frame);
|
OpenGL_AddResolutions(frame);
|
||||||
frame->ShowModal();
|
frame->ShowModal();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,12 +18,6 @@
|
|||||||
#ifndef _CONFIG_H
|
#ifndef _CONFIG_H
|
||||||
#define _CONFIG_H
|
#define _CONFIG_H
|
||||||
|
|
||||||
#define CONF_LOG 1
|
|
||||||
#define CONF_PRIMLOG 2
|
|
||||||
#define CONF_SAVETEXTURES 4
|
|
||||||
#define CONF_SAVETARGETS 8
|
|
||||||
#define CONF_SAVESHADERS 16
|
|
||||||
|
|
||||||
struct Config
|
struct Config
|
||||||
{
|
{
|
||||||
Config();
|
Config();
|
||||||
|
|||||||
Reference in New Issue
Block a user