mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Don't call into wx in static initializers - crashes on Windows.
This commit is contained in:
parent
66ed9a1804
commit
299421a02a
@ -15,8 +15,6 @@
|
||||
#include "WxUtils.h"
|
||||
|
||||
#define MAX_CHEAT_SEARCH_RESULTS_DISPLAY 256
|
||||
const wxString title = _("Cheats Manager");
|
||||
|
||||
extern std::vector<ActionReplay::ARCode> arCodes;
|
||||
extern CFrame* main_frame;
|
||||
|
||||
@ -24,7 +22,7 @@ extern CFrame* main_frame;
|
||||
static wxCheatsWindow *g_cheat_window;
|
||||
|
||||
wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
|
||||
: wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxDIALOG_NO_PARENT)
|
||||
: wxDialog(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxDIALOG_NO_PARENT)
|
||||
{
|
||||
::g_cheat_window = this;
|
||||
|
||||
@ -254,6 +252,8 @@ void wxCheatsWindow::UpdateGUI()
|
||||
// enable controls
|
||||
button_apply->Enable(Core::IsRunning());
|
||||
|
||||
wxString title = _("Cheats Manager");
|
||||
|
||||
// write the ISO name in the title
|
||||
if (Core::IsRunning())
|
||||
SetTitle(title + ": " + Core::g_CoreStartupParameter.GetUniqueID() + " - " + Core::g_CoreStartupParameter.m_strName);
|
||||
|
@ -99,32 +99,35 @@ struct PauseEventMap
|
||||
const wxString ListStr;
|
||||
};
|
||||
|
||||
static PauseEventMap pauseEventMap[] = {
|
||||
{NEXT_FRAME, _("Frame")},
|
||||
{NEXT_FLUSH, _("Flush")},
|
||||
|
||||
{NEXT_PIXEL_SHADER_CHANGE, _("Pixel Shader")},
|
||||
{NEXT_VERTEX_SHADER_CHANGE, _("Vertex Shader")},
|
||||
{NEXT_TEXTURE_CHANGE, _("Texture")},
|
||||
{NEXT_NEW_TEXTURE, _("New Texture")},
|
||||
|
||||
{NEXT_XFB_CMD, _("XFB Cmd")},
|
||||
{NEXT_EFB_CMD, _("EFB Cmd")},
|
||||
|
||||
{NEXT_MATRIX_CMD, _("Matrix Cmd")},
|
||||
{NEXT_VERTEX_CMD, _("Vertex Cmd")},
|
||||
{NEXT_TEXTURE_CMD, _("Texture Cmd")},
|
||||
{NEXT_LIGHT_CMD, _("Light Cmd")},
|
||||
{NEXT_FOG_CMD, _("Fog Cmd")},
|
||||
|
||||
{NEXT_SET_TLUT, _("TLUT Cmd")},
|
||||
|
||||
{NEXT_ERROR, _("Error")}
|
||||
};
|
||||
static const int numPauseEventMap = sizeof(pauseEventMap)/sizeof(PauseEventMap);
|
||||
static PauseEventMap* pauseEventMap;
|
||||
|
||||
void GFXDebuggerPanel::CreateGUIControls()
|
||||
{
|
||||
static PauseEventMap map[] = {
|
||||
{NEXT_FRAME, _("Frame")},
|
||||
{NEXT_FLUSH, _("Flush")},
|
||||
|
||||
{NEXT_PIXEL_SHADER_CHANGE, _("Pixel Shader")},
|
||||
{NEXT_VERTEX_SHADER_CHANGE, _("Vertex Shader")},
|
||||
{NEXT_TEXTURE_CHANGE, _("Texture")},
|
||||
{NEXT_NEW_TEXTURE, _("New Texture")},
|
||||
|
||||
{NEXT_XFB_CMD, _("XFB Cmd")},
|
||||
{NEXT_EFB_CMD, _("EFB Cmd")},
|
||||
|
||||
{NEXT_MATRIX_CMD, _("Matrix Cmd")},
|
||||
{NEXT_VERTEX_CMD, _("Vertex Cmd")},
|
||||
{NEXT_TEXTURE_CMD, _("Texture Cmd")},
|
||||
{NEXT_LIGHT_CMD, _("Light Cmd")},
|
||||
{NEXT_FOG_CMD, _("Fog Cmd")},
|
||||
|
||||
{NEXT_SET_TLUT, _("TLUT Cmd")},
|
||||
|
||||
{NEXT_ERROR, _("Error")}
|
||||
};
|
||||
pauseEventMap = map;
|
||||
const int numPauseEventMap = sizeof(map)/sizeof(PauseEventMap);
|
||||
|
||||
// Basic settings
|
||||
CenterOnParent();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user