finish proper window handling, fix the modal state of the config dialogs, plus some minor cleanup/changes :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5129 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4915097d93
commit
816febd3b0
|
@ -317,7 +317,7 @@ void *CPluginManager::LoadPlugin(const char *_rFilename)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that the plugin has both all the common and all the type specific functions
|
// Check that the plugin has all the common and all the type specific functions
|
||||||
if (!plugin->IsValid())
|
if (!plugin->IsValid())
|
||||||
{
|
{
|
||||||
PanicAlert("Can't open %s, it has a missing function", _rFilename);
|
PanicAlert("Can't open %s, it has a missing function", _rFilename);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(AboutDolphin, wxDialog)
|
BEGIN_EVENT_TABLE(AboutDolphin, wxDialog)
|
||||||
EVT_CLOSE(AboutDolphin::OnClose)
|
EVT_CLOSE(AboutDolphin::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE, AboutDolphin::CloseClick)
|
EVT_BUTTON(wxID_CLOSE, AboutDolphin::CloseClick)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
|
@ -38,7 +38,7 @@ AboutDolphin::~AboutDolphin()
|
||||||
|
|
||||||
void AboutDolphin::CreateGUIControls()
|
void AboutDolphin::CreateGUIControls()
|
||||||
{
|
{
|
||||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
//miloszwl@miloszwl.com (miloszwl.deviantart.com)
|
//miloszwl@miloszwl.com (miloszwl.deviantart.com)
|
||||||
|
|
||||||
wxMemoryInputStream istream(dolphin_logo_png, sizeof dolphin_logo_png);
|
wxMemoryInputStream istream(dolphin_logo_png, sizeof dolphin_logo_png);
|
||||||
|
@ -79,8 +79,8 @@ void AboutDolphin::CreateGUIControls()
|
||||||
this->SetSizer(sMain);
|
this->SetSizer(sMain);
|
||||||
sMain->Layout();
|
sMain->Layout();
|
||||||
|
|
||||||
CenterOnParent();
|
|
||||||
Fit();
|
Fit();
|
||||||
|
CenterOnParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutDolphin::OnClose(wxCloseEvent& WXUNUSED (event))
|
void AboutDolphin::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
|
|
|
@ -29,7 +29,7 @@ class AboutDolphin : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AboutDolphin(wxWindow *parent,
|
AboutDolphin(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("About Dolphin"),
|
const wxString &title = wxT("About Dolphin"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -52,8 +52,7 @@ class AboutDolphin : public wxDialog
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_CLOSE = 1000,
|
ID_LOGO = 1000,
|
||||||
ID_LOGO,
|
|
||||||
ID_MESSAGE
|
ID_MESSAGE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
|
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
|
||||||
, m_LogWindow(NULL)
|
, m_LogWindow(NULL)
|
||||||
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
|
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
|
||||||
, m_bModalDialogOpen(false), m_bControlsCreated(false), m_StopDlg(NULL)
|
, m_bControlsCreated(false), m_StopDlg(NULL)
|
||||||
#if wxUSE_TIMER
|
#if wxUSE_TIMER
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
|
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
|
||||||
|
@ -610,10 +610,15 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
case SC_SCREENSAVE:
|
case SC_SCREENSAVE:
|
||||||
case SC_MONITORPOWER:
|
case SC_MONITORPOWER:
|
||||||
return 0;
|
break;
|
||||||
|
default:
|
||||||
|
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -928,13 +933,13 @@ void X11_ShowFullScreen(bool bF)
|
||||||
void CFrame::DoFullscreen(bool bF)
|
void CFrame::DoFullscreen(bool bF)
|
||||||
{
|
{
|
||||||
#if defined HAVE_X11 && HAVE_X11
|
#if defined HAVE_X11 && HAVE_X11
|
||||||
if ((Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
|
if ((Core::GetState() == Core::CORE_RUN))
|
||||||
X11_ShowFullScreen(bF);
|
X11_ShowFullScreen(bF);
|
||||||
#endif
|
#endif
|
||||||
// Only switch this to fullscreen if we're rendering to main AND if we're running a game
|
// Only switch this to fullscreen if we're rendering to main AND if we're running a game
|
||||||
// plus if a modal dialog is open, this will still process the keyboard events, and may cause
|
// plus if a modal dialog is open, this will still process the keyboard events, and may cause
|
||||||
// the main window to become unresponsive, so we have to avoid that.
|
// the main window to become unresponsive, so we have to avoid that.
|
||||||
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen)
|
if ((bRenderToMain && Core::GetState() == Core::CORE_RUN))
|
||||||
{
|
{
|
||||||
ShowFullScreen(bF);
|
ShowFullScreen(bF);
|
||||||
|
|
||||||
|
@ -1055,4 +1060,4 @@ void CFrame::ListTopWindows()
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
NOTICE_LOG(CONSOLE, "\n");
|
NOTICE_LOG(CONSOLE, "\n");
|
||||||
}
|
}
|
|
@ -199,7 +199,6 @@ class CFrame : public wxFrame
|
||||||
bool m_bEdit;
|
bool m_bEdit;
|
||||||
bool m_bTabSplit;
|
bool m_bTabSplit;
|
||||||
bool m_bNoDocking;
|
bool m_bNoDocking;
|
||||||
bool m_bModalDialogOpen;
|
|
||||||
bool m_bControlsCreated;
|
bool m_bControlsCreated;
|
||||||
char newDiscpath[2048];
|
char newDiscpath[2048];
|
||||||
wxMessageDialog *m_StopDlg;
|
wxMessageDialog *m_StopDlg;
|
||||||
|
|
|
@ -282,6 +282,7 @@ void CMemcardManager::CreateGUIControls()
|
||||||
this->SetSizer(sMain);
|
this->SetSizer(sMain);
|
||||||
sMain->SetSizeHints(this);
|
sMain->SetSizeHints(this);
|
||||||
Fit();
|
Fit();
|
||||||
|
Center();
|
||||||
|
|
||||||
for (int i = SLOT_A; i < SLOT_B + 1; i++)
|
for (int i = SLOT_A; i < SLOT_B + 1; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,12 +47,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CMemcardManager
|
class CMemcardManager : public wxDialog
|
||||||
: public wxDialog
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CMemcardManager(wxWindow *parent, wxWindowID id = 1, const wxString& title = wxT(MEMCARDMAN_TITLE),
|
CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxT(MEMCARDMAN_TITLE),
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE);
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE);
|
||||||
virtual ~CMemcardManager();
|
virtual ~CMemcardManager();
|
||||||
|
|
||||||
|
|
|
@ -25,16 +25,13 @@ BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
|
||||||
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
|
||||||
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
|
||||||
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
|
||||||
EVT_CHOICE(wxID_ANY, DSPConfigDialogHLE::BackendChanged)
|
EVT_CHOICE(ID_BACKEND, DSPConfigDialogHLE::BackendChanged)
|
||||||
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
|
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
// Center window
|
|
||||||
CenterOnParent();
|
|
||||||
|
|
||||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
||||||
|
@ -94,6 +91,9 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
|
||||||
sButtons->Add(m_OK, 0, wxALL, 1);
|
sButtons->Add(m_OK, 0, wxALL, 1);
|
||||||
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
||||||
SetSizerAndFit(sMain);
|
SetSizerAndFit(sMain);
|
||||||
|
|
||||||
|
// Center window
|
||||||
|
CenterOnParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add audio output options
|
// Add audio output options
|
||||||
|
|
|
@ -28,7 +28,7 @@ class DSPConfigDialogHLE : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DSPConfigDialogHLE(wxWindow *parent,
|
DSPConfigDialogHLE(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Dolphin DSP-HLE Plugin Settings"),
|
const wxString &title = wxT("Dolphin DSP-HLE Plugin Settings"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -52,7 +52,6 @@ private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxID_OK,
|
|
||||||
ID_ENABLE_HLE_AUDIO,
|
ID_ENABLE_HLE_AUDIO,
|
||||||
ID_ENABLE_DTK_MUSIC,
|
ID_ENABLE_DTK_MUSIC,
|
||||||
ID_ENABLE_THROTTLE,
|
ID_ENABLE_THROTTLE,
|
||||||
|
|
|
@ -99,8 +99,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -147,12 +145,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||||
_PluginInfo->Version = 0x0100;
|
_PluginInfo->Version = 0x0100;
|
||||||
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
||||||
#ifdef DEBUGFAST
|
#ifdef DEBUGFAST
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin (DebugFast) ");
|
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin (DebugFast) ");
|
||||||
#else
|
#else
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-HLE Plugin ");
|
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin ");
|
||||||
#else
|
#else
|
||||||
sprintf(_PluginInfo ->Name, "Dolphin DSP-HLE Plugin (Debug) ");
|
sprintf_s(_PluginInfo->Name, 100, "Dolphin DSP-HLE Plugin (Debug) ");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -171,28 +169,29 @@ void DllConfig(HWND _hParent)
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
g_Config.GameIniLoad(globals->game_ini);
|
g_Config.GameIniLoad(globals->game_ini);
|
||||||
|
|
||||||
if (!m_ConfigFrame)
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
|
m_ConfigFrame = new DSPConfigDialogHLE(frame);
|
||||||
|
|
||||||
|
// add backends
|
||||||
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||||
|
|
||||||
|
for (std::vector<std::string>::const_iterator iter = backends.begin();
|
||||||
|
iter != backends.end(); ++iter)
|
||||||
{
|
{
|
||||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
m_ConfigFrame->AddBackend((*iter).c_str());
|
||||||
m_ConfigFrame = new DSPConfigDialogHLE(frame);
|
}
|
||||||
|
|
||||||
// add backends
|
// Only allow one open at a time
|
||||||
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
frame->Disable();
|
||||||
|
m_ConfigFrame->ShowModal();
|
||||||
|
frame->Enable();
|
||||||
|
|
||||||
for (std::vector<std::string>::const_iterator iter = backends.begin();
|
m_ConfigFrame->Destroy();
|
||||||
iter != backends.end(); ++iter)
|
m_ConfigFrame = NULL;
|
||||||
{
|
|
||||||
m_ConfigFrame->AddBackend((*iter).c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only allow one open at a time
|
|
||||||
m_ConfigFrame->ShowModal();
|
|
||||||
m_ConfigFrame->Destroy();
|
|
||||||
m_ConfigFrame = NULL;
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
frame->Destroy();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
|
||||||
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
|
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
|
||||||
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
|
||||||
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
|
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
|
||||||
EVT_CHOICE(wxID_ANY, DSPConfigDialogLLE::BackendChanged)
|
EVT_CHOICE(ID_BACKEND, DSPConfigDialogLLE::BackendChanged)
|
||||||
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
|
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
@ -33,9 +33,6 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
||||||
// Load config settings
|
// Load config settings
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
|
|
||||||
// Center window
|
|
||||||
CenterOnParent();
|
|
||||||
|
|
||||||
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
|
||||||
|
@ -89,6 +86,8 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
||||||
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
sMain->Add(sButtons, 0, wxALL|wxEXPAND, 4);
|
||||||
SetSizerAndFit(sMain);
|
SetSizerAndFit(sMain);
|
||||||
|
|
||||||
|
// Center window
|
||||||
|
CenterOnParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add audio output options
|
// Add audio output options
|
||||||
|
|
|
@ -28,7 +28,7 @@ class DSPConfigDialogLLE : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DSPConfigDialogLLE(wxWindow *parent,
|
DSPConfigDialogLLE(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Dolphin DSP-LLE Plugin Settings"),
|
const wxString &title = wxT("Dolphin DSP-LLE Plugin Settings"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -50,7 +50,6 @@ private:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxID_OK,
|
|
||||||
ID_ENABLE_DTK_MUSIC,
|
ID_ENABLE_DTK_MUSIC,
|
||||||
ID_ENABLE_THROTTLE,
|
ID_ENABLE_THROTTLE,
|
||||||
ID_BACKEND,
|
ID_BACKEND,
|
||||||
|
|
|
@ -86,8 +86,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -117,12 +115,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||||
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
_PluginInfo->Type = PLUGIN_TYPE_DSP;
|
||||||
|
|
||||||
#ifdef DEBUGFAST
|
#ifdef DEBUGFAST
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (DebugFast)");
|
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (DebugFast)");
|
||||||
#else
|
#else
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin");
|
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin");
|
||||||
#else
|
#else
|
||||||
sprintf(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
|
sprintf_s(_PluginInfo->Name, "Dolphin DSP-LLE Plugin (Debug)");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -136,29 +134,29 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_ConfigFrame)
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
|
m_ConfigFrame = new DSPConfigDialogLLE(frame);
|
||||||
|
|
||||||
|
// add backends
|
||||||
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||||
|
|
||||||
|
for (std::vector<std::string>::const_iterator iter = backends.begin();
|
||||||
|
iter != backends.end(); ++iter)
|
||||||
{
|
{
|
||||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
m_ConfigFrame->AddBackend((*iter).c_str());
|
||||||
m_ConfigFrame = new DSPConfigDialogLLE(frame);
|
|
||||||
|
|
||||||
// add backends
|
|
||||||
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
|
||||||
|
|
||||||
for (std::vector<std::string>::const_iterator iter = backends.begin();
|
|
||||||
iter != backends.end(); ++iter)
|
|
||||||
{
|
|
||||||
m_ConfigFrame->AddBackend((*iter).c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only allow one open at a time
|
|
||||||
m_ConfigFrame->ShowModal();
|
|
||||||
m_ConfigFrame->Destroy();
|
|
||||||
m_ConfigFrame = NULL;
|
|
||||||
#ifdef _WIN32
|
|
||||||
frame->SetHWND(NULL);
|
|
||||||
#endif
|
|
||||||
delete frame;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only allow one open at a time
|
||||||
|
frame->Disable();
|
||||||
|
m_ConfigFrame->ShowModal();
|
||||||
|
frame->Enable();
|
||||||
|
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
|
m_ConfigFrame = NULL;
|
||||||
|
#ifdef _WIN32
|
||||||
|
frame->SetHWND(NULL);
|
||||||
|
#endif
|
||||||
|
frame->Destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
// The wxWidgets class
|
// The wxWidgets class
|
||||||
BEGIN_EVENT_TABLE(GCPadConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(GCPadConfigDialog,wxDialog)
|
||||||
EVT_CLOSE(GCPadConfigDialog::OnClose)
|
EVT_CLOSE(GCPadConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_OK, GCPadConfigDialog::OnCloseClick)
|
EVT_BUTTON(wxID_OK, GCPadConfigDialog::OnCloseClick)
|
||||||
EVT_BUTTON(ID_CANCEL, GCPadConfigDialog::OnCloseClick)
|
EVT_BUTTON(wxID_CANCEL, GCPadConfigDialog::OnCloseClick)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, GCPadConfigDialog::NotebookPageChanged)
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, GCPadConfigDialog::NotebookPageChanged)
|
||||||
|
|
||||||
EVT_CHOICE(IDC_JOYNAME, GCPadConfigDialog::ChangeSettings)
|
EVT_CHOICE(IDC_JOYNAME, GCPadConfigDialog::ChangeSettings)
|
||||||
|
@ -178,11 +178,11 @@ void GCPadConfigDialog::OnCloseClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case ID_OK:
|
case wxID_OK:
|
||||||
g_Config.Save();
|
g_Config.Save();
|
||||||
Close(); // Call OnClose()
|
Close(); // Call OnClose()
|
||||||
break;
|
break;
|
||||||
case ID_CANCEL:
|
case wxID_CANCEL:
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
Close(); // Call OnClose()
|
Close(); // Call OnClose()
|
||||||
break;
|
break;
|
||||||
|
@ -736,9 +736,9 @@ void GCPadConfigDialog::CreateGUIControls()
|
||||||
m_Controller[i]->SetSizer(m_sMain[i]);
|
m_Controller[i]->SetSizer(m_sMain[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_OK = new wxButton(this, ID_OK, wxT("OK"));
|
m_OK = new wxButton(this, wxID_OK, wxT("OK"));
|
||||||
m_OK->SetToolTip(wxT("Save changes and close"));
|
m_OK->SetToolTip(wxT("Save changes and close"));
|
||||||
m_Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"));
|
m_Cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
|
||||||
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
||||||
wxBoxSizer* m_DlgButton = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* m_DlgButton = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_DlgButton->AddStretchSpacer();
|
m_DlgButton->AddStretchSpacer();
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
class GCPadConfigDialog : public wxDialog
|
class GCPadConfigDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GCPadConfigDialog(wxWindow *parent, wxWindowID id = 1,
|
GCPadConfigDialog(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Gamecube Pad Plugin Configuration"),
|
const wxString &title = wxT("Gamecube Pad Plugin Configuration"),
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE);
|
long style = wxDEFAULT_DIALOG_STYLE);
|
||||||
|
@ -92,9 +92,7 @@ class GCPadConfigDialog : public wxDialog
|
||||||
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
||||||
|
|
||||||
// Dialog controls
|
// Dialog controls
|
||||||
ID_OK = 1000,
|
ID_NOTEBOOK = 1000,
|
||||||
ID_CANCEL,
|
|
||||||
ID_NOTEBOOK,
|
|
||||||
ID_CONTROLLERPAGE1,
|
ID_CONTROLLERPAGE1,
|
||||||
ID_CONTROLLERPAGE2,
|
ID_CONTROLLERPAGE2,
|
||||||
ID_CONTROLLERPAGE3,
|
ID_CONTROLLERPAGE3,
|
||||||
|
|
|
@ -96,8 +96,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -163,17 +161,19 @@ void DllConfig(HWND _hParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_ConfigFrame)
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
{
|
m_ConfigFrame = new GCPadConfigDialog(frame);
|
||||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
|
||||||
m_ConfigFrame = new GCPadConfigDialog(frame);
|
frame->Disable();
|
||||||
m_ConfigFrame->ShowModal();
|
m_ConfigFrame->ShowModal();
|
||||||
m_ConfigFrame->Destroy();
|
frame->Enable();
|
||||||
m_ConfigFrame = NULL;
|
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
|
m_ConfigFrame = NULL;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
frame->Destroy();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,9 +109,6 @@ struct TabDirect3D : public W32Util::Tab
|
||||||
case IDC_WIDESCREEN_HACK:
|
case IDC_WIDESCREEN_HACK:
|
||||||
g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false;
|
g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false;
|
||||||
break;
|
break;
|
||||||
case IDC_WIREFRAME:
|
|
||||||
g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg,IDC_WIREFRAME)) ? true : false;
|
|
||||||
break;
|
|
||||||
case IDC_SAFE_TEXTURE_CACHE:
|
case IDC_SAFE_TEXTURE_CACHE:
|
||||||
g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE)) == 0 ? false : true;
|
g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE)) == 0 ? false : true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -302,7 +302,7 @@ void PixelShaderCache::Init()
|
||||||
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
|
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
|
||||||
|
|
||||||
char cache_filename[MAX_PATH];
|
char cache_filename[MAX_PATH];
|
||||||
sprintf(cache_filename, "%s%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
|
sprintf(cache_filename, "%s%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
|
||||||
PixelShaderCacheInserter inserter;
|
PixelShaderCacheInserter inserter;
|
||||||
int read_items = g_ps_disk_cache.OpenAndRead(cache_filename, &inserter);
|
int read_items = g_ps_disk_cache.OpenAndRead(cache_filename, &inserter);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,10 +129,10 @@ static const D3DBLEND d3dDestFactors[8] =
|
||||||
static const D3DBLENDOP d3dLogincOPop[16] =
|
static const D3DBLENDOP d3dLogincOPop[16] =
|
||||||
{
|
{
|
||||||
D3DBLENDOP_ADD,//0
|
D3DBLENDOP_ADD,//0
|
||||||
D3DBLENDOP_ADD,//1
|
D3DBLENDOP_ADD,//1
|
||||||
D3DBLENDOP_SUBTRACT,//2
|
D3DBLENDOP_SUBTRACT,//2
|
||||||
D3DBLENDOP_ADD,//3
|
D3DBLENDOP_ADD,//3
|
||||||
D3DBLENDOP_REVSUBTRACT,//4
|
D3DBLENDOP_REVSUBTRACT,//4
|
||||||
D3DBLENDOP_ADD,//5
|
D3DBLENDOP_ADD,//5
|
||||||
D3DBLENDOP_MAX,//6
|
D3DBLENDOP_MAX,//6
|
||||||
D3DBLENDOP_ADD,//7
|
D3DBLENDOP_ADD,//7
|
||||||
|
@ -284,7 +284,7 @@ bool Renderer::Init()
|
||||||
|
|
||||||
// TODO: Grab target width from configured resolution?
|
// TODO: Grab target width from configured resolution?
|
||||||
s_target_width = s_backbuffer_width;
|
s_target_width = s_backbuffer_width;
|
||||||
s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f);
|
s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f);
|
||||||
s_LastAA = (g_ActiveConfig.iMultisampleMode > 3)?0:g_ActiveConfig.iMultisampleMode;
|
s_LastAA = (g_ActiveConfig.iMultisampleMode > 3)?0:g_ActiveConfig.iMultisampleMode;
|
||||||
|
|
||||||
switch (s_LastAA)
|
switch (s_LastAA)
|
||||||
|
@ -308,7 +308,7 @@ bool Renderer::Init()
|
||||||
xScale = (float)s_target_width / (float)EFB_WIDTH;
|
xScale = (float)s_target_width / (float)EFB_WIDTH;
|
||||||
yScale = (float)s_target_height / (float)EFB_HEIGHT;
|
yScale = (float)s_target_height / (float)EFB_HEIGHT;
|
||||||
s_Fulltarget_width = s_target_width;
|
s_Fulltarget_width = s_target_width;
|
||||||
s_Fulltarget_height = s_target_height;
|
s_Fulltarget_height = s_target_height;
|
||||||
|
|
||||||
s_LastFrameDumped = false;
|
s_LastFrameDumped = false;
|
||||||
s_AVIDumping = false;
|
s_AVIDumping = false;
|
||||||
|
@ -345,19 +345,17 @@ bool Renderer::Init()
|
||||||
D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x0, 1.0f, 0);
|
D3D::dev->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x0, 1.0f, 0);
|
||||||
D3D::BeginFrame();
|
D3D::BeginFrame();
|
||||||
D3D::SetRenderState(D3DRS_SCISSORTESTENABLE, true);
|
D3D::SetRenderState(D3DRS_SCISSORTESTENABLE, true);
|
||||||
D3D::dev->CreateOffscreenPlainSurface(s_backbuffer_width,s_backbuffer_height, FBManager::GetEFBColorRTSurfaceFormat(), D3DPOOL_SYSTEMMEM, &ScreenShootMEMSurface, NULL );
|
D3D::dev->CreateOffscreenPlainSurface(s_backbuffer_width,s_backbuffer_height, FBManager::GetEFBColorRTSurfaceFormat(), D3DPOOL_SYSTEMMEM, &ScreenShootMEMSurface, NULL );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::Shutdown()
|
void Renderer::Shutdown()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
TeardownDeviceObjects();
|
TeardownDeviceObjects();
|
||||||
D3D::EndFrame();
|
D3D::EndFrame();
|
||||||
D3D::Present();
|
D3D::Present();
|
||||||
D3D::Close();
|
D3D::Close();
|
||||||
|
|
||||||
if (s_AVIDumping)
|
if (s_AVIDumping)
|
||||||
{
|
{
|
||||||
AVIDump::Stop();
|
AVIDump::Stop();
|
||||||
|
@ -415,7 +413,7 @@ void Renderer::DrawDebugText()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::string OSDM22 =
|
std::string OSDM22 =
|
||||||
g_ActiveConfig.bCrop ? " (crop)" : "";
|
g_ActiveConfig.bCrop ? " (crop)" : "";
|
||||||
std::string OSDM3 = g_ActiveConfig.bEFBCopyDisable ? "Disabled" :
|
std::string OSDM3 = g_ActiveConfig.bEFBCopyDisable ? "Disabled" :
|
||||||
g_ActiveConfig.bCopyEFBToTexture ? "To Texture" : "To RAM";
|
g_ActiveConfig.bCopyEFBToTexture ? "To Texture" : "To RAM";
|
||||||
|
|
||||||
|
@ -435,14 +433,14 @@ void Renderer::DrawDebugText()
|
||||||
T1 += (OSDChoice == -2) ? T0.at(1) : "\n";
|
T1 += (OSDChoice == -2) ? T0.at(1) : "\n";
|
||||||
T1 += (OSDChoice == -3) ? T0.at(2) : "\n";
|
T1 += (OSDChoice == -3) ? T0.at(2) : "\n";
|
||||||
T1 += (OSDChoice == -4) ? T0.at(3) : "\n";
|
T1 += (OSDChoice == -4) ? T0.at(3) : "\n";
|
||||||
T1 += (OSDChoice == -5) ? T0.at(4) : "\n";
|
T1 += (OSDChoice == -5) ? T0.at(4) : "\n";
|
||||||
|
|
||||||
// The other settings in cyan
|
// The other settings in cyan
|
||||||
T2 += (OSDChoice != -1) ? T0.at(0) : "\n";
|
T2 += (OSDChoice != -1) ? T0.at(0) : "\n";
|
||||||
T2 += (OSDChoice != -2) ? T0.at(1) : "\n";
|
T2 += (OSDChoice != -2) ? T0.at(1) : "\n";
|
||||||
T2 += (OSDChoice != -3) ? T0.at(2) : "\n";
|
T2 += (OSDChoice != -3) ? T0.at(2) : "\n";
|
||||||
T2 += (OSDChoice != -4) ? T0.at(3) : "\n";
|
T2 += (OSDChoice != -4) ? T0.at(3) : "\n";
|
||||||
T2 += (OSDChoice != -5) ? T0.at(4) : "\n";
|
T2 += (OSDChoice != -5) ? T0.at(4) : "\n";
|
||||||
|
|
||||||
// Render a shadow, and then the text
|
// Render a shadow, and then the text
|
||||||
Renderer::RenderText(T1.c_str(), 21, 21, 0xDD000000);
|
Renderer::RenderText(T1.c_str(), 21, 21, 0xDD000000);
|
||||||
|
@ -570,7 +568,7 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
||||||
|
|
||||||
D3D::dev->SetViewport(&vp);
|
D3D::dev->SetViewport(&vp);
|
||||||
|
|
||||||
EFBRectangle efbRect;
|
EFBRectangle efbRect;
|
||||||
|
|
||||||
LPDIRECT3DTEXTURE9 read_texture = FBManager::GetEFBColorTexture(efbRect);
|
LPDIRECT3DTEXTURE9 read_texture = FBManager::GetEFBColorTexture(efbRect);
|
||||||
RECT destinationrect;
|
RECT destinationrect;
|
||||||
|
@ -584,13 +582,13 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
||||||
sourcerect.right = src_rect.right;
|
sourcerect.right = src_rect.right;
|
||||||
sourcerect.top = src_rect.top;
|
sourcerect.top = src_rect.top;
|
||||||
|
|
||||||
D3D::ChangeSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
D3D::ChangeSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
||||||
D3D::ChangeSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
D3D::ChangeSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
||||||
int SSAAMode = ( g_ActiveConfig.iMultisampleMode > 3 )? 0 : g_ActiveConfig.iMultisampleMode;
|
int SSAAMode = ( g_ActiveConfig.iMultisampleMode > 3 )? 0 : g_ActiveConfig.iMultisampleMode;
|
||||||
|
|
||||||
D3D::drawShadedTexQuad(read_texture,&sourcerect,Renderer::GetFullTargetWidth(),Renderer::GetFullTargetHeight(),PixelShaderCache::GetColorCopyProgram(SSAAMode),(SSAAMode != 0)?VertexShaderCache::GetFSAAVertexShader():VertexShaderCache::GetSimpleVertexShader());
|
D3D::drawShadedTexQuad(read_texture,&sourcerect,Renderer::GetFullTargetWidth(),Renderer::GetFullTargetHeight(),PixelShaderCache::GetColorCopyProgram(SSAAMode),(SSAAMode != 0)?VertexShaderCache::GetFSAAVertexShader():VertexShaderCache::GetSimpleVertexShader());
|
||||||
|
|
||||||
D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER);
|
D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER);
|
||||||
D3D::RefreshSamplerState(0, D3DSAMP_MAGFILTER);
|
D3D::RefreshSamplerState(0, D3DSAMP_MAGFILTER);
|
||||||
|
|
||||||
vp.X = 0;
|
vp.X = 0;
|
||||||
|
@ -638,7 +636,7 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
||||||
ScreenShootMEMSurface->UnlockRect();
|
ScreenShootMEMSurface->UnlockRect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s_LastFrameDumped = true;
|
s_LastFrameDumped = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -674,8 +672,6 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
||||||
OSD::DrawMessages();
|
OSD::DrawMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||||
{
|
{
|
||||||
if (g_bSkipCurrentFrame)
|
if (g_bSkipCurrentFrame)
|
||||||
|
@ -688,7 +684,7 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
|
||||||
Renderer::ResetAPIState();
|
Renderer::ResetAPIState();
|
||||||
// Set the backbuffer as the rendering target
|
// Set the backbuffer as the rendering target
|
||||||
D3D::dev->SetDepthStencilSurface(NULL);
|
D3D::dev->SetDepthStencilSurface(NULL);
|
||||||
D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface());
|
D3D::dev->SetRenderTarget(0, D3D::GetBackBufferSurface());
|
||||||
|
|
||||||
EFBTextureToD3DBackBuffer(sourceRc);
|
EFBTextureToD3DBackBuffer(sourceRc);
|
||||||
|
|
||||||
|
@ -704,13 +700,13 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
|
||||||
);
|
);
|
||||||
|
|
||||||
Swap(0,FIELD_PROGRESSIVE,0,0); // we used to swap the buffer here, now we will wait
|
Swap(0,FIELD_PROGRESSIVE,0,0); // we used to swap the buffer here, now we will wait
|
||||||
// until the XFB pointer is updated by VI
|
// until the XFB pointer is updated by VI
|
||||||
D3D::BeginFrame();
|
D3D::BeginFrame();
|
||||||
Renderer::RestoreAPIState();
|
Renderer::RestoreAPIState();
|
||||||
D3D::dev->SetRenderTarget(0, FBManager::GetEFBColorRTSurface());
|
D3D::dev->SetRenderTarget(0, FBManager::GetEFBColorRTSurface());
|
||||||
D3D::dev->SetDepthStencilSurface(FBManager::GetEFBDepthRTSurface());
|
D3D::dev->SetDepthStencilSurface(FBManager::GetEFBDepthRTSurface());
|
||||||
UpdateViewport();
|
UpdateViewport();
|
||||||
VertexShaderManager::SetViewportChanged();
|
VertexShaderManager::SetViewportChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Renderer::SetScissorRect()
|
bool Renderer::SetScissorRect()
|
||||||
|
@ -734,7 +730,7 @@ bool Renderer::SetScissorRect()
|
||||||
if (rc.left < 0) rc.left = 0;
|
if (rc.left < 0) rc.left = 0;
|
||||||
if (rc.right < 0) rc.right = 0;
|
if (rc.right < 0) rc.right = 0;
|
||||||
if (rc.left > s_target_width) rc.left = s_target_width;
|
if (rc.left > s_target_width) rc.left = s_target_width;
|
||||||
if (rc.right > s_target_width) rc.right = s_target_width;
|
if (rc.right > s_target_width) rc.right = s_target_width;
|
||||||
if (rc.top < 0) rc.top = 0;
|
if (rc.top < 0) rc.top = 0;
|
||||||
if (rc.bottom < 0) rc.bottom = 0;
|
if (rc.bottom < 0) rc.bottom = 0;
|
||||||
if (rc.top > s_target_height) rc.top = s_target_height;
|
if (rc.top > s_target_height) rc.top = s_target_height;
|
||||||
|
@ -886,7 +882,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||||
Renderer::GetFullTargetWidth() ,
|
Renderer::GetFullTargetWidth() ,
|
||||||
Renderer::GetFullTargetHeight(),
|
Renderer::GetFullTargetHeight(),
|
||||||
(BufferFormat == FOURCC_RAWZ)?PixelShaderCache::GetColorMatrixProgram(0):PixelShaderCache::GetDepthMatrixProgram(0),
|
(BufferFormat == FOURCC_RAWZ)?PixelShaderCache::GetColorMatrixProgram(0):PixelShaderCache::GetDepthMatrixProgram(0),
|
||||||
VertexShaderCache::GetSimpleVertexShader());
|
VertexShaderCache::GetSimpleVertexShader());
|
||||||
|
|
||||||
D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER);
|
D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER);
|
||||||
|
|
||||||
|
@ -928,7 +924,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||||
if ((hr = pOffScreenBuffer->LockRect(&drect, &RectToLock, D3DLOCK_READONLY)) != D3D_OK)
|
if ((hr = pOffScreenBuffer->LockRect(&drect, &RectToLock, D3DLOCK_READONLY)) != D3D_OK)
|
||||||
{
|
{
|
||||||
PanicAlert("ERROR: %s", hr == D3DERR_WASSTILLDRAWING ? "Still drawing" :
|
PanicAlert("ERROR: %s", hr == D3DERR_WASSTILLDRAWING ? "Still drawing" :
|
||||||
hr == D3DERR_INVALIDCALL ? "Invalid call" : "w00t");
|
hr == D3DERR_INVALIDCALL ? "Invalid call" : "w00t");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -938,7 +934,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||||
switch (ReadBufferFormat)
|
switch (ReadBufferFormat)
|
||||||
{
|
{
|
||||||
case D3DFMT_R32F:
|
case D3DFMT_R32F:
|
||||||
val = ((float *)drect.pBits)[6];
|
val = ((float *)drect.pBits)[6];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
float ffrac = 1.0f/255.0f;
|
float ffrac = 1.0f/255.0f;
|
||||||
|
@ -947,12 +943,12 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||||
ffrac*= 1 / 255.0f;
|
ffrac*= 1 / 255.0f;
|
||||||
val += ((float)((z>>8) & 0xFF)) * ffrac;
|
val += ((float)((z>>8) & 0xFF)) * ffrac;
|
||||||
ffrac*= 1 / 255.0f;
|
ffrac*= 1 / 255.0f;
|
||||||
val += ((float)(z & 0xFF)) * ffrac;
|
val += ((float)(z & 0xFF)) * ffrac;
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
z = ((u32)(val * 0xffffff));
|
z = ((u32)(val * 0xffffff));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case POKE_Z:
|
case POKE_Z:
|
||||||
// TODO: Get that Z value to poke from somewhere
|
// TODO: Get that Z value to poke from somewhere
|
||||||
//((float *)drect.pBits)[0] = val;
|
//((float *)drect.pBits)[0] = val;
|
||||||
|
@ -980,12 +976,12 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||||
void UpdateViewport()
|
void UpdateViewport()
|
||||||
{
|
{
|
||||||
// reversed gxsetviewport(xorig, yorig, width, height, nearz, farz)
|
// reversed gxsetviewport(xorig, yorig, width, height, nearz, farz)
|
||||||
// [0] = width/2
|
// [0] = width/2
|
||||||
// [1] = height/2
|
// [1] = height/2
|
||||||
// [2] = 16777215 * (farz - nearz)
|
// [2] = 16777215 * (farz - nearz)
|
||||||
// [3] = xorig + width/2 + 342
|
// [3] = xorig + width/2 + 342
|
||||||
// [4] = yorig + height/2 + 342
|
// [4] = yorig + height/2 + 342
|
||||||
// [5] = 16777215 * farz
|
// [5] = 16777215 * farz
|
||||||
int scissorXOff = bpmem.scissorOffset.x * 2;
|
int scissorXOff = bpmem.scissorOffset.x * 2;
|
||||||
int scissorYOff = bpmem.scissorOffset.y * 2;
|
int scissorYOff = bpmem.scissorOffset.y * 2;
|
||||||
|
|
||||||
|
@ -998,19 +994,19 @@ void UpdateViewport()
|
||||||
D3DVIEWPORT9 vp;
|
D3DVIEWPORT9 vp;
|
||||||
|
|
||||||
// Stretch picture with increased internal resolution
|
// Stretch picture with increased internal resolution
|
||||||
int X = (int)(ceil(xfregs.rawViewport[3] - xfregs.rawViewport[0] - (scissorXOff)) * MValueX) + Xstride;
|
int X = (int)(ceil(xfregs.rawViewport[3] - xfregs.rawViewport[0] - (scissorXOff)) * MValueX) + Xstride;
|
||||||
int Y = (int)(ceil(xfregs.rawViewport[4] + xfregs.rawViewport[1] - (scissorYOff)) * MValueY) + Ystride;
|
int Y = (int)(ceil(xfregs.rawViewport[4] + xfregs.rawViewport[1] - (scissorYOff)) * MValueY) + Ystride;
|
||||||
int Width = (int)ceil((int)(2 * xfregs.rawViewport[0]) * MValueX);
|
int Width = (int)ceil((int)(2 * xfregs.rawViewport[0]) * MValueX);
|
||||||
int Height = (int)ceil((int)(-2 * xfregs.rawViewport[1]) * MValueY);
|
int Height = (int)ceil((int)(-2 * xfregs.rawViewport[1]) * MValueY);
|
||||||
if (Width < 0)
|
if (Width < 0)
|
||||||
{
|
{
|
||||||
X += Width;
|
X += Width;
|
||||||
Width*=-1;
|
Width*=-1;
|
||||||
}
|
}
|
||||||
if (Height < 0)
|
if (Height < 0)
|
||||||
{
|
{
|
||||||
Y += Height;
|
Y += Height;
|
||||||
Height *= -1;
|
Height *= -1;
|
||||||
}
|
}
|
||||||
bool sizeChanged = false;
|
bool sizeChanged = false;
|
||||||
if(X < 0)
|
if(X < 0)
|
||||||
|
@ -1062,7 +1058,7 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
{
|
{
|
||||||
// Update the view port for clearing the picture
|
// Update the view port for clearing the picture
|
||||||
|
|
||||||
D3DVIEWPORT9 vp;
|
D3DVIEWPORT9 vp;
|
||||||
vp.X = 0;
|
vp.X = 0;
|
||||||
vp.Y = 0;
|
vp.Y = 0;
|
||||||
vp.Width = Renderer::GetFullTargetWidth();
|
vp.Width = Renderer::GetFullTargetWidth();
|
||||||
|
@ -1079,13 +1075,13 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
sirc.top = targetRc.top;
|
sirc.top = targetRc.top;
|
||||||
sirc.right = targetRc.right;
|
sirc.right = targetRc.right;
|
||||||
sirc.bottom = targetRc.bottom;
|
sirc.bottom = targetRc.bottom;
|
||||||
D3D::dev->SetScissorRect(&sirc);
|
D3D::dev->SetScissorRect(&sirc);
|
||||||
if (zEnable)
|
if (zEnable)
|
||||||
D3D::ChangeRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
|
D3D::ChangeRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
|
||||||
D3D::drawClearQuad(color ,(z & 0xFFFFFF) / float(0xFFFFFF),PixelShaderCache::GetClearProgram(),VertexShaderCache::GetClearVertexShader());
|
D3D::drawClearQuad(color ,(z & 0xFFFFFF) / float(0xFFFFFF),PixelShaderCache::GetClearProgram(),VertexShaderCache::GetClearVertexShader());
|
||||||
if (zEnable)
|
if (zEnable)
|
||||||
D3D::RefreshRenderState(D3DRS_ZFUNC);
|
D3D::RefreshRenderState(D3DRS_ZFUNC);
|
||||||
//D3D::dev->Clear(0, NULL, (colorEnable ? D3DCLEAR_TARGET : 0)| ( zEnable ? D3DCLEAR_ZBUFFER : 0), color | ((alphaEnable)?0:0xFF000000),(z & 0xFFFFFF) / float(0xFFFFFF), 0);
|
//D3D::dev->Clear(0, NULL, (colorEnable ? D3DCLEAR_TARGET : 0)| ( zEnable ? D3DCLEAR_ZBUFFER : 0), color | ((alphaEnable)?0:0xFF000000),(z & 0xFFFFFF) / float(0xFFFFFF), 0);
|
||||||
UpdateViewport();
|
UpdateViewport();
|
||||||
SetScissorRect();
|
SetScissorRect();
|
||||||
}
|
}
|
||||||
|
@ -1101,9 +1097,9 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||||
return;
|
return;
|
||||||
u32 newval = bpmem.blendmode.subtract << 2;
|
u32 newval = bpmem.blendmode.subtract << 2;
|
||||||
|
|
||||||
if (bpmem.blendmode.subtract) {
|
if (bpmem.blendmode.subtract) {
|
||||||
newval |= 0x0049; // enable blending src 1 dst 1
|
newval |= 0x0049; // enable blending src 1 dst 1
|
||||||
} else if (bpmem.blendmode.blendenable) {
|
} else if (bpmem.blendmode.blendenable) {
|
||||||
newval |= 1; // enable blending
|
newval |= 1; // enable blending
|
||||||
newval |= bpmem.blendmode.srcfactor << 3;
|
newval |= bpmem.blendmode.srcfactor << 3;
|
||||||
newval |= bpmem.blendmode.dstfactor << 6;
|
newval |= bpmem.blendmode.dstfactor << 6;
|
||||||
|
@ -1112,12 +1108,12 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||||
u32 changes = forceUpdate ? 0xFFFFFFFF : newval ^ s_blendMode;
|
u32 changes = forceUpdate ? 0xFFFFFFFF : newval ^ s_blendMode;
|
||||||
|
|
||||||
if (changes & 1) {
|
if (changes & 1) {
|
||||||
// blend enable change
|
// blend enable change
|
||||||
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, (newval & 1));
|
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, (newval & 1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes & 4) {
|
if (changes & 4) {
|
||||||
// subtract enable change
|
// subtract enable change
|
||||||
D3D::SetRenderState(D3DRS_BLENDOP, newval & 4 ? D3DBLENDOP_REVSUBTRACT : D3DBLENDOP_ADD);
|
D3D::SetRenderState(D3DRS_BLENDOP, newval & 4 ? D3DBLENDOP_REVSUBTRACT : D3DBLENDOP_ADD);
|
||||||
}
|
}
|
||||||
|
@ -1125,7 +1121,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||||
if (changes & 0x1F8) {
|
if (changes & 0x1F8) {
|
||||||
// blend RGB change
|
// blend RGB change
|
||||||
D3D::SetRenderState(D3DRS_SRCBLEND, d3dSrcFactors[(newval >> 3) & 7]);
|
D3D::SetRenderState(D3DRS_SRCBLEND, d3dSrcFactors[(newval >> 3) & 7]);
|
||||||
D3D::SetRenderState(D3DRS_DESTBLEND, d3dDestFactors[(newval >> 6) & 7]);
|
D3D::SetRenderState(D3DRS_DESTBLEND, d3dDestFactors[(newval >> 6) & 7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_blendMode = newval;
|
s_blendMode = newval;
|
||||||
|
@ -1155,7 +1151,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
if(newAA != s_LastAA)
|
if(newAA != s_LastAA)
|
||||||
{
|
{
|
||||||
s_target_width = s_backbuffer_width;
|
s_target_width = s_backbuffer_width;
|
||||||
s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f);
|
s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f);
|
||||||
s_LastAA = newAA;
|
s_LastAA = newAA;
|
||||||
switch (s_LastAA)
|
switch (s_LastAA)
|
||||||
{
|
{
|
||||||
|
@ -1190,14 +1186,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
// Count FPS.
|
// Count FPS.
|
||||||
// -------------
|
// -------------
|
||||||
static int fpscount = 0;
|
static int fpscount = 0;
|
||||||
static unsigned long lasttime;
|
static unsigned long lasttime;
|
||||||
++fpscount;
|
++fpscount;
|
||||||
if (Common::Timer::GetTimeMs() - lasttime > 1000)
|
if (Common::Timer::GetTimeMs() - lasttime > 1000)
|
||||||
{
|
{
|
||||||
lasttime = Common::Timer::GetTimeMs();
|
lasttime = Common::Timer::GetTimeMs();
|
||||||
s_fps = fpscount - 1;
|
s_fps = fpscount - 1;
|
||||||
fpscount = 0;
|
fpscount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin new frame
|
// Begin new frame
|
||||||
// Set default viewport and scissor, for the clear to work correctly
|
// Set default viewport and scissor, for the clear to work correctly
|
||||||
|
@ -1210,11 +1206,11 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
void Renderer::ResetAPIState()
|
void Renderer::ResetAPIState()
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE);
|
D3D::SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE);
|
||||||
D3D::SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
|
D3D::SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
|
||||||
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
|
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
|
||||||
D3D::SetRenderState(D3DRS_ZENABLE, FALSE);
|
D3D::SetRenderState(D3DRS_ZENABLE, FALSE);
|
||||||
D3D::SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
|
D3D::SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
|
||||||
DWORD color_mask = D3DCOLORWRITEENABLE_ALPHA| D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE;
|
DWORD color_mask = D3DCOLORWRITEENABLE_ALPHA| D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE;
|
||||||
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, color_mask);
|
D3D::SetRenderState(D3DRS_COLORWRITEENABLE, color_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1225,14 +1221,14 @@ void Renderer::RestoreAPIState()
|
||||||
UpdateViewport();
|
UpdateViewport();
|
||||||
SetScissorRect();
|
SetScissorRect();
|
||||||
if (bpmem.zmode.testenable) D3D::SetRenderState(D3DRS_ZENABLE, TRUE);
|
if (bpmem.zmode.testenable) D3D::SetRenderState(D3DRS_ZENABLE, TRUE);
|
||||||
if (bpmem.zmode.updateenable) D3D::SetRenderState(D3DRS_ZWRITEENABLE, TRUE);
|
if (bpmem.zmode.updateenable) D3D::SetRenderState(D3DRS_ZWRITEENABLE, TRUE);
|
||||||
SetColorMask();
|
SetColorMask();
|
||||||
SetLogicOpMode();
|
SetLogicOpMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::SetGenerationMode()
|
void Renderer::SetGenerationMode()
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_CULLMODE, d3dCullModes[bpmem.genMode.cullmode]);
|
D3D::SetRenderState(D3DRS_CULLMODE, d3dCullModes[bpmem.genMode.cullmode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::SetDepthMode()
|
void Renderer::SetDepthMode()
|
||||||
|
@ -1241,13 +1237,13 @@ void Renderer::SetDepthMode()
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_ZENABLE, TRUE);
|
D3D::SetRenderState(D3DRS_ZENABLE, TRUE);
|
||||||
D3D::SetRenderState(D3DRS_ZWRITEENABLE, bpmem.zmode.updateenable);
|
D3D::SetRenderState(D3DRS_ZWRITEENABLE, bpmem.zmode.updateenable);
|
||||||
D3D::SetRenderState(D3DRS_ZFUNC, d3dCmpFuncs[bpmem.zmode.func]);
|
D3D::SetRenderState(D3DRS_ZFUNC, d3dCmpFuncs[bpmem.zmode.func]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_ZENABLE, FALSE);
|
D3D::SetRenderState(D3DRS_ZENABLE, FALSE);
|
||||||
D3D::SetRenderState(D3DRS_ZWRITEENABLE, FALSE); // ??
|
D3D::SetRenderState(D3DRS_ZWRITEENABLE, FALSE); // ??
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::SetLogicOpMode()
|
void Renderer::SetLogicOpMode()
|
||||||
|
@ -1255,7 +1251,7 @@ void Renderer::SetLogicOpMode()
|
||||||
if (bpmem.blendmode.logicopenable && bpmem.blendmode.logicmode != 3)
|
if (bpmem.blendmode.logicopenable && bpmem.blendmode.logicmode != 3)
|
||||||
{
|
{
|
||||||
s_blendMode = 0;
|
s_blendMode = 0;
|
||||||
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, 1);
|
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, 1);
|
||||||
D3D::SetRenderState(D3DRS_BLENDOP, d3dLogincOPop[bpmem.blendmode.logicmode]);
|
D3D::SetRenderState(D3DRS_BLENDOP, d3dLogincOPop[bpmem.blendmode.logicmode]);
|
||||||
D3D::SetRenderState(D3DRS_SRCBLEND, d3dLogicOpSrcFactors[bpmem.blendmode.logicmode]);
|
D3D::SetRenderState(D3DRS_SRCBLEND, d3dLogicOpSrcFactors[bpmem.blendmode.logicmode]);
|
||||||
D3D::SetRenderState(D3DRS_DESTBLEND, d3dLogicOpDestFactors[bpmem.blendmode.logicmode]);
|
D3D::SetRenderState(D3DRS_DESTBLEND, d3dLogicOpDestFactors[bpmem.blendmode.logicmode]);
|
||||||
|
@ -1268,7 +1264,7 @@ void Renderer::SetLogicOpMode()
|
||||||
|
|
||||||
void Renderer::SetDitherMode()
|
void Renderer::SetDitherMode()
|
||||||
{
|
{
|
||||||
D3D::SetRenderState(D3DRS_DITHERENABLE,bpmem.blendmode.dither);
|
D3D::SetRenderState(D3DRS_DITHERENABLE,bpmem.blendmode.dither);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::SetLineWidth()
|
void Renderer::SetLineWidth()
|
||||||
|
|
|
@ -150,8 +150,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -201,7 +199,7 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||||
|
|
||||||
void DllAbout(HWND _hParent)
|
void DllAbout(HWND _hParent)
|
||||||
{
|
{
|
||||||
DialogBoxA(g_hInstance,(LPCSTR)IDD_ABOUT,_hParent,(DLGPROC)AboutProc);
|
DialogBox(g_hInstance,(LPCTSTR)IDD_ABOUT,_hParent,(DLGPROC)AboutProc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
|
BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
|
||||||
EVT_CLOSE(GFXConfigDialogOGL::OnClose)
|
EVT_CLOSE(GFXConfigDialogOGL::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE, GFXConfigDialogOGL::CloseClick)
|
EVT_BUTTON(wxID_CLOSE, GFXConfigDialogOGL::CloseClick)
|
||||||
EVT_BUTTON(ID_ABOUTOGL, GFXConfigDialogOGL::AboutClick)
|
EVT_BUTTON(wxID_ABOUT, GFXConfigDialogOGL::AboutClick)
|
||||||
EVT_CHECKBOX(ID_FULLSCREEN, GFXConfigDialogOGL::GeneralSettingsChanged)
|
EVT_CHECKBOX(ID_FULLSCREEN, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_VSYNC, GFXConfigDialogOGL::GeneralSettingsChanged)
|
EVT_CHECKBOX(ID_VSYNC, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_RENDERTOMAINWINDOW, GFXConfigDialogOGL::GeneralSettingsChanged)
|
EVT_CHECKBOX(ID_RENDERTOMAINWINDOW, GFXConfigDialogOGL::GeneralSettingsChanged)
|
||||||
|
@ -65,7 +65,7 @@ BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
|
||||||
EVT_CHECKBOX(ID_DUMPTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DUMPTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_HIRESTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_HIRESTEXTURES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DUMPEFBTARGET, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DUMPEFBTARGET, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DUMPFRAMES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DUMPFRAMES, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_FREELOOK, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_FREELOOK, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DISABLELIGHTING, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DISABLELIGHTING, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DISABLETEXTURING, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DISABLETEXTURING, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
|
@ -73,7 +73,7 @@ BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
|
||||||
EVT_CHECKBOX(ID_OSDHOTKEY, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_OSDHOTKEY, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_HACK, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_HACK, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_SAFETEXTURECACHE,GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_SAFETEXTURECACHE,GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DSTALPHAPASS,GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_DSTALPHAPASS,GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_CHECKBOX_DISABLECOPYEFB, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_CHECKBOX(ID_CHECKBOX_DISABLECOPYEFB, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_RADIOBUTTON(ID_RADIO_COPYEFBTORAM, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_RADIOBUTTON(ID_RADIO_COPYEFBTORAM, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
EVT_RADIOBUTTON(ID_RADIO_COPYEFBTOGL, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
EVT_RADIOBUTTON(ID_RADIO_COPYEFBTOGL, GFXConfigDialogOGL::AdvancedSettingsChanged)
|
||||||
|
@ -86,6 +86,7 @@ END_EVENT_TABLE()
|
||||||
GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
|
CreateGUIControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@ GFXConfigDialogOGL::~GFXConfigDialogOGL()
|
||||||
{
|
{
|
||||||
INFO_LOG(CONSOLE, "GFXConfigDialogOGL Closed");
|
INFO_LOG(CONSOLE, "GFXConfigDialogOGL Closed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXConfigDialogOGL::OnClose(wxCloseEvent& event)
|
void GFXConfigDialogOGL::OnClose(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
//INFO_LOG(CONSOLE, "OnClose");
|
//INFO_LOG(CONSOLE, "OnClose");
|
||||||
|
@ -161,6 +163,7 @@ void GFXConfigDialogOGL::LoadShaders()
|
||||||
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXConfigDialogOGL::InitializeGUILists()
|
void GFXConfigDialogOGL::InitializeGUILists()
|
||||||
{
|
{
|
||||||
// Resolutions
|
// Resolutions
|
||||||
|
@ -206,6 +209,7 @@ void GFXConfigDialogOGL::InitializeGUILists()
|
||||||
arrayStringFor_PhackvalueCB.Add(wxT("Baten Kaitos Origin"));
|
arrayStringFor_PhackvalueCB.Add(wxT("Baten Kaitos Origin"));
|
||||||
arrayStringFor_PhackvalueCB.Add(wxT("Skies of Arcadia"));
|
arrayStringFor_PhackvalueCB.Add(wxT("Skies of Arcadia"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXConfigDialogOGL::InitializeGUIValues()
|
void GFXConfigDialogOGL::InitializeGUIValues()
|
||||||
{
|
{
|
||||||
// General Display Settings
|
// General Display Settings
|
||||||
|
@ -257,8 +261,8 @@ void GFXConfigDialogOGL::InitializeGUIValues()
|
||||||
m_Wireframe->SetValue(g_Config.bWireFrame);
|
m_Wireframe->SetValue(g_Config.bWireFrame);
|
||||||
m_DisableLighting->SetValue(g_Config.bDisableLighting);
|
m_DisableLighting->SetValue(g_Config.bDisableLighting);
|
||||||
m_DisableTexturing->SetValue(g_Config.bDisableTexturing);
|
m_DisableTexturing->SetValue(g_Config.bDisableTexturing);
|
||||||
m_DstAlphaPass->SetValue(g_Config.bDstAlphaPass);
|
m_DstAlphaPass->SetValue(g_Config.bDstAlphaPass);
|
||||||
m_DisableFog->SetValue(g_Config.bDisableFog);
|
m_DisableFog->SetValue(g_Config.bDisableFog);
|
||||||
|
|
||||||
m_CheckBox_DisableCopyEFB->SetValue(g_Config.bEFBCopyDisable);
|
m_CheckBox_DisableCopyEFB->SetValue(g_Config.bEFBCopyDisable);
|
||||||
g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
|
g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
|
||||||
|
@ -274,6 +278,7 @@ void GFXConfigDialogOGL::InitializeGUIValues()
|
||||||
m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
|
m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
|
||||||
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXConfigDialogOGL::InitializeGUITooltips()
|
void GFXConfigDialogOGL::InitializeGUITooltips()
|
||||||
{
|
{
|
||||||
// Tool tips
|
// Tool tips
|
||||||
|
@ -343,6 +348,7 @@ void GFXConfigDialogOGL::InitializeGUITooltips()
|
||||||
wxT("\n[This option will apply immediately and does not require a restart. However it may not")
|
wxT("\n[This option will apply immediately and does not require a restart. However it may not")
|
||||||
wxT(" be entirely safe to change it midgames.]"));
|
wxT(" be entirely safe to change it midgames.]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXConfigDialogOGL::CreateGUIControls()
|
void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
{
|
{
|
||||||
InitializeGUILists();
|
InitializeGUILists();
|
||||||
|
@ -355,8 +361,8 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
m_About = new wxButton(this, ID_ABOUTOGL, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_About = new wxButton(this, wxID_ABOUT, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
// Put notebook and buttons in sizers
|
// Put notebook and buttons in sizers
|
||||||
wxBoxSizer* sButtons;
|
wxBoxSizer* sButtons;
|
||||||
|
@ -418,7 +424,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
|
|
||||||
// Sizers
|
// Sizers
|
||||||
sGeneral = new wxBoxSizer(wxVERTICAL);
|
sGeneral = new wxBoxSizer(wxVERTICAL);
|
||||||
sBasic = new wxGridBagSizer(0, 0);
|
sBasic = new wxGridBagSizer(0, 0);
|
||||||
|
|
||||||
sBasic->Add(IRText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sBasic->Add(IRText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
sBasic->Add(m_NativeResolution, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sBasic->Add(m_NativeResolution, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
|
@ -428,7 +434,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
sBasic->Add(WMText, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sBasic->Add(WMText, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
sBasic->Add(m_WindowResolutionCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5);
|
sBasic->Add(m_WindowResolutionCB, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||||
sBasic->Add(m_Fullscreen, wxGBPosition(1, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sBasic->Add(m_Fullscreen, wxGBPosition(1, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
sBasic->Add(m_WindowFSResolutionCB, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5);
|
sBasic->Add(m_WindowFSResolutionCB, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
|
||||||
sBasic->Add(KeepARText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sBasic->Add(KeepARText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
sBasic->Add(m_KeepAR, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
|
sBasic->Add(m_KeepAR, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
@ -485,8 +491,8 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
m_Wireframe = new wxCheckBox(m_PageAdvanced, ID_WIREFRAME, wxT("Enable Wireframe"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Wireframe = new wxCheckBox(m_PageAdvanced, ID_WIREFRAME, wxT("Enable Wireframe"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_DisableLighting = new wxCheckBox(m_PageAdvanced, ID_DISABLELIGHTING, wxT("Disable Material Lighting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_DisableLighting = new wxCheckBox(m_PageAdvanced, ID_DISABLELIGHTING, wxT("Disable Material Lighting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_DisableTexturing = new wxCheckBox(m_PageAdvanced, ID_DISABLETEXTURING, wxT("Disable Texturing"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_DisableTexturing = new wxCheckBox(m_PageAdvanced, ID_DISABLETEXTURING, wxT("Disable Texturing"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_DstAlphaPass = new wxCheckBox(m_PageAdvanced, ID_DSTALPHAPASS, wxT("Disable Destination Alpha Pass"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_DstAlphaPass = new wxCheckBox(m_PageAdvanced, ID_DSTALPHAPASS, wxT("Disable Destination Alpha Pass"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_DisableFog = new wxCheckBox(m_PageAdvanced, ID_DISABLEFOG, wxT("Disable Fog"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_DisableFog = new wxCheckBox(m_PageAdvanced, ID_DISABLEFOG, wxT("Disable Fog"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
m_StaticBox_EFB = new wxStaticBox(m_PageAdvanced, ID_STATICBOX_EFB, wxT("EFB Copy"));
|
m_StaticBox_EFB = new wxStaticBox(m_PageAdvanced, ID_STATICBOX_EFB, wxT("EFB Copy"));
|
||||||
m_CheckBox_DisableCopyEFB = new wxCheckBox(m_PageAdvanced, ID_CHECKBOX_DISABLECOPYEFB, wxT("Disable"));
|
m_CheckBox_DisableCopyEFB = new wxCheckBox(m_PageAdvanced, ID_CHECKBOX_DISABLECOPYEFB, wxT("Disable"));
|
||||||
|
@ -506,7 +512,6 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
|
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
|
||||||
|
|
||||||
|
|
||||||
// Sizers
|
// Sizers
|
||||||
sHacks = new wxGridBagSizer(0, 0);
|
sHacks = new wxGridBagSizer(0, 0);
|
||||||
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
|
@ -530,7 +535,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
sRendering->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 4);
|
sRendering->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||||
sRendering->Add(m_DisableLighting, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 4);
|
sRendering->Add(m_DisableLighting, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||||
sRendering->Add(m_DisableTexturing, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 4);
|
sRendering->Add(m_DisableTexturing, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||||
sRendering->Add(m_DstAlphaPass, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 4);
|
sRendering->Add(m_DstAlphaPass, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||||
sRendering->Add(m_DisableFog, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 4);
|
sRendering->Add(m_DisableFog, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||||
sRenderBoxRow1->Add(sRendering, 0, wxALL|wxEXPAND, 1);
|
sRenderBoxRow1->Add(sRendering, 0, wxALL|wxEXPAND, 1);
|
||||||
wxStaticBoxSizer *sSBox = new wxStaticBoxSizer(m_StaticBox_EFB, wxVERTICAL);
|
wxStaticBoxSizer *sSBox = new wxStaticBoxSizer(m_StaticBox_EFB, wxVERTICAL);
|
||||||
|
@ -542,12 +547,12 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
sRenderBoxRow1->Add(sSBox, 0, wxALL|wxEXPAND, 5);
|
sRenderBoxRow1->Add(sSBox, 0, wxALL|wxEXPAND, 5);
|
||||||
sbRendering->Add(sRenderBoxRow1);
|
sbRendering->Add(sRenderBoxRow1);
|
||||||
|
|
||||||
sUtilities = new wxGridBagSizer(0, 0);
|
sUtilities = new wxGridBagSizer(0, 0);
|
||||||
sUtilities->Add(m_DumpTextures, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_DumpTextures, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sUtilities->Add(m_HiresTextures, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_HiresTextures, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sUtilities->Add(m_DumpEFBTarget, wxGBPosition(0, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_DumpEFBTarget, wxGBPosition(0, 2), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sUtilities->Add(m_DumpFrames, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_DumpFrames, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sUtilities->Add(m_FreeLook, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sUtilities->Add(m_FreeLook, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sbUtilities->Add(sUtilities, 1, wxEXPAND);
|
sbUtilities->Add(sUtilities, 1, wxEXPAND);
|
||||||
|
|
||||||
// Sizers
|
// Sizers
|
||||||
|
@ -567,7 +572,6 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GFXConfigDialogOGL::AboutClick(wxCommandEvent& WXUNUSED (event))
|
void GFXConfigDialogOGL::AboutClick(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
wxMessageBox(wxT("Dolphin OpenGL Plugin\nBy zerofrog(@gmail.com)\n\n")
|
wxMessageBox(wxT("Dolphin OpenGL Plugin\nBy zerofrog(@gmail.com)\n\n")
|
||||||
|
@ -645,10 +649,10 @@ void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event)
|
||||||
g_Config.bWidescreenHack = m_WidescreenHack->IsChecked();
|
g_Config.bWidescreenHack = m_WidescreenHack->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_CROP:
|
case ID_CROP:
|
||||||
g_Config.bCrop = m_Crop->IsChecked();
|
g_Config.bCrop = m_Crop->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_FORCEFILTERING:
|
case ID_FORCEFILTERING:
|
||||||
g_Config.bForceFiltering = m_ForceFiltering->IsChecked();
|
g_Config.bForceFiltering = m_ForceFiltering->IsChecked();
|
||||||
break;
|
break;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
case ID_HIDECURSOR:
|
case ID_HIDECURSOR:
|
||||||
|
@ -684,7 +688,6 @@ void GFXConfigDialogOGL::GeneralSettingsChanged(wxCommandEvent& event)
|
||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
|
@ -721,8 +724,8 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||||
break;
|
break;
|
||||||
case ID_DISABLEFOG:
|
case ID_DISABLEFOG:
|
||||||
g_Config.bDisableFog = m_DisableFog->IsChecked();
|
g_Config.bDisableFog = m_DisableFog->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_DSTALPHAPASS:
|
case ID_DSTALPHAPASS:
|
||||||
g_Config.bDstAlphaPass = m_DstAlphaPass->IsChecked();
|
g_Config.bDstAlphaPass = m_DstAlphaPass->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_DUMPTEXTURES:
|
case ID_DUMPTEXTURES:
|
||||||
|
@ -737,7 +740,7 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||||
case ID_DUMPFRAMES:
|
case ID_DUMPFRAMES:
|
||||||
g_Config.bDumpFrames = m_DumpFrames->IsChecked();
|
g_Config.bDumpFrames = m_DumpFrames->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_FREELOOK:
|
case ID_FREELOOK:
|
||||||
g_Config.bFreeLook = m_FreeLook->IsChecked();
|
g_Config.bFreeLook = m_FreeLook->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_TEXTUREPATH:
|
case ID_TEXTUREPATH:
|
||||||
|
@ -809,8 +812,6 @@ void GFXConfigDialogOGL::UpdateGUI()
|
||||||
|
|
||||||
// Disable the Copy to options when EFBCopy is disabled
|
// Disable the Copy to options when EFBCopy is disabled
|
||||||
m_Radio_CopyEFBToRAM->Enable(!(g_Config.bEFBCopyDisable));
|
m_Radio_CopyEFBToRAM->Enable(!(g_Config.bEFBCopyDisable));
|
||||||
m_Radio_CopyEFBToGL->Enable(!(g_Config.bEFBCopyDisable));
|
m_Radio_CopyEFBToGL->Enable(!(g_Config.bEFBCopyDisable));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ enum
|
||||||
class GFXConfigDialogOGL : public wxDialog
|
class GFXConfigDialogOGL : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = 1,
|
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||||
#ifdef DEBUGFAST
|
#ifdef DEBUGFAST
|
||||||
const wxString &title = wxT("OpenGL (DEBUGFAST) Plugin Configuration"),
|
const wxString &title = wxT("OpenGL (DEBUGFAST) Plugin Configuration"),
|
||||||
#else
|
#else
|
||||||
|
@ -123,12 +123,12 @@ class GFXConfigDialogOGL : public wxDialog
|
||||||
wxCheckBox *m_DisableLighting;
|
wxCheckBox *m_DisableLighting;
|
||||||
wxCheckBox *m_DisableTexturing;
|
wxCheckBox *m_DisableTexturing;
|
||||||
wxCheckBox *m_DisableFog;
|
wxCheckBox *m_DisableFog;
|
||||||
wxCheckBox *m_DstAlphaPass;
|
wxCheckBox *m_DstAlphaPass;
|
||||||
wxCheckBox *m_DumpTextures;
|
wxCheckBox *m_DumpTextures;
|
||||||
wxCheckBox *m_HiresTextures;
|
wxCheckBox *m_HiresTextures;
|
||||||
wxCheckBox *m_DumpEFBTarget;
|
wxCheckBox *m_DumpEFBTarget;
|
||||||
wxCheckBox *m_DumpFrames;
|
wxCheckBox *m_DumpFrames;
|
||||||
wxCheckBox *m_FreeLook;
|
wxCheckBox *m_FreeLook;
|
||||||
wxStaticBox * m_StaticBox_EFB;
|
wxStaticBox * m_StaticBox_EFB;
|
||||||
wxCheckBox *m_CheckBox_DisableCopyEFB;
|
wxCheckBox *m_CheckBox_DisableCopyEFB;
|
||||||
wxRadioButton *m_Radio_CopyEFBToRAM, *m_Radio_CopyEFBToGL;
|
wxRadioButton *m_Radio_CopyEFBToRAM, *m_Radio_CopyEFBToGL;
|
||||||
|
@ -150,10 +150,7 @@ class GFXConfigDialogOGL : public wxDialog
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_CLOSE = 1000,
|
ID_NOTEBOOK = 1000,
|
||||||
ID_ABOUTOGL,
|
|
||||||
|
|
||||||
ID_NOTEBOOK,
|
|
||||||
ID_PAGEGENERAL,
|
ID_PAGEGENERAL,
|
||||||
ID_PAGEADVANCED,
|
ID_PAGEADVANCED,
|
||||||
|
|
||||||
|
@ -204,13 +201,13 @@ class GFXConfigDialogOGL : public wxDialog
|
||||||
ID_HIRESTEXTURES,
|
ID_HIRESTEXTURES,
|
||||||
ID_DUMPEFBTARGET,
|
ID_DUMPEFBTARGET,
|
||||||
ID_DUMPFRAMES,
|
ID_DUMPFRAMES,
|
||||||
ID_FREELOOK,
|
ID_FREELOOK,
|
||||||
ID_TEXTUREPATH,
|
ID_TEXTUREPATH,
|
||||||
|
|
||||||
ID_CHECKBOX_DISABLECOPYEFB,
|
ID_CHECKBOX_DISABLECOPYEFB,
|
||||||
ID_OSDHOTKEY,
|
ID_OSDHOTKEY,
|
||||||
//ID_PROJECTIONHACK1,
|
//ID_PROJECTIONHACK1,
|
||||||
ID_DSTALPHAPASS,
|
ID_DSTALPHAPASS,
|
||||||
ID_RADIO_COPYEFBTORAM,
|
ID_RADIO_COPYEFBTORAM,
|
||||||
ID_RADIO_COPYEFBTOGL,
|
ID_RADIO_COPYEFBTOGL,
|
||||||
ID_POSTSHADER,
|
ID_POSTSHADER,
|
||||||
|
|
|
@ -69,8 +69,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -125,7 +123,7 @@ void OSDMenu(WPARAM wParam)
|
||||||
case '7':
|
case '7':
|
||||||
OSDChoice = 5;
|
OSDChoice = 5;
|
||||||
g_Config.bDisableLighting = !g_Config.bDisableLighting;
|
g_Config.bDisableLighting = !g_Config.bDisableLighting;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
@ -166,14 +164,14 @@ HWND GetWnd()
|
||||||
}
|
}
|
||||||
HWND GetParentWnd()
|
HWND GetParentWnd()
|
||||||
{
|
{
|
||||||
return m_hParent;
|
return m_hParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FreeLookInput( UINT iMsg, WPARAM wParam )
|
void FreeLookInput( UINT iMsg, WPARAM wParam )
|
||||||
{
|
{
|
||||||
static float debugSpeed = 1.0f;
|
static float debugSpeed = 1.0f;
|
||||||
static bool mouseLookEnabled = false;
|
static bool mouseLookEnabled = false;
|
||||||
static float lastMouse[2];
|
static float lastMouse[2];
|
||||||
|
|
||||||
switch( iMsg )
|
switch( iMsg )
|
||||||
{
|
{
|
||||||
|
@ -181,51 +179,51 @@ void FreeLookInput( UINT iMsg, WPARAM wParam )
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
switch( LOWORD( wParam ))
|
switch( LOWORD( wParam ))
|
||||||
{
|
{
|
||||||
case '9':
|
case '9':
|
||||||
debugSpeed /= 2.0f;
|
debugSpeed /= 2.0f;
|
||||||
break;
|
break;
|
||||||
case '0':
|
case '0':
|
||||||
debugSpeed *= 2.0f;
|
debugSpeed *= 2.0f;
|
||||||
break;
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
VertexShaderManager::TranslateView(0.0f, debugSpeed);
|
VertexShaderManager::TranslateView(0.0f, debugSpeed);
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
VertexShaderManager::TranslateView(0.0f, -debugSpeed);
|
VertexShaderManager::TranslateView(0.0f, -debugSpeed);
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
VertexShaderManager::TranslateView(debugSpeed, 0.0f);
|
VertexShaderManager::TranslateView(debugSpeed, 0.0f);
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
VertexShaderManager::TranslateView(-debugSpeed, 0.0f);
|
VertexShaderManager::TranslateView(-debugSpeed, 0.0f);
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
VertexShaderManager::ResetView();
|
VertexShaderManager::ResetView();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
if (mouseLookEnabled) {
|
if (mouseLookEnabled) {
|
||||||
POINT point;
|
POINT point;
|
||||||
GetCursorPos(&point);
|
GetCursorPos(&point);
|
||||||
VertexShaderManager::RotateView((point.x - lastMouse[0]) / 200.0f, (point.y - lastMouse[1]) / 200.0f);
|
VertexShaderManager::RotateView((point.x - lastMouse[0]) / 200.0f, (point.y - lastMouse[1]) / 200.0f);
|
||||||
lastMouse[0] = point.x;
|
lastMouse[0] = point.x;
|
||||||
lastMouse[1] = point.y;
|
lastMouse[1] = point.y;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_RBUTTONDOWN:
|
case WM_RBUTTONDOWN:
|
||||||
POINT point;
|
POINT point;
|
||||||
GetCursorPos(&point);
|
GetCursorPos(&point);
|
||||||
lastMouse[0] = point.x;
|
lastMouse[0] = point.x;
|
||||||
lastMouse[1] = point.y;
|
lastMouse[1] = point.y;
|
||||||
mouseLookEnabled= true;
|
mouseLookEnabled= true;
|
||||||
break;
|
break;
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
mouseLookEnabled = false;
|
mouseLookEnabled = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
@ -277,7 +275,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
hdc = BeginPaint(hWnd, &ps);
|
hdc = BeginPaint(hWnd, &ps);
|
||||||
EndPaint(hWnd, &ps);
|
EndPaint(hWnd, &ps);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
|
@ -287,12 +285,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (m_hParent == NULL && !g_Config.RenderToMainframe)
|
if (m_hParent == NULL && !g_Config.RenderToMainframe)
|
||||||
{
|
{
|
||||||
ToggleFullscreen(hWnd);
|
ToggleFullscreen(hWnd);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
||||||
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
||||||
return 0;
|
break;
|
||||||
|
default:
|
||||||
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -300,6 +299,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
// Don't process this as a child window to avoid double events
|
// Don't process this as a child window to avoid double events
|
||||||
if (!g_Config.RenderToMainframe)
|
if (!g_Config.RenderToMainframe)
|
||||||
OnKeyDown(wParam);
|
OnKeyDown(wParam);
|
||||||
|
|
||||||
|
if (g_Config.bFreeLook)
|
||||||
|
FreeLookInput( iMsg, wParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Post these mouse events to the main window, it's nessesary becase in difference to the
|
/* Post these mouse events to the main window, it's nessesary becase in difference to the
|
||||||
|
@ -328,8 +330,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* To support the separate window rendering we get the message back here. So we basically
|
/* To support the separate window rendering we get the message back here. So we basically
|
||||||
only let it pass through Dolphin > Frame.cpp to determine if it should be on or off
|
only let it pass through Dolphin > Frame.cpp to determine if it should be on or off
|
||||||
and coordinate it with the other settings if nessesary */
|
and coordinate it with the other settings if nessesary */
|
||||||
case WM_USER:
|
case WM_USER:
|
||||||
if (wParam == WM_USER_STOP)
|
if (wParam == WM_USER_STOP)
|
||||||
SetCursor((lParam) ? hCursor : hCursorBlank);
|
SetCursor((lParam) ? hCursor : hCursorBlank);
|
||||||
|
@ -340,7 +342,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
else if (wParam == TOGGLE_FULLSCREEN)
|
else if (wParam == TOGGLE_FULLSCREEN)
|
||||||
{
|
{
|
||||||
if(!g_Config.RenderToMainframe)
|
if(!g_Config.RenderToMainframe)
|
||||||
ToggleFullscreen(m_hWnd);
|
ToggleFullscreen(m_hWnd);
|
||||||
}
|
}
|
||||||
else if (wParam == WIIMOTE_DISCONNECT)
|
else if (wParam == WIIMOTE_DISCONNECT)
|
||||||
|
@ -357,8 +359,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if( g_Config.bFullscreen )
|
if( g_Config.bFullscreen )
|
||||||
ToggleFullscreen(m_hParent);
|
ToggleFullscreen(m_hParent);
|
||||||
PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
|
PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
Shutdown();
|
Shutdown();
|
||||||
|
@ -370,16 +372,16 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
case SC_SCREENSAVE:
|
case SC_SCREENSAVE:
|
||||||
case SC_MONITORPOWER:
|
case SC_MONITORPOWER:
|
||||||
return 0;
|
break;
|
||||||
|
default:
|
||||||
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
if (g_Config.bFreeLook) {
|
|
||||||
FreeLookInput( iMsg, wParam );
|
|
||||||
}
|
|
||||||
|
|
||||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,35 +409,35 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
||||||
CreateCursors(m_hInstance);
|
CreateCursors(m_hInstance);
|
||||||
|
|
||||||
// Create child window
|
// Create child window
|
||||||
if (g_Config.RenderToMainframe)
|
if (g_Config.RenderToMainframe)
|
||||||
{
|
{
|
||||||
m_hParent = m_hMain = parent;
|
m_hParent = m_hMain = parent;
|
||||||
|
|
||||||
m_hWnd = CreateWindow(m_szClassName, title, WS_CHILD,
|
m_hWnd = CreateWindow(m_szClassName, title, WS_CHILD,
|
||||||
0, 0, width, height, parent, NULL, hInstance, NULL);
|
0, 0, width, height, parent, NULL, hInstance, NULL);
|
||||||
}
|
}
|
||||||
// Create new separate window
|
// Create new separate window
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Don't forget to make it NULL, or a broken window will be created in case we
|
// Don't forget to make it NULL, or a broken window will be created in case we
|
||||||
// render to main, stop, then render to separate window, as the GUI will still
|
// render to main, stop, then render to separate window, as the GUI will still
|
||||||
// think we're rendering to main because m_hParent will still contain the old HWND...
|
// think we're rendering to main because m_hParent will still contain the old HWND
|
||||||
m_hParent = NULL;
|
m_hParent = NULL;
|
||||||
m_hMain = parent;
|
m_hMain = parent;
|
||||||
|
|
||||||
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
||||||
RECT rc = {0, 0, width, height};
|
RECT rc = {0, 0, width, height};
|
||||||
AdjustWindowRect(&rc, style, false);
|
AdjustWindowRect(&rc, style, false);
|
||||||
RECT rcdesktop;
|
RECT rcdesktop;
|
||||||
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
||||||
|
|
||||||
int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
|
int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
|
||||||
int Y = (rcdesktop.bottom-rcdesktop.top)/2 - (rc.bottom-rc.top)/2;
|
int Y = (rcdesktop.bottom-rcdesktop.top)/2 - (rc.bottom-rc.top)/2;
|
||||||
|
|
||||||
m_hWnd = CreateWindow(m_szClassName, title, style,
|
m_hWnd = CreateWindow(m_szClassName, title, style,
|
||||||
X, Y, rc.right-rc.left, rc.bottom-rc.top,
|
X, Y, rc.right-rc.left, rc.bottom-rc.top,
|
||||||
NULL, NULL, hInstance, NULL);
|
NULL, NULL, hInstance, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_hWnd;
|
return m_hWnd;
|
||||||
}
|
}
|
||||||
|
@ -485,7 +487,7 @@ void ToggleFullscreen(HWND hParent, bool bForceFull)
|
||||||
RECT rc = {0, 0, w_fs, h_fs};
|
RECT rc = {0, 0, w_fs, h_fs};
|
||||||
AdjustWindowRect(&rc, style, false);
|
AdjustWindowRect(&rc, style, false);
|
||||||
RECT rcdesktop;
|
RECT rcdesktop;
|
||||||
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
||||||
|
|
||||||
// SetWindowPos to the center of the screen
|
// SetWindowPos to the center of the screen
|
||||||
int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
|
int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
|
||||||
|
|
|
@ -98,8 +98,6 @@ GFXDebuggerOGL *m_DebuggerFrame = NULL;
|
||||||
SVideoInitialize g_VideoInitialize;
|
SVideoInitialize g_VideoInitialize;
|
||||||
PLUGIN_GLOBALS* globals = NULL;
|
PLUGIN_GLOBALS* globals = NULL;
|
||||||
|
|
||||||
bool allowConfigShow = true;
|
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
int GLScissorX, GLScissorY, GLScissorW, GLScissorH;
|
int GLScissorX, GLScissorY, GLScissorW, GLScissorH;
|
||||||
|
|
||||||
|
@ -117,14 +115,14 @@ bool IsD3D()
|
||||||
|
|
||||||
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||||
{
|
{
|
||||||
_PluginInfo->Version = 0x0100;
|
_PluginInfo->Version = 0x0100;
|
||||||
_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
||||||
#ifdef DEBUGFAST
|
#ifdef DEBUGFAST
|
||||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL (DebugFast)");
|
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL (DebugFast)");
|
||||||
#elif defined _DEBUG
|
#elif defined _DEBUG
|
||||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL (Debug)");
|
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL (Debug)");
|
||||||
#else
|
#else
|
||||||
sprintf(_PluginInfo->Name, "Dolphin OpenGL");
|
sprintf_s(_PluginInfo->Name, "Dolphin OpenGL");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +167,8 @@ void DllDebugger(HWND _hParent, bool Show)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void Win32AddResolutions() {
|
void Win32AddResolutions()
|
||||||
|
{
|
||||||
// Search for avaliable resolutions
|
// Search for avaliable resolutions
|
||||||
|
|
||||||
DWORD iModeNum = 0;
|
DWORD iModeNum = 0;
|
||||||
|
@ -204,7 +203,7 @@ void Win32AddResolutions() {
|
||||||
m_ConfigFrame->AddFSReso(szBuffer);
|
m_ConfigFrame->AddFSReso(szBuffer);
|
||||||
m_ConfigFrame->AddWindowReso(szBuffer);
|
m_ConfigFrame->AddWindowReso(szBuffer);
|
||||||
}
|
}
|
||||||
ZeroMemory(&dmi, sizeof(dmi));
|
ZeroMemory(&dmi, sizeof(dmi));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XRANDR) && HAVE_XRANDR
|
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||||
|
@ -226,10 +225,10 @@ void X11AddResolutions() {
|
||||||
m_ConfigFrame->AddFSReso(temp);
|
m_ConfigFrame->AddFSReso(temp);
|
||||||
//Add same to window resolutions, since
|
//Add same to window resolutions, since
|
||||||
//they should be nearly all that's needed
|
//they should be nearly all that's needed
|
||||||
m_ConfigFrame->AddWindowReso(temp);
|
m_ConfigFrame->AddWindowReso(temp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||||
void CocoaAddResolutions() {
|
void CocoaAddResolutions() {
|
||||||
|
@ -245,7 +244,6 @@ void CocoaAddResolutions() {
|
||||||
int modeIndex;
|
int modeIndex;
|
||||||
int px = 0, py = 0;
|
int px = 0, py = 0;
|
||||||
|
|
||||||
|
|
||||||
modes = CGDisplayAvailableModes(CGMainDisplayID());
|
modes = CGDisplayAvailableModes(CGMainDisplayID());
|
||||||
|
|
||||||
range.location = 0;
|
range.location = 0;
|
||||||
|
@ -281,42 +279,40 @@ void DllConfig(HWND _hParent)
|
||||||
g_Config.UpdateProjectionHack();
|
g_Config.UpdateProjectionHack();
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
// Prevent user to show more than 1 config window at same time
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
if (allowConfigShow)
|
m_ConfigFrame = new GFXConfigDialogOGL(frame);
|
||||||
{
|
|
||||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
|
||||||
m_ConfigFrame = new GFXConfigDialogOGL(frame);
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
Win32AddResolutions();
|
Win32AddResolutions();
|
||||||
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XRANDR) && HAVE_XRANDR
|
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||||
X11AddResolutions();
|
X11AddResolutions();
|
||||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||||
CocoaAddResolutions();
|
CocoaAddResolutions();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
allowConfigShow = false;
|
// Prevent user to show more than 1 config window at same time
|
||||||
m_ConfigFrame->CreateGUIControls();
|
frame->Disable();
|
||||||
allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false;
|
m_ConfigFrame->ShowModal();
|
||||||
m_ConfigFrame->Destroy();
|
frame->Enable();
|
||||||
m_ConfigFrame = NULL;
|
|
||||||
|
m_ConfigFrame->Destroy();
|
||||||
|
m_ConfigFrame = NULL;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
frame->Destroy();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(void *init)
|
void Initialize(void *init)
|
||||||
{
|
{
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
SVideoInitialize *_pVideoInitialize = (SVideoInitialize*)init;
|
SVideoInitialize *_pVideoInitialize = (SVideoInitialize*)init;
|
||||||
// Create a shortcut to _pVideoInitialize that can also update it
|
// Create a shortcut to _pVideoInitialize that can also update it
|
||||||
g_VideoInitialize = *(_pVideoInitialize);
|
g_VideoInitialize = *(_pVideoInitialize);
|
||||||
InitXFBConvTables();
|
InitXFBConvTables();
|
||||||
|
|
||||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
|
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
|
||||||
g_Config.GameIniLoad(globals->game_ini);
|
g_Config.GameIniLoad(globals->game_ini);
|
||||||
|
|
||||||
g_Config.UpdateProjectionHack();
|
g_Config.UpdateProjectionHack();
|
||||||
|
@ -326,19 +322,19 @@ void Initialize(void *init)
|
||||||
#endif
|
#endif
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
|
||||||
if (!OpenGL_Create(g_VideoInitialize, 640, 480))
|
if (!OpenGL_Create(g_VideoInitialize, 640, 480))
|
||||||
{
|
{
|
||||||
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
|
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_pVideoInitialize->pPeekMessages = g_VideoInitialize.pPeekMessages;
|
_pVideoInitialize->pPeekMessages = g_VideoInitialize.pPeekMessages;
|
||||||
_pVideoInitialize->pUpdateFPSDisplay = g_VideoInitialize.pUpdateFPSDisplay;
|
_pVideoInitialize->pUpdateFPSDisplay = g_VideoInitialize.pUpdateFPSDisplay;
|
||||||
|
|
||||||
// Now the window handle is written
|
// Now the window handle is written
|
||||||
_pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle;
|
_pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle;
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
_pVideoInitialize->pXWindow = g_VideoInitialize.pXWindow;
|
_pVideoInitialize->pXWindow = g_VideoInitialize.pXWindow;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
OSD::AddMessage("Dolphin OpenGL Video Plugin" ,5000);
|
OSD::AddMessage("Dolphin OpenGL Video Plugin" ,5000);
|
||||||
|
@ -349,17 +345,17 @@ void DoState(unsigned char **ptr, int mode) {
|
||||||
// WHY is this here??
|
// WHY is this here??
|
||||||
OpenGL_MakeCurrent();
|
OpenGL_MakeCurrent();
|
||||||
#endif
|
#endif
|
||||||
// Clear all caches that touch RAM
|
// Clear all caches that touch RAM
|
||||||
TextureMngr::Invalidate(false);
|
TextureMngr::Invalidate(false);
|
||||||
VertexLoaderManager::MarkAllDirty();
|
VertexLoaderManager::MarkAllDirty();
|
||||||
|
|
||||||
PointerWrap p(ptr, mode);
|
PointerWrap p(ptr, mode);
|
||||||
VideoCommon_DoState(p);
|
VideoCommon_DoState(p);
|
||||||
|
|
||||||
// Refresh state.
|
// Refresh state.
|
||||||
if (mode == PointerWrap::MODE_READ)
|
if (mode == PointerWrap::MODE_READ)
|
||||||
{
|
{
|
||||||
BPReload();
|
BPReload();
|
||||||
RecomputeCachedArraybases();
|
RecomputeCachedArraybases();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,34 +368,34 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
|
||||||
// This is called after Video_Initialize() from the Core
|
// This is called after Video_Initialize() from the Core
|
||||||
void Video_Prepare(void)
|
void Video_Prepare(void)
|
||||||
{
|
{
|
||||||
OpenGL_MakeCurrent();
|
OpenGL_MakeCurrent();
|
||||||
if (!Renderer::Init()) {
|
if (!Renderer::Init()) {
|
||||||
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
|
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
|
||||||
PanicAlert("Can't create opengl renderer. You might be missing some required opengl extensions, check the logs for more info");
|
PanicAlert("Can't create opengl renderer. You might be missing some required opengl extensions, check the logs for more info");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_swapRequested = FALSE;
|
s_swapRequested = FALSE;
|
||||||
s_efbAccessRequested = FALSE;
|
s_efbAccessRequested = FALSE;
|
||||||
s_FifoShuttingDown = FALSE;
|
s_FifoShuttingDown = FALSE;
|
||||||
|
|
||||||
CommandProcessor::Init();
|
CommandProcessor::Init();
|
||||||
PixelEngine::Init();
|
PixelEngine::Init();
|
||||||
|
|
||||||
TextureMngr::Init();
|
TextureMngr::Init();
|
||||||
|
|
||||||
BPInit();
|
BPInit();
|
||||||
VertexManager::Init();
|
VertexManager::Init();
|
||||||
Fifo_Init(); // must be done before OpcodeDecoder_Init()
|
Fifo_Init(); // must be done before OpcodeDecoder_Init()
|
||||||
OpcodeDecoder_Init();
|
OpcodeDecoder_Init();
|
||||||
VertexShaderCache::Init();
|
VertexShaderCache::Init();
|
||||||
VertexShaderManager::Init();
|
VertexShaderManager::Init();
|
||||||
PixelShaderCache::Init();
|
PixelShaderCache::Init();
|
||||||
PixelShaderManager::Init();
|
PixelShaderManager::Init();
|
||||||
PostProcessing::Init();
|
PostProcessing::Init();
|
||||||
GL_REPORT_ERRORD();
|
GL_REPORT_ERRORD();
|
||||||
VertexLoaderManager::Init();
|
VertexLoaderManager::Init();
|
||||||
TextureConverter::Init();
|
TextureConverter::Init();
|
||||||
DLCache::Init();
|
DLCache::Init();
|
||||||
|
|
||||||
s_PluginInitialized = true;
|
s_PluginInitialized = true;
|
||||||
|
@ -584,37 +580,36 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
||||||
|
|
||||||
void Video_CommandProcessorRead16(u16& _rReturnValue, const u32 _Address)
|
void Video_CommandProcessorRead16(u16& _rReturnValue, const u32 _Address)
|
||||||
{
|
{
|
||||||
CommandProcessor::Read16(_rReturnValue, _Address);
|
CommandProcessor::Read16(_rReturnValue, _Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_CommandProcessorWrite16(const u16 _Data, const u32 _Address)
|
void Video_CommandProcessorWrite16(const u16 _Data, const u32 _Address)
|
||||||
{
|
{
|
||||||
CommandProcessor::Write16(_Data, _Address);
|
CommandProcessor::Write16(_Data, _Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_PixelEngineRead16(u16& _rReturnValue, const u32 _Address)
|
void Video_PixelEngineRead16(u16& _rReturnValue, const u32 _Address)
|
||||||
{
|
{
|
||||||
PixelEngine::Read16(_rReturnValue, _Address);
|
PixelEngine::Read16(_rReturnValue, _Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_PixelEngineWrite16(const u16 _Data, const u32 _Address)
|
void Video_PixelEngineWrite16(const u16 _Data, const u32 _Address)
|
||||||
{
|
{
|
||||||
PixelEngine::Write16(_Data, _Address);
|
PixelEngine::Write16(_Data, _Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_PixelEngineWrite32(const u32 _Data, const u32 _Address)
|
void Video_PixelEngineWrite32(const u32 _Data, const u32 _Address)
|
||||||
{
|
{
|
||||||
PixelEngine::Write32(_Data, _Address);
|
PixelEngine::Write32(_Data, _Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_GatherPipeBursted(void)
|
void Video_GatherPipeBursted(void)
|
||||||
{
|
{
|
||||||
CommandProcessor::GatherPipeBursted();
|
CommandProcessor::GatherPipeBursted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_WaitForFrameFinish(void)
|
void Video_WaitForFrameFinish(void)
|
||||||
{
|
{
|
||||||
CommandProcessor::WaitForFrameFinish();
|
CommandProcessor::WaitForFrameFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -109,29 +107,29 @@ HWND GetWnd()
|
||||||
|
|
||||||
HWND GetParentWnd()
|
HWND GetParentWnd()
|
||||||
{
|
{
|
||||||
return m_hParent;
|
return m_hParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND GetChildParentWnd()
|
HWND GetChildParentWnd()
|
||||||
{
|
{
|
||||||
return m_hMain;
|
return m_hMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
switch( iMsg )
|
switch( iMsg )
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
PostMessage(m_hMain, WM_USER, WM_USER_CREATE, (int)m_hParent);
|
PostMessage(m_hMain, WM_USER, WM_USER_CREATE, (int)m_hParent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
hdc = BeginPaint( hWnd, &ps );
|
hdc = BeginPaint( hWnd, &ps );
|
||||||
EndPaint( hWnd, &ps );
|
EndPaint( hWnd, &ps );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
switch( LOWORD( wParam ))
|
switch( LOWORD( wParam ))
|
||||||
{
|
{
|
||||||
|
@ -140,11 +138,13 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
if (m_hParent == NULL && !g_Config.renderToMainframe)
|
if (m_hParent == NULL && !g_Config.renderToMainframe)
|
||||||
{
|
{
|
||||||
ToggleFullscreen(hWnd);
|
ToggleFullscreen(hWnd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
||||||
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
// And pause the emulation when already in Windowed mode
|
// And pause the emulation when already in Windowed mode
|
||||||
PostMessage(m_hMain, WM_USER, WM_USER_PAUSE, 0);
|
PostMessage(m_hMain, WM_USER, WM_USER_PAUSE, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
|
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -174,14 +174,14 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
it's nessesary for both the chil dwindow and separate rendering window because
|
it's nessesary for both the chil dwindow and separate rendering window because
|
||||||
moves over the rendering window do not reach the main program then. */
|
moves over the rendering window do not reach the main program then. */
|
||||||
if (GetParentWnd() == NULL) // Separate rendering window
|
if (GetParentWnd() == NULL) // Separate rendering window
|
||||||
PostMessage(m_hMain, iMsg, wParam, -1);
|
PostMessage(m_hMain, iMsg, wParam, -1);
|
||||||
else
|
else
|
||||||
PostMessage(GetParentWnd(), iMsg, wParam, lParam);
|
PostMessage(GetParentWnd(), iMsg, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* To support the separate window rendering we get the message back here. So we basically
|
/* To support the separate window rendering we get the message back here. So we basically
|
||||||
only let it pass through Dolphin > Frame.cpp to determine if it should be on or off
|
only let it pass through Dolphin > Frame.cpp to determine if it should be on or off
|
||||||
and coordinate it with the other settings if nessesary */
|
and coordinate it with the other settings if necessary */
|
||||||
case WM_USER:
|
case WM_USER:
|
||||||
if (wParam == WM_USER_STOP)
|
if (wParam == WM_USER_STOP)
|
||||||
SetCursor((lParam) ? hCursor : hCursorBlank);
|
SetCursor((lParam) ? hCursor : hCursorBlank);
|
||||||
|
@ -189,7 +189,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
PostMessage(m_hMain, WM_USER, wParam, lParam);
|
PostMessage(m_hMain, WM_USER, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Post thes mouse events to the main window, it's nessesary becase in difference to the
|
/* Post these mouse events to the main window, it's nessesary becase in difference to the
|
||||||
keyboard inputs these events only appear here, not in the main WndProc() */
|
keyboard inputs these events only appear here, not in the main WndProc() */
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
|
@ -218,11 +218,13 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
case SC_SCREENSAVE:
|
case SC_SCREENSAVE:
|
||||||
case SC_MONITORPOWER:
|
case SC_MONITORPOWER:
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
return DefWindowProc(hWnd, iMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,45 +253,45 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
||||||
CreateCursors(m_hInstance);
|
CreateCursors(m_hInstance);
|
||||||
|
|
||||||
// Create child window
|
// Create child window
|
||||||
if (parent)
|
if (parent)
|
||||||
{
|
{
|
||||||
m_hParent = m_hMain = parent;
|
m_hParent = m_hMain = parent;
|
||||||
|
|
||||||
m_hWnd = CreateWindow(m_szClassName, title,
|
m_hWnd = CreateWindow(m_szClassName, title,
|
||||||
WS_CHILD,
|
WS_CHILD,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
parent, NULL, hInstance, NULL);
|
parent, NULL, hInstance, NULL);
|
||||||
|
|
||||||
ShowWindow(m_hWnd, SW_SHOWMAXIMIZED);
|
ShowWindow(m_hWnd, SW_SHOWMAXIMIZED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new separate window
|
// Create new separate window
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
||||||
|
|
||||||
RECT rc = {0, 0, width, height};
|
RECT rc = {0, 0, width, height};
|
||||||
AdjustWindowRect(&rc, style, false);
|
AdjustWindowRect(&rc, style, false);
|
||||||
|
|
||||||
int w = rc.right - rc.left;
|
int w = rc.right - rc.left;
|
||||||
int h = rc.bottom - rc.top;
|
int h = rc.bottom - rc.top;
|
||||||
|
|
||||||
rc.left = (1280 - w)/2;
|
rc.left = (1280 - w)/2;
|
||||||
rc.right = rc.left + w;
|
rc.right = rc.left + w;
|
||||||
rc.top = (1024 - h)/2;
|
rc.top = (1024 - h)/2;
|
||||||
rc.bottom = rc.top + h;
|
rc.bottom = rc.top + h;
|
||||||
|
|
||||||
// I save this to m_hMain instead of m_hParent because it casused problems otherwise
|
// I save this to m_hMain instead of m_hParent because it casused problems otherwise
|
||||||
m_hMain = (HWND)g_VideoInitialize.pWindowHandle;
|
m_hMain = (HWND)g_VideoInitialize.pWindowHandle;
|
||||||
|
|
||||||
m_hWnd = CreateWindow(m_szClassName, title,
|
m_hWnd = CreateWindow(m_szClassName, title,
|
||||||
style,
|
style,
|
||||||
rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top,
|
rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top,
|
||||||
parent, NULL, hInstance, NULL );
|
parent, NULL, hInstance, NULL );
|
||||||
|
|
||||||
g_winstyle = GetWindowLong( m_hWnd, GWL_STYLE );
|
g_winstyle = GetWindowLong( m_hWnd, GWL_STYLE );
|
||||||
g_winstyle &= ~WS_MAXIMIZE & ~WS_MINIMIZE; // remove minimize/maximize style
|
g_winstyle &= ~WS_MAXIMIZE & ~WS_MINIMIZE; // remove minimize/maximize style
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_hWnd;
|
return m_hWnd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(WiimoteBasicConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(WiimoteBasicConfigDialog,wxDialog)
|
||||||
EVT_CLOSE(WiimoteBasicConfigDialog::OnClose)
|
EVT_CLOSE(WiimoteBasicConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_OK, WiimoteBasicConfigDialog::ButtonClick)
|
EVT_BUTTON(wxID_OK, WiimoteBasicConfigDialog::ButtonClick)
|
||||||
EVT_BUTTON(ID_CANCEL, WiimoteBasicConfigDialog::ButtonClick)
|
EVT_BUTTON(wxID_CANCEL, WiimoteBasicConfigDialog::ButtonClick)
|
||||||
EVT_BUTTON(ID_BUTTONMAPPING, WiimoteBasicConfigDialog::ButtonClick)
|
EVT_BUTTON(ID_BUTTONMAPPING, WiimoteBasicConfigDialog::ButtonClick)
|
||||||
EVT_BUTTON(ID_BUTTONRECORDING, WiimoteBasicConfigDialog::ButtonClick)
|
EVT_BUTTON(ID_BUTTONRECORDING, WiimoteBasicConfigDialog::ButtonClick)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimoteBasicConfigDialog::NotebookPageChanged)
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimoteBasicConfigDialog::NotebookPageChanged)
|
||||||
|
@ -81,12 +81,12 @@ void WiimoteBasicConfigDialog::ButtonClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch(event.GetId())
|
switch(event.GetId())
|
||||||
{
|
{
|
||||||
case ID_OK:
|
case wxID_OK:
|
||||||
WiiMoteReal::Allocate();
|
WiiMoteReal::Allocate();
|
||||||
g_Config.Save();
|
g_Config.Save();
|
||||||
Close();
|
Close();
|
||||||
break;
|
break;
|
||||||
case ID_CANCEL:
|
case wxID_CANCEL:
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
Close();
|
Close();
|
||||||
break;
|
break;
|
||||||
|
@ -256,9 +256,9 @@ void WiimoteBasicConfigDialog::CreateGUIControls()
|
||||||
m_ButtonMapping = new wxButton(this, ID_BUTTONMAPPING, wxT("Button Mapping"));
|
m_ButtonMapping = new wxButton(this, ID_BUTTONMAPPING, wxT("Button Mapping"));
|
||||||
m_Recording = new wxButton(this, ID_BUTTONRECORDING, wxT("Recording"));
|
m_Recording = new wxButton(this, ID_BUTTONRECORDING, wxT("Recording"));
|
||||||
|
|
||||||
m_OK = new wxButton(this, ID_OK, wxT("OK"));
|
m_OK = new wxButton(this, wxID_OK, wxT("OK"));
|
||||||
m_OK->SetToolTip(wxT("Save changes and close"));
|
m_OK->SetToolTip(wxT("Save changes and close"));
|
||||||
m_Cancel = new wxButton(this, ID_CANCEL, wxT("Cancel"));
|
m_Cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
|
||||||
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
m_Cancel->SetToolTip(wxT("Discard changes and close"));
|
||||||
|
|
||||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
|
@ -36,7 +36,7 @@ class WiimoteBasicConfigDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiimoteBasicConfigDialog(wxWindow *parent,
|
WiimoteBasicConfigDialog(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -107,8 +107,6 @@ class WiimoteBasicConfigDialog : public wxDialog
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_OK = 1000,
|
|
||||||
ID_CANCEL,
|
|
||||||
ID_BUTTONMAPPING,
|
ID_BUTTONMAPPING,
|
||||||
ID_BUTTONRECORDING,
|
ID_BUTTONRECORDING,
|
||||||
IDTM_SHUTDOWN,
|
IDTM_SHUTDOWN,
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
BEGIN_EVENT_TABLE(WiimotePadConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(WiimotePadConfigDialog,wxDialog)
|
||||||
|
|
||||||
EVT_CLOSE(WiimotePadConfigDialog::OnClose)
|
EVT_CLOSE(WiimotePadConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE, WiimotePadConfigDialog::CloseClick)
|
EVT_BUTTON(wxID_CLOSE, WiimotePadConfigDialog::CloseClick)
|
||||||
// EVT_BUTTON(ID_APPLY, WiimotePadConfigDialog::CloseClick)
|
// EVT_BUTTON(wxID_APPLY, WiimotePadConfigDialog::CloseClick)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimotePadConfigDialog::NotebookPageChanged)
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, WiimotePadConfigDialog::NotebookPageChanged)
|
||||||
|
|
||||||
EVT_TIMER(IDTM_BUTTON, WiimotePadConfigDialog::OnButtonTimer)
|
EVT_TIMER(IDTM_BUTTON, WiimotePadConfigDialog::OnButtonTimer)
|
||||||
|
@ -182,10 +182,10 @@ void WiimotePadConfigDialog::CloseClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch(event.GetId())
|
switch(event.GetId())
|
||||||
{
|
{
|
||||||
case ID_CLOSE:
|
case wxID_CLOSE:
|
||||||
Close();
|
Close();
|
||||||
break;
|
break;
|
||||||
case ID_APPLY:
|
case wxID_APPLY:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -922,8 +922,8 @@ void WiimotePadConfigDialog::CreatePadGUIControls()
|
||||||
m_Controller[i]->SetSizer(m_sMain[i]);
|
m_Controller[i]->SetSizer(m_sMain[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_Apply = new wxButton(this, ID_APPLY, wxT("Apply"));
|
// m_Apply = new wxButton(this, wxID_APPLY, wxT("Apply"));
|
||||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"));
|
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"));
|
||||||
|
|
||||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sButtons->AddStretchSpacer();
|
sButtons->AddStretchSpacer();
|
||||||
|
|
|
@ -45,7 +45,7 @@ class WiimotePadConfigDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiimotePadConfigDialog(wxWindow *parent,
|
WiimotePadConfigDialog(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -120,9 +120,7 @@ class WiimotePadConfigDialog : public wxDialog
|
||||||
IDB_ANALOG_RIGHT_X, IDB_ANALOG_RIGHT_Y,
|
IDB_ANALOG_RIGHT_X, IDB_ANALOG_RIGHT_Y,
|
||||||
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
IDB_TRIGGER_L, IDB_TRIGGER_R,
|
||||||
|
|
||||||
ID_CLOSE = 1000,
|
IDTM_BUTTON = 1000, // Timer
|
||||||
ID_APPLY,
|
|
||||||
IDTM_BUTTON, // Timer
|
|
||||||
IDTM_UPDATE_PAD, // Timer
|
IDTM_UPDATE_PAD, // Timer
|
||||||
|
|
||||||
ID_NOTEBOOK,
|
ID_NOTEBOOK,
|
||||||
|
|
|
@ -339,8 +339,8 @@ void WiimoteRecordingConfigDialog::CreateGUIControlsRecording()
|
||||||
|
|
||||||
m_PageRecording->SetSizer(m_sRecordingMain);
|
m_PageRecording->SetSizer(m_sRecordingMain);
|
||||||
|
|
||||||
m_Apply = new wxButton(this, ID_APPLY, wxT("Apply"));
|
m_Apply = new wxButton(this, wxID_APPLY, wxT("Apply"));
|
||||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"));
|
m_Close = new wxButton(this, wxID_CLOSE, wxT("Close"));
|
||||||
m_Close->SetToolTip(wxT("Apply and Close"));
|
m_Close->SetToolTip(wxT("Apply and Close"));
|
||||||
|
|
||||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(WiimoteRecordingConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(WiimoteRecordingConfigDialog,wxDialog)
|
||||||
EVT_CLOSE(WiimoteRecordingConfigDialog::OnClose)
|
EVT_CLOSE(WiimoteRecordingConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE, WiimoteRecordingConfigDialog::CloseClick)
|
EVT_BUTTON(wxID_CLOSE, WiimoteRecordingConfigDialog::CloseClick)
|
||||||
EVT_BUTTON(ID_APPLY, WiimoteRecordingConfigDialog::CloseClick)
|
EVT_BUTTON(wxID_APPLY, WiimoteRecordingConfigDialog::CloseClick)
|
||||||
|
|
||||||
EVT_CHOICE(IDC_RECORD + 1, WiimoteRecordingConfigDialog::RecordingChanged)
|
EVT_CHOICE(IDC_RECORD + 1, WiimoteRecordingConfigDialog::RecordingChanged)
|
||||||
EVT_CHOICE(IDC_RECORD + 2, WiimoteRecordingConfigDialog::RecordingChanged)
|
EVT_CHOICE(IDC_RECORD + 2, WiimoteRecordingConfigDialog::RecordingChanged)
|
||||||
|
@ -65,8 +65,7 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
WiimoteRecordingConfigDialog::WiimoteRecordingConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title,
|
WiimoteRecordingConfigDialog::WiimoteRecordingConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title,
|
||||||
const wxPoint &position, const wxSize& size, long style)
|
const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
(parent, id, title, position, size, style)
|
|
||||||
{
|
{
|
||||||
#if wxUSE_TIMER
|
#if wxUSE_TIMER
|
||||||
m_TimeoutTimer = new wxTimer(this, IDTM_UPDATE);
|
m_TimeoutTimer = new wxTimer(this, IDTM_UPDATE);
|
||||||
|
@ -96,13 +95,13 @@ void WiimoteRecordingConfigDialog::CloseClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch(event.GetId())
|
switch(event.GetId())
|
||||||
{
|
{
|
||||||
case ID_CLOSE:
|
case wxID_CLOSE:
|
||||||
#if HAVE_WIIUSE
|
#if HAVE_WIIUSE
|
||||||
if (!WiiMoteReal::SafeClose())
|
if (!WiiMoteReal::SafeClose())
|
||||||
#endif
|
#endif
|
||||||
Close();
|
Close();
|
||||||
break;
|
break;
|
||||||
case ID_APPLY:
|
case wxID_APPLY:
|
||||||
SaveFile();
|
SaveFile();
|
||||||
WiiMoteEmu::LoadRecordedMovements();
|
WiiMoteEmu::LoadRecordedMovements();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -34,7 +34,7 @@ class WiimoteRecordingConfigDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiimoteRecordingConfigDialog(wxWindow *parent,
|
WiimoteRecordingConfigDialog(wxWindow *parent,
|
||||||
wxWindowID id = 1,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@ -103,9 +103,7 @@ class WiimoteRecordingConfigDialog : public wxDialog
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_CLOSE = 1000,
|
ID_RECORDINGPAGE = 1000,
|
||||||
ID_APPLY,
|
|
||||||
ID_RECORDINGPAGE,
|
|
||||||
IDTM_UPDATE,
|
IDTM_UPDATE,
|
||||||
|
|
||||||
// Real
|
// Real
|
||||||
|
|
|
@ -108,8 +108,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||||
wxUninitialize();
|
wxUninitialize();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = hinstDLL;
|
g_hInstance = hinstDLL;
|
||||||
|
@ -138,12 +136,12 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||||
_PluginInfo->Version = 0x0100;
|
_PluginInfo->Version = 0x0100;
|
||||||
_PluginInfo->Type = PLUGIN_TYPE_WIIMOTE;
|
_PluginInfo->Type = PLUGIN_TYPE_WIIMOTE;
|
||||||
#ifdef DEBUGFAST
|
#ifdef DEBUGFAST
|
||||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin (DebugFast)");
|
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin (DebugFast)");
|
||||||
#else
|
#else
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin");
|
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin");
|
||||||
#else
|
#else
|
||||||
sprintf(_PluginInfo->Name, "Dolphin Wiimote Plugin (Debug)");
|
sprintf_s(_PluginInfo->Name, "Dolphin Wiimote Plugin (Debug)");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -168,18 +166,19 @@ void DllConfig(HWND _hParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_BasicConfigFrame)
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
{
|
m_BasicConfigFrame = new WiimoteBasicConfigDialog(frame);
|
||||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
|
||||||
m_BasicConfigFrame = new WiimoteBasicConfigDialog(frame);
|
frame->Disable();
|
||||||
m_BasicConfigFrame->ShowModal();
|
m_BasicConfigFrame->ShowModal();
|
||||||
m_BasicConfigFrame->Destroy();
|
frame->Enable();
|
||||||
m_BasicConfigFrame = NULL;
|
|
||||||
|
m_BasicConfigFrame->Destroy();
|
||||||
|
m_BasicConfigFrame = NULL;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
frame->SetHWND(NULL);
|
frame->SetHWND(NULL);
|
||||||
#endif
|
#endif
|
||||||
delete frame;
|
frame->Destroy();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,18 +188,11 @@ void Initialize(void *init)
|
||||||
g_EmulatorRunning = true;
|
g_EmulatorRunning = true;
|
||||||
g_WiimoteInitialize = *(SWiimoteInitialize *)init;
|
g_WiimoteInitialize = *(SWiimoteInitialize *)init;
|
||||||
|
|
||||||
// Update the GUI if the configuration window is already open
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (m_BasicConfigFrame)
|
// Load the ISO Id
|
||||||
{
|
g_ISOId = g_WiimoteInitialize.ISOId;
|
||||||
// Save the settings
|
// Load the settings
|
||||||
g_Config.Save();
|
g_Config.Load();
|
||||||
// Load the ISO Id
|
|
||||||
g_ISOId = g_WiimoteInitialize.ISOId;
|
|
||||||
// Load the settings
|
|
||||||
g_Config.Load();
|
|
||||||
m_BasicConfigFrame->UpdateGUI();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
WMdisplay = (Display*)g_WiimoteInitialize.hWnd;
|
WMdisplay = (Display*)g_WiimoteInitialize.hWnd;
|
||||||
|
|
Loading…
Reference in New Issue