mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Trying to make a button that disable panic alerts popups please test
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2680 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -38,6 +38,7 @@ EVT_CLOSE(CConfigMain::OnClose)
|
||||
EVT_BUTTON(wxID_CLOSE, CConfigMain::CloseClick)
|
||||
|
||||
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::CoreSettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::CoreSettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_HIDECURSOR, CConfigMain::CoreSettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_AUTOHIDECURSOR, CConfigMain::CoreSettingsChanged)
|
||||
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::CoreSettingsChanged)
|
||||
@ -199,6 +200,11 @@ void CConfigMain::CreateGUIControls()
|
||||
// Confirm on stop
|
||||
ConfirmStop = new wxCheckBox(GeneralPage, ID_INTERFACE_CONFIRMSTOP, wxT("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
ConfirmStop->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop);
|
||||
|
||||
// Use Panic Handlers
|
||||
UsePanicHandlers = new wxCheckBox(GeneralPage, ID_INTERFACE_USEPANICHANDLERS, wxT("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
UsePanicHandlers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
|
||||
|
||||
// Hide Cursor
|
||||
wxStaticText *HideCursorText = new wxStaticText(GeneralPage, ID_INTERFACE_HIDECURSOR_TEXT, wxT("Hide Cursor:"), wxDefaultPosition, wxDefaultSize);
|
||||
AutoHideCursor = new wxCheckBox(GeneralPage, ID_INTERFACE_AUTOHIDECURSOR, wxT("Auto"));
|
||||
@ -234,6 +240,7 @@ void CConfigMain::CreateGUIControls()
|
||||
UseDynaRec->SetToolTip(wxT("Disabling this will cause Dolphin to run in interpreter mode,"
|
||||
"\nwhich can be more accurate, but is MUCH slower"));
|
||||
ConfirmStop->SetToolTip(wxT("Show a confirmation box before stopping a game."));
|
||||
UsePanicHandlers->SetToolTip(wxT("Show Panic Alerts Popups"));
|
||||
AutoHideCursor->SetToolTip(wxT("This will auto hide the cursor in fullscreen mode."));
|
||||
HideCursor->SetToolTip(wxT("This will always hide the cursor when it's over the rendering window."
|
||||
"\nIt can be convenient in a Wii game that already has a cursor."));
|
||||
@ -265,6 +272,7 @@ void CConfigMain::CreateGUIControls()
|
||||
|
||||
sbInterface = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Interface Settings"));
|
||||
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
|
||||
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
|
||||
wxBoxSizer *sHideCursor = new wxBoxSizer(wxHORIZONTAL);
|
||||
sHideCursor->Add(HideCursorText);
|
||||
sHideCursor->Add(AutoHideCursor, 0, wxLEFT, 5);
|
||||
@ -570,6 +578,10 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
|
||||
case ID_INTERFACE_CONFIRMSTOP: // Interface
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop = ConfirmStop->IsChecked();
|
||||
break;
|
||||
case ID_INTERFACE_USEPANICHANDLERS: // Interface
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = UsePanicHandlers->IsChecked();
|
||||
SetEnableAlert(UsePanicHandlers->IsChecked());
|
||||
break;
|
||||
case ID_INTERFACE_AUTOHIDECURSOR:
|
||||
if (AutoHideCursor->IsChecked()) HideCursor->SetValue(!AutoHideCursor->IsChecked()); // Update the other one
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bAutoHideCursor = AutoHideCursor->IsChecked();
|
||||
|
@ -49,7 +49,8 @@ class CConfigMain
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
wxBoxSizer* sGeneralPage; // General Settings
|
||||
wxCheckBox* ConfirmStop, * AutoHideCursor, *HideCursor;
|
||||
wxCheckBox* ConfirmStop, *AutoHideCursor;
|
||||
wxCheckBox* HideCursor, *UsePanicHandlers;
|
||||
wxCheckBox* WiimoteStatusLEDs, * WiimoteStatusSpeakers;
|
||||
|
||||
wxArrayString arrayStringFor_InterfaceLang;
|
||||
@ -217,6 +218,7 @@ class CConfigMain
|
||||
ID_ENABLECHEATS,
|
||||
|
||||
ID_INTERFACE_CONFIRMSTOP, // Interface settings
|
||||
ID_INTERFACE_USEPANICHANDLERS,
|
||||
ID_INTERFACE_HIDECURSOR_TEXT, ID_INTERFACE_HIDECURSOR, ID_INTERFACE_AUTOHIDECURSOR,
|
||||
ID_INTERFACE_WIIMOTE_TEXT, ID_INTERFACE_WIIMOTE_LEDS, ID_INTERFACE_WIIMOTE_SPEAKERS,
|
||||
ID_INTERFACE_LANG_TEXT, ID_INTERFACE_LANG,
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "LogWindow.h"
|
||||
#include "Console.h"
|
||||
|
||||
#define UPDATETIME 1000
|
||||
#define UPDATETIME 100
|
||||
|
||||
BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||
EVT_BUTTON(IDM_SUBMITCMD, CLogWindow::OnSubmit)
|
||||
|
@ -128,30 +128,18 @@ bool DolphinApp::OnInit()
|
||||
#ifdef _WIN32
|
||||
EXTENDEDTRACEINITIALIZE(".");
|
||||
SetUnhandledExceptionFilter(&MyUnhandledExceptionFilter);
|
||||
|
||||
#endif
|
||||
|
||||
// TODO: if First Boot
|
||||
if (!cpu_info.bSSE2)
|
||||
{
|
||||
MessageBox(0, _T("Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\n"
|
||||
PanicAlert("Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\n"
|
||||
"Unfortunately your CPU does not support them, so Dolphin will not run.\n\n"
|
||||
"Sayonara!\n"), "Dolphin", MB_ICONINFORMATION);
|
||||
"Sayonara!\n");
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (!cpu_info.bSSE2)
|
||||
{
|
||||
printf("%s", "Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\n"
|
||||
"Unfortunately your CPU does not support them, so Dolphin will not run.\n\n"
|
||||
"Sayonara!\n");
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
// ---------------
|
||||
|
||||
|
||||
// ------------------------------------------
|
||||
// Parse command lines
|
||||
// ---------------
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
wxCmdLineEntryDesc cmdLineDesc[] =
|
||||
{
|
||||
@ -221,17 +209,19 @@ bool DolphinApp::OnInit()
|
||||
// ============
|
||||
#endif
|
||||
|
||||
// Load CONFIG_FILE settings
|
||||
// Load CONFIG_FILE settings
|
||||
SConfig::GetInstance().LoadSettings();
|
||||
|
||||
// Enable the PNG image handler
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
// Enable the PNG image handler
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
SetEnableAlert(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
|
||||
|
||||
// Create the window title
|
||||
#ifdef _DEBUG
|
||||
const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
|
||||
const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
|
||||
#else
|
||||
const char *title = "Dolphin SVN R " SVN_REV_STR;
|
||||
const char *title = "Dolphin SVN R " SVN_REV_STR;
|
||||
#endif
|
||||
|
||||
// If we are debugging let use save the main window position and size
|
||||
|
Reference in New Issue
Block a user