dolphin/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.h

132 lines
3.3 KiB
C
Raw Normal View History

Added the StretchToFit option to the config menu in the OpenGL plugin. This fixes the blackness in SSBM. I also added a keep aspect ratio option, it will keep your aspect ratio at 4:3, but then SSBM will have the blackness problem again. You find the options under the Enhancements window in the OpenGL configuration. I also added a wx debugging window for the OpenGL plugin. I connected it to the old console window that was in the plugin. Other than that it doesn't do anything at the moment but it could be useful to show all the current important information and parameter statuses and so on. Again there's a problem with wx windows collisions. Show() can't be used because then DLL_PROCESS_DETACH is called immediately after the window is opened, and if we open it with ShowModal() before we have loaded a game the main video window will be blocked. And we can't pass on any variables from a DllDebugger() that is called when Dolphin is started because the dll is reloaded and lose all variables sometime before a game is loaded. So we can't auto open the window that way. So I made the debugging window open as a game is loaded if it is enabled in the ini, the downside is that the ini setting will open the window even if we are not opening Dolphin with the -d flag. However, this will only affect people that have used the debugger at least once so in my opinion this is the most convenient solution. But feel free to come up with a better solution. Preferably some solution to how to use Show() and preventing DLL_PROCESS_DETACH to be called. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@812 8ced0084-cf51-0410-be5f-012b33b47a6e
2008-10-09 18:47:53 +00:00
//////////////////////////////////////////////////////////////////////////////////////////
//
// 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/
//
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CDebugger_h__
#define __CDebugger_h__
// wx stuff, I'm not sure if we use all these
#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 "../Globals.h"
class CPBView;
class IniFile;
// Window settings - I'm not sure what these do. I just copied them gtom elsewhere basically.
#undef CDebugger_STYLE
#define CDebugger_STYLE wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE
class CDebugger : public wxDialog
{
private:
DECLARE_EVENT_TABLE();
public:
CDebugger(wxWindow *parent, wxWindowID id = 1, const wxString &title = _("Sound Debugger"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = CDebugger_STYLE);
virtual ~CDebugger();
void Save(IniFile& _IniFile) const;
void Load(IniFile& _IniFile);
void NotifyUpdate();
void OnUpdate(wxCommandEvent& event);
void SaveFile(wxCommandEvent& event);
void ShowHideConsole(wxCommandEvent& event);
void DoShowHideConsole();
void ChangeFrequency(wxCommandEvent& event);
void DoChangeFrequency();
void ChangePreset(wxCommandEvent& event);
void DoChangePreset();
void Ap(wxCommandEvent& event);
void Am(wxCommandEvent& event);
void Bp(wxCommandEvent& event);
void Bm(wxCommandEvent& event);
CPBView* m_GPRListView;
private:
// declarations
wxCheckBox *m_Check[6];
wxRadioButton *m_Radio[5];
wxRadioBox *m_RadioBox[3];
wxStaticBox *m_Label[1];
wxPanel *m_Controller;
// WARNING: Make sure these are not also elsewhere, for example in resource.h.
enum
{
IDC_CHECK0 = 2000,
IDC_CHECK1,
IDC_CHECK2,
IDC_CHECK3,
IDC_CHECK4,
IDC_CHECK5,
IDC_CHECK6,
IDC_CHECK7,
IDC_CHECK8,
IDC_CHECK9,
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