pcsx2-gui: Some menu changes (#3597)

* Reshuffle and reorganize  menus. Add a help menu with links to the main website, forums, github page, wiki, and getting started pages.

* Change fast boot to an option.

* Make the Debug window menu option checkable, similar to the Log window.

* Move log settings to the Log menu.

* Add more information to the status bar.

* Moved a few things around. Added Compatibility to the Help menu.

* Removed Pcsx2 from the menu item names in the Help menu, and rearranged a bit.

* Fix crash on cancelling.

* Status bar changes.

* Add minimize/maximize flags to debug window.

* Don't strip out the maximize and minimize boxes on the debugger in weird Windows-only code.

* Add Help button. Fix Help dialog on Linux.

* Remove no longer used Windows code for Debug window.
This commit is contained in:
arcum42 2020-08-23 16:10:39 -07:00 committed by GitHub
parent c8042fe937
commit eeca29b6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 356 additions and 308 deletions

View File

@ -70,15 +70,15 @@ static const bool CloseViewportWithPlugins = false;
enum TopLevelMenuIndices
{
TopLevelMenu_System = 0,
TopLevelMenu_Pcsx2 = 0,
TopLevelMenu_Cdvd,
TopLevelMenu_Config,
TopLevelMenu_Misc,
TopLevelMenu_Debug,
TopLevelMenu_Window,
TopLevelMenu_Capture,
#ifndef DISABLE_RECORDING
TopLevelMenu_Recording,
#endif
TopLevelMenu_Help
};
enum MenuIdentifiers
@ -117,6 +117,7 @@ enum MenuIdentifiers
MenuId_Sys_LoadStates, // Opens load states submenu
MenuId_Sys_SaveStates, // Opens save states submenu
MenuId_EnableBackupStates, // Checkbox to enable/disables savestates backup
MenuId_GameSettingsSubMenu,
MenuId_EnablePatches,
MenuId_EnableCheats,
MenuId_EnableWideScreenPatches,
@ -153,6 +154,14 @@ enum MenuIdentifiers
MenuId_Config_Multitap0Toggle,
MenuId_Config_Multitap1Toggle,
MenuId_Config_FastBoot,
MenuId_Help_GetStarted,
MenuId_Help_Compatibility,
MenuId_Help_Forums,
MenuId_Help_Website,
MenuId_Help_Wiki,
MenuId_Help_Github,
// Plugin Sections
// ---------------

View File

@ -525,6 +525,7 @@ AppConfig::AppConfig()
#endif
EnableSpeedHacks = true;
EnableGameFixes = false;
EnableFastBoot = true;
EnablePresets = true;
PresetIndex = 1;
@ -646,6 +647,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
IniEntry( EnableSpeedHacks );
IniEntry( EnableGameFixes );
IniEntry( EnableFastBoot );
IniEntry( EnablePresets );
IniEntry( PresetIndex );
@ -1032,7 +1034,6 @@ bool AppConfig::IsOkApplyPreset(int n, bool ignoreMTVU)
Framerate.SlomoScalar = original_Framerate.SlomoScalar;
Framerate.TurboScalar = original_Framerate.TurboScalar;
EnableSpeedHacks = false;
EnableGameFixes = false;
EmuOptions.EnablePatches = true;

View File

@ -309,6 +309,7 @@ public:
// (the toggle is applied when a new EmuConfig is sent through AppCoreThread::ApplySettings)
bool EnableSpeedHacks;
bool EnableGameFixes;
bool EnableFastBoot;
// Presets try to prevent users from overwhelming when they want to change settings (usually to make a game run faster).
// The presets allow to modify the balance between emulation accuracy and emulation speed using a pseudo-linear control.

View File

@ -1178,6 +1178,7 @@ void SysUpdateIsoSrcFile( const wxString& newIsoFile )
{
g_Conf->CurrentIso = newIsoFile;
sMainFrame.UpdateIsoSrcSelection();
sMainFrame.UpdateStatusBar();
}
bool HasMainFrame()

View File

@ -22,6 +22,7 @@
#include "Utilities/Console.h"
#include "Utilities/IniInterface.h"
#include "Utilities/SafeArray.inl"
#include "Dialogs/LogOptionsDialog.h"
#include "DebugTools/Debug.h"
#include <wx/textfile.h>
@ -243,6 +244,7 @@ enum MenuIDs_t
MenuId_ColorScheme_Dark,
MenuId_AutoDock,
MenuId_Log_Settings,
MenuId_LogSource_EnableAll = 0x30,
MenuId_LogSource_DisableAll,
@ -433,6 +435,7 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
// _t("When checked the log window will be visible over other foreground windows."), wxITEM_CHECK );
menuLog.Append(wxID_SAVE, _("&Save..."), _("Save log contents to file"));
menuLog.Append(MenuId_Log_Settings, _("&Settings..."), _("Open the logging settings dialog"));
menuLog.Append(wxID_CLEAR, _("C&lear"), _("Clear the log window contents"));
menuLog.AppendSeparator();
menuLog.AppendCheckItem(MenuId_AutoDock, _("Auto&dock"), _("Dock log window to main PCSX2 window"))->Check(m_conf.AutoDock);
@ -479,6 +482,9 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
Bind(wxEVT_MENU, &ConsoleLogFrame::OnClose, this, wxID_CLOSE);
Bind(wxEVT_MENU, &ConsoleLogFrame::OnSave, this, wxID_SAVE);
Bind(wxEVT_MENU, &ConsoleLogFrame::OnClear, this, wxID_CLEAR);
#ifdef PCSX2_DEVBUILD
Bind(wxEVT_MENU, &ConsoleLogFrame::OnLogSettings, this, MenuId_Log_Settings);
#endif
Bind(wxEVT_MENU, &ConsoleLogFrame::OnFontSize, this, MenuId_FontSize_Small, MenuId_FontSize_Huge);
Bind(wxEVT_MENU, &ConsoleLogFrame::OnToggleTheme, this, MenuId_ColorScheme_Light, MenuId_ColorScheme_Dark);
@ -809,6 +815,11 @@ void ConsoleLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
m_TextCtrl.Clear();
}
void ConsoleLogFrame::OnLogSettings(wxCommandEvent& WXUNUSED(event))
{
AppOpenDialog<Dialogs::LogOptionsDialog>( this );
}
void ConsoleLogFrame::OnToggleCDVDInfo( wxCommandEvent& evt )
{
evt.Skip();

View File

@ -199,6 +199,7 @@ protected:
void OnClose(wxCommandEvent& event);
void OnSave (wxCommandEvent& event);
void OnClear(wxCommandEvent& event);
void OnLogSettings(wxCommandEvent& event);
void OnEnableAllLogging(wxCommandEvent& event);
void OnDisableAllLogging(wxCommandEvent& event);

View File

@ -15,6 +15,8 @@
#include "PrecompiledHeader.h"
#include "App.h"
#include "MainFrame.h"
#include "DisassemblyDialog.h"
#include "DebugTools/DebugInterface.h"
#include "DebugTools/DisassemblyManager.h"
@ -54,24 +56,24 @@ DebuggerHelpDialog::DebuggerHelpDialog(wxWindow* parent)
{
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
wxTextCtrl* textControl = new wxTextCtrl(this,wxID_ANY,L"",wxDefaultPosition,wxDefaultSize,
wxTE_MULTILINE|wxTE_READONLY);
textControl->SetMinSize(wxSize(400,300));
auto fileName = PathDefs::GetDocs().ToString()+L"/debugger.txt";
auto fileName = Path::Combine(PathDefs::GetDocs(), wxFileName(L"debugger.txt"));
wxTextFile file(fileName);
wxString text(L"");
if (file.Open())
{
wxString text = file.GetFirstLine();
text = file.GetFirstLine();
while (!file.Eof())
{
text += file.GetNextLine()+L"\r\n";
}
textControl->SetLabel(text);
textControl->SetSelection(0,0);
}
sizer->Add(textControl,1,wxEXPAND);
wxTextCtrl* textControl = new wxTextCtrl(this, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY);
textControl->SetMinSize(wxSize(400,300));
sizer->Add(textControl, 1, wxEXPAND);
SetSizerAndFit(sizer);
}
@ -227,15 +229,14 @@ u32 CpuTabPage::getStepOutAddress()
}
DisassemblyDialog::DisassemblyDialog(wxWindow* parent):
wxFrame( parent, wxID_ANY, L"Debugger", wxDefaultPosition,wxDefaultSize,wxRESIZE_BORDER|wxCLOSE_BOX|wxCAPTION|wxSYSTEM_MENU ),
wxFrame( parent, wxID_ANY, L"Debugger", wxDefaultPosition,wxDefaultSize,wxRESIZE_BORDER|wxCLOSE_BOX|wxCAPTION|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX ),
currentCpu(NULL)
{
int width = g_Conf->EmuOptions.Debugger.WindowWidth;
int height = g_Conf->EmuOptions.Debugger.WindowHeight;
topSizer = new wxBoxSizer( wxVERTICAL );
wxPanel *panel = new wxPanel(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("panel"));
wxPanel *panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("panel"));
panel->SetSizer(topSizer);
// create top row
@ -243,38 +244,42 @@ DisassemblyDialog::DisassemblyDialog(wxWindow* parent):
breakRunButton = new wxButton(panel, wxID_ANY, L"Run");
Bind(wxEVT_BUTTON, &DisassemblyDialog::onBreakRunClicked, this, breakRunButton->GetId());
topRowSizer->Add(breakRunButton,0,wxRIGHT,8);
topRowSizer->Add(breakRunButton);
stepIntoButton = new wxButton( panel, wxID_ANY, L"Step Into" );
stepIntoButton = new wxButton( panel, wxID_ANY, L"Step Into");
stepIntoButton->Enable(false);
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepIntoClicked, this, stepIntoButton->GetId());
topRowSizer->Add(stepIntoButton,0,wxBOTTOM,2);
topRowSizer->Add(stepIntoButton);
stepOverButton = new wxButton( panel, wxID_ANY, L"Step Over" );
stepOverButton = new wxButton( panel, wxID_ANY, L"Step Over");
stepOverButton->Enable(false);
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepOverClicked, this, stepOverButton->GetId());
topRowSizer->Add(stepOverButton);
stepOutButton = new wxButton( panel, wxID_ANY, L"Step Out" );
stepOutButton = new wxButton( panel, wxID_ANY, L"Step Out");
stepOutButton->Enable(false);
Bind(wxEVT_BUTTON, &DisassemblyDialog::onStepOutClicked, this, stepOutButton->GetId());
topRowSizer->Add(stepOutButton,0,wxRIGHT,8);
breakpointButton = new wxButton( panel, wxID_ANY, L"Breakpoint" );
Bind(wxEVT_BUTTON, &DisassemblyDialog::onBreakpointClick, this, breakpointButton->GetId());
topRowSizer->Add(stepOutButton);
breakpointButton = new wxButton( panel, wxID_ANY, L"Breakpoint");
Bind(wxEVT_BUTTON, &DisassemblyDialog::onBreakpointClicked, this, breakpointButton->GetId());
topRowSizer->Add(breakpointButton);
topSizer->Add(topRowSizer,0,wxLEFT|wxRIGHT|wxTOP,3);
helpButton = new wxButton( panel, wxID_ANY, L"Help");
Bind(wxEVT_BUTTON, &DisassemblyDialog::onHelpClicked, this, helpButton->GetId());
topRowSizer->Add(helpButton);
topSizer->Add(topRowSizer, 0, wxLEFT | wxRIGHT | wxTOP, 3);
// create middle part of the window
middleBook = new wxNotebook(panel,wxID_ANY);
middleBook->SetBackgroundColour(wxColour(0xFFF0F0F0));
eeTab = new CpuTabPage(middleBook,&r5900Debug);
iopTab = new CpuTabPage(middleBook,&r3000Debug);
middleBook->AddPage(eeTab,L"R5900");
middleBook->AddPage(iopTab,L"R3000");
middleBook->AddPage(eeTab, L"R5900");
middleBook->AddPage(iopTab, L"R3000");
Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, &DisassemblyDialog::onPageChanging, this, middleBook->GetId());
topSizer->Add(middleBook,3,wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM,3);
topSizer->Add(middleBook, 3, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 3);
currentCpu = eeTab;
CreateStatusBar(1);
@ -299,38 +304,6 @@ void DisassemblyDialog::onSizeEvent(wxSizeEvent& event)
event.Skip();
}
#ifdef _WIN32
WXLRESULT DisassemblyDialog::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg)
{
case WM_SHOWWINDOW:
{
WXHWND hwnd = GetHWND();
u32 style = GetWindowLong((HWND)hwnd,GWL_STYLE);
style &= ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
SetWindowLong((HWND)hwnd,GWL_STYLE,style);
u32 exStyle = GetWindowLong((HWND)hwnd,GWL_EXSTYLE);
exStyle |= (WS_EX_CONTEXTHELP);
SetWindowLong((HWND)hwnd,GWL_EXSTYLE,exStyle);
}
break;
case WM_SYSCOMMAND:
if (wParam == SC_CONTEXTHELP)
{
DebuggerHelpDialog help(this);
help.ShowModal();
return 0;
}
break;
}
return wxFrame::MSWWindowProc(nMsg,wParam,lParam);
}
#endif
void DisassemblyDialog::onBreakRunClicked(wxCommandEvent& evt)
{
if (r5900Debug.isCpuPaused())
@ -359,6 +332,12 @@ void DisassemblyDialog::onStepOutClicked(wxCommandEvent& evt)
stepOut();
}
void DisassemblyDialog::onHelpClicked(wxCommandEvent& evt)
{
DebuggerHelpDialog help(this);
help.ShowModal();
}
void DisassemblyDialog::onPageChanging(wxCommandEvent& evt)
{
wxNotebook* notebook = (wxNotebook*)wxWindow::FindWindowById(evt.GetId());
@ -481,7 +460,7 @@ void DisassemblyDialog::stepOut()
r5900Debug.resumeCpu();
}
void DisassemblyDialog::onBreakpointClick(wxCommandEvent& evt)
void DisassemblyDialog::onBreakpointClicked(wxCommandEvent& evt)
{
if (currentCpu == NULL)
return;
@ -497,6 +476,7 @@ void DisassemblyDialog::onBreakpointClick(wxCommandEvent& evt)
void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt)
{
wxEventType type = evt.GetEventType();
if (type == debEVT_SETSTATUSBARTEXT)
{
DebugInterface* cpu = reinterpret_cast<DebugInterface*>(evt.GetClientData());
@ -553,7 +533,7 @@ void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt)
} else if (type == debEVT_BREAKPOINTWINDOW)
{
wxCommandEvent evt;
onBreakpointClick(evt);
onBreakpointClicked(evt);
} else if (type == debEVT_MAPLOADED)
{
wxBusyInfo wait("Please wait, Reloading ELF functions");
@ -570,7 +550,10 @@ void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt)
void DisassemblyDialog::onClose(wxCloseEvent& evt)
{
auto* mainFrame = GetMainFramePtr();
Hide();
mainFrame->CheckMenuItem(MenuId_Debug_Open, false);
}
void DisassemblyDialog::update()

View File

@ -91,10 +91,6 @@ public:
void reset();
void populate();
void setDebugMode(bool debugMode, bool switchPC);
#ifdef _WIN32
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif
wxDECLARE_EVENT_TABLE();
protected:
@ -102,9 +98,10 @@ protected:
void onStepOverClicked(wxCommandEvent& evt);
void onStepIntoClicked(wxCommandEvent& evt);
void onStepOutClicked(wxCommandEvent& evt);
void onHelpClicked(wxCommandEvent& evt);
void onDebuggerEvent(wxCommandEvent& evt);
void onPageChanging(wxCommandEvent& evt);
void onBreakpointClick(wxCommandEvent& evt);
void onBreakpointClicked(wxCommandEvent& evt);
void onSizeEvent(wxSizeEvent& event);
void onClose(wxCloseEvent& evt);
void stepOver();
@ -118,9 +115,5 @@ private:
wxNotebook* middleBook;
wxBoxSizer* topSizer;
wxButton* breakRunButton;
wxButton* stepIntoButton;
wxButton* stepOverButton;
wxButton* stepOutButton;
wxButton* breakpointButton;
wxButton *breakRunButton, *stepIntoButton, *stepOverButton, *stepOutButton, *breakpointButton, *helpButton;
};

View File

@ -53,6 +53,26 @@ wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
return mnuSubstates;
}
void MainEmuFrame::UpdateStatusBar()
{
wxString temp(wxEmptyString);
if (g_Conf->EnableFastBoot)
temp += "Fast Boot - ";
if (g_Conf->CdvdSource == CDVD_SourceType::Iso)
temp += "Load: '" + wxFileName(g_Conf->CurrentIso).GetFullName() +"' ";
m_statusbar.SetStatusText(temp, 0);
m_statusbar.SetStatusText(CDVD_SourceLabels[enum_cast(g_Conf->CdvdSource)], 1);
#ifdef __M_X86_64
m_statusbar.SetStatusText("x64", 2);
#else
m_statusbar.SetStatusText("x32", 2);
#endif
}
void MainEmuFrame::UpdateIsoSrcSelection()
{
MenuIdentifiers cdsrc = MenuId_Src_Iso;
@ -66,12 +86,8 @@ void MainEmuFrame::UpdateIsoSrcSelection()
jNO_DEFAULT
}
sMenuBar.Check( cdsrc, true );
m_statusbar.SetStatusText( CDVD_SourceLabels[enum_cast(g_Conf->CdvdSource)], 1 );
UpdateStatusBar();
EnableCdvdPluginSubmenu( cdsrc == MenuId_Src_Plugin );
//sMenuBar.SetLabel( MenuId_Src_Iso, wxsFormat( L"%s -> %s", _("Iso"),
// exists ? Path::GetFilename(g_Conf->CurrentIso).c_str() : _("Empty") ) );
}
bool MainEmuFrame::Destroy()
@ -188,7 +204,7 @@ void MainEmuFrame::ConnectMenus()
{
// System
Bind(wxEVT_MENU, &MainEmuFrame::Menu_BootCdvd_Click, this, MenuId_Boot_CDVD);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_BootCdvd2_Click, this, MenuId_Boot_CDVD2);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_FastBoot_Click, this, MenuId_Config_FastBoot);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_OpenELF_Click, this, MenuId_Boot_ELF);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_SuspendResume_Click, this, MenuId_Sys_SuspendResume);
@ -237,12 +253,18 @@ void MainEmuFrame::ConnectMenus()
#if defined(__unix__)
Bind(wxEVT_MENU, &MainEmuFrame::Menu_ShowConsole_Stdio, this, MenuId_Console_Stdio);
#endif
Bind(wxEVT_MENU, &MainEmuFrame::Menu_GetStarted, this, MenuId_Help_GetStarted);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Compatibility, this, MenuId_Help_Compatibility);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Forums, this, MenuId_Help_Forums);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Website, this, MenuId_Help_Website);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Github, this, MenuId_Help_Github);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Wiki, this, MenuId_Help_Wiki);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_ShowAboutBox, this, MenuId_About);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_ChangeLang, this, MenuId_ChangeLang);
// Debug
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Debug_Open_Click, this, MenuId_Debug_Open);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Debug_Logging_Click, this, MenuId_Debug_Logging);
// Capture
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Capture_Video_Record_Click, this, MenuId_Capture_Video_Record);
@ -257,8 +279,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port0);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port1);
#endif
//Bind(wxEVT_MENU, &MainEmuFrame::Menu_Debug_MemoryDump_Click, this, MenuId_Debug_MemoryDump);
}
void MainEmuFrame::InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf )
@ -294,10 +314,6 @@ void MainEmuFrame::DispatchEvent( const PluginEventType& plugin_evt )
{
for( int i=0; i<PluginId_Count; ++i )
m_PluginMenuPacks[i].OnLoaded();
// bleh this makes the menu too cluttered. --air
//m_menuCDVD.SetLabel( MenuId_Src_Plugin, wxsFormat( L"%s (%s)", _("Plugin"),
// GetCorePlugins().GetName( PluginId_CDVD ).c_str() ) );
}
}
@ -322,6 +338,147 @@ static int GetPluginMenuId_Name( PluginsEnum_t pid )
return MenuId_PluginBase_Name + ((int)pid * PluginMenuId_Interval);
}
void MainEmuFrame::CreatePcsx2Menu()
{
// ------------------------------------------------------------------------
// Some of the items in the System menu are configured by the UpdateCoreStatus() method.
m_menuSys.Append(MenuId_Boot_CDVD, _("Initializing..."));
m_menuSys.Append(MenuId_Sys_SuspendResume, _("Initializing..."));
m_menuSys.Append(MenuId_Sys_Shutdown, _("Shut&down"),
_("Wipes all internal VM states and shuts down plugins."));
m_menuSys.FindItem(MenuId_Sys_Shutdown)->Enable(false);
m_menuSys.Append(MenuId_Boot_ELF, _("&Run ELF..."),
_("For running raw PS2 binaries directly"));
m_menuSys.AppendSeparator();
m_menuSys.Append( MenuId_Config_FastBoot,_("Fast Boot"),
_("Skips PS2 splash screens when booting from ISO or DVD media"), wxITEM_CHECK );
m_menuSys.AppendCheckItem(MenuId_Debug_CreateBlockdump, _("Create &Blockdump"), _("Creates a block dump for debugging purposes."));
m_menuSys.Append(MenuId_GameSettingsSubMenu, _("&Game Settings"), &m_GameSettingsSubmenu);
m_GameSettingsSubmenu.Append(MenuId_EnablePatches, _("Automatic &Gamefixes"),
_("Automatically applies needed Gamefixes to known problematic games"), wxITEM_CHECK);
m_GameSettingsSubmenu.Append(MenuId_EnableCheats, _("Enable &Cheats"),
wxEmptyString, wxITEM_CHECK);
m_GameSettingsSubmenu.Append(MenuId_EnableWideScreenPatches, _("Enable &Widescreen Patches"),
_("Enabling Widescreen Patches may occasionally cause issues."), wxITEM_CHECK);
#ifndef DISABLE_RECORDING
m_GameSettingsSubmenu.Append(MenuId_EnableRecordingTools, _("Enable &Recording Tools"),
wxEmptyString, wxITEM_CHECK);
#endif
if(IsDebugBuild || IsDevBuild)
m_GameSettingsSubmenu.Append(MenuId_EnableHostFs, _("Enable &Host Filesystem"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_Sys_LoadStates, _("&Load state"), &m_LoadStatesSubmenu);
m_menuSys.Append(MenuId_Sys_SaveStates, _("&Save state"), &m_SaveStatesSubmenu);
m_menuSys.Append(MenuId_EnableBackupStates, _("&Backup before save"), wxEmptyString, wxITEM_CHECK);
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_Exit, _("E&xit"),
AddAppName(_("Closing %s may be hazardous to your health")));
}
void MainEmuFrame::CreateCdvdMenu()
{
// ------------------------------------------------------------------------
wxMenu& isoRecents( wxGetApp().GetRecentIsoMenu() );
m_menuItem_RecentIsoMenu = m_menuCDVD.AppendSubMenu(&isoRecents, _("ISO &Selector"));
m_menuCDVD.Append( GetPluginMenuId_Settings(PluginId_CDVD), _("Plugin &Menu"), m_PluginMenuPacks[PluginId_CDVD] );
m_menuCDVD.AppendSeparator();
m_menuCDVD.Append( MenuId_Src_Iso, _("&ISO"), _("Makes the specified ISO image the CDVD source."), wxITEM_RADIO );
m_menuCDVD.Append( MenuId_Src_Plugin, _("&Plugin"), _("Uses an external plugin as the CDVD source."), wxITEM_RADIO );
m_menuCDVD.Append( MenuId_Src_NoDisc, _("&No disc"), _("Use this to boot into your virtual PS2's BIOS configuration."), wxITEM_RADIO );
}
void MainEmuFrame::CreateConfigMenu()
{
m_menuConfig.Append(MenuId_Config_SysSettings, _("Emulation &Settings...") );
m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory cards...") );
m_menuConfig.Append(MenuId_Config_BIOS, _("&Plugin/BIOS Selector...") );
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_Config_GS, _("&Video (GS)"), m_PluginMenuPacks[PluginId_GS]);
m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio (SPU2)"), m_PluginMenuPacks[PluginId_SPU2]);
m_menuConfig.Append(MenuId_Config_PAD, _("&Controllers (PAD)"),m_PluginMenuPacks[PluginId_PAD]);
m_menuConfig.Append(MenuId_Config_DEV9, _("&Dev9"), m_PluginMenuPacks[PluginId_DEV9]);
m_menuConfig.Append(MenuId_Config_USB, _("&USB"), m_PluginMenuPacks[PluginId_USB]);
m_menuConfig.Append(MenuId_Config_FireWire, _("&Firewire"), m_PluginMenuPacks[PluginId_FW]);
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_Config_Multitap0Toggle, _("Multitap &1"), wxEmptyString, wxITEM_CHECK );
m_menuConfig.Append(MenuId_Config_Multitap1Toggle, _("Multitap &2"), wxEmptyString, wxITEM_CHECK );
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_ChangeLang, L"Change &language..." ); // Always in English
m_menuConfig.Append(MenuId_Config_ResetAll, _("C&lear all settings..."),
AddAppName(_("Clears all %s settings and re-runs the startup wizard.")));
}
void MainEmuFrame::CreateWindowsMenu()
{
m_menuWindow.Append(MenuId_Debug_Open, _("&Show Debug"), wxEmptyString, wxITEM_CHECK );
m_menuWindow.Append( &m_MenuItem_Console );
#if defined(__unix__)
m_menuWindow.AppendSeparator();
m_menuWindow.Append( &m_MenuItem_Console_Stdio );
#endif
}
void MainEmuFrame::CreateCaptureMenu()
{
m_menuCapture.Append(MenuId_Capture_Video, _("Video"), &m_submenuVideoCapture);
m_submenuVideoCapture.Append(MenuId_Capture_Video_Record, _("Start Recording"));
m_submenuVideoCapture.Append(MenuId_Capture_Video_Stop, _("Stop Recording"))->Enable(false);
m_menuCapture.Append(MenuId_Capture_Screenshot, _("Screenshot"));
}
void MainEmuFrame::CreateRecordMenu()
{
m_menuRecording.Append(MenuId_Recording_New, _("New"));
m_menuRecording.Append(MenuId_Recording_Stop, _("Stop"))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Play, _("Play"));
m_menuRecording.AppendSeparator();
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port0, _("Virtual Pad (Port 1)"));
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port1, _("Virtual Pad (Port 2)"));
}
void MainEmuFrame::CreateHelpMenu()
{
m_menuHelp.Append(MenuId_Help_GetStarted, _("&Getting Started"));
m_menuHelp.Append(MenuId_Help_Compatibility, _("&Compatibility"));
m_menuHelp.AppendSeparator();
m_menuHelp.Append(MenuId_Help_Website, _("&Website"));
m_menuHelp.Append(MenuId_Help_Wiki, _("&Wiki"));
m_menuHelp.Append(MenuId_Help_Forums, _("&Support Forums"));
m_menuHelp.Append(MenuId_Help_Github, _("&Github Repository"));
m_menuHelp.AppendSeparator();
m_menuHelp.Append(MenuId_About, _("&About..."));
}
// ------------------------------------------------------------------------
MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
: wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER) )
@ -336,19 +493,20 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
, m_menuCDVD ( *new wxMenu() )
, m_menuSys ( *new wxMenu() )
, m_menuConfig ( *new wxMenu() )
, m_menuMisc ( *new wxMenu() )
, m_menuDebug ( *new wxMenu() )
, m_menuWindow ( *new wxMenu() )
, m_menuCapture ( *new wxMenu() )
, m_submenuVideoCapture ( *new wxMenu() )
#ifndef DISABLE_RECORDING
, m_menuRecording(*new wxMenu())
#endif
, m_menuHelp(*new wxMenu())
, m_LoadStatesSubmenu( *MakeStatesSubMenu( MenuId_State_Load01, MenuId_State_LoadBackup ) )
, m_SaveStatesSubmenu( *MakeStatesSubMenu( MenuId_State_Save01 ) )
, m_GameSettingsSubmenu( *new wxMenu() )
, m_MenuItem_Console( *new wxMenuItem( &m_menuMisc, MenuId_Console, _("&Show Console"), wxEmptyString, wxITEM_CHECK ) )
, m_MenuItem_Console( *new wxMenuItem( &m_menuWindow, MenuId_Console, _("&Show Console"), wxEmptyString, wxITEM_CHECK ) )
#if defined(__unix__)
, m_MenuItem_Console_Stdio( *new wxMenuItem( &m_menuMisc, MenuId_Console_Stdio, _("&Console to Stdio"), wxEmptyString, wxITEM_CHECK ) )
, m_MenuItem_Console_Stdio( *new wxMenuItem( &m_menuWindow, MenuId_Console_Stdio, _("&Console to Stdio"), wxEmptyString, wxITEM_CHECK ) )
#endif
{
@ -361,11 +519,10 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
// Initial menubar setup. This needs to be done first so that the menu bar's visible size
// can be factored into the window size (which ends up being background+status+menus)
m_menubar.Append( &m_menuSys, _("&System") );
m_menubar.Append( &m_menuSys, _("&PCSX2") );
m_menubar.Append( &m_menuCDVD, _("CD&VD") );
m_menubar.Append( &m_menuConfig, _("&Config") );
m_menubar.Append( &m_menuMisc, _("&Misc") );
m_menubar.Append( &m_menuDebug, _("&Debug") );
m_menubar.Append( &m_menuWindow, _("&Window") );
m_menubar.Append( &m_menuCapture, _("&Capture") );
SetMenuBar( &m_menubar );
@ -377,6 +534,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
m_menubar.Append(&m_menuRecording, _("&Recording"));
}
#endif
m_menubar.Append( &m_menuHelp, _("&Help") );
// ------------------------------------------------------------------------
@ -406,18 +564,17 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
// Ideally the __WXMSW__ port should use the embedded IDI_ICON2 icon, because wxWidgets sucks and
// loses the transparency information when loading bitmaps into icons. But for some reason
// I cannot get it to work despite following various examples to the letter.
SetIcons( wxGetApp().GetIconBundle() );
int m_statusbar_widths[] = { (int)(backsize.GetWidth()*0.73), (int)(backsize.GetWidth()*0.25) };
m_statusbar.SetStatusWidths(2, m_statusbar_widths);
//m_statusbar.SetStatusText( L"The Status is Good!", 0);
int m_statusbar_widths[] = { (int)-20, (int)-3, (int) -2 };
m_statusbar.SetFieldsCount(3);
m_statusbar.SetStatusWidths(3, m_statusbar_widths);
m_statusbar.SetStatusText( wxEmptyString, 0);
wxBoxSizer& joe( *new wxBoxSizer( wxVERTICAL ) );
joe.Add( m_background );
SetSizerAndFit( &joe );
// Makes no sense, but this is needed for the window size to be correct for
// 200% DPI on Windows. The SetSizerAndFit is supposed to be doing the exact
// same thing.
@ -434,145 +591,15 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
// has been set/fit.
InitLogBoxPosition( g_Conf->ProgLogBox );
// ------------------------------------------------------------------------
// Some of the items in the System menu are configured by the UpdateCoreStatus() method.
m_menuSys.Append(MenuId_Boot_CDVD, _("Initializing..."));
m_menuSys.Append(MenuId_Boot_CDVD2, _("Initializing..."));
m_menuSys.Append(MenuId_Boot_ELF, _("&Run ELF..."),
_("For running raw PS2 binaries directly"));
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_Sys_SuspendResume, _("Initializing..."));
m_menuSys.AppendSeparator();
//m_menuSys.Append(MenuId_Sys_Close, _("Close"),
// _("Stops emulation and closes the GS window."));
m_menuSys.Append(MenuId_Sys_LoadStates, _("&Load state"), &m_LoadStatesSubmenu);
m_menuSys.Append(MenuId_Sys_SaveStates, _("&Save state"), &m_SaveStatesSubmenu);
m_menuSys.Append(MenuId_EnableBackupStates, _("&Backup before save"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_EnablePatches, _("Automatic &Gamefixes"),
_("Automatically applies needed Gamefixes to known problematic games"), wxITEM_CHECK);
m_menuSys.Append(MenuId_EnableCheats, _("Enable &Cheats"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.Append(MenuId_EnableWideScreenPatches, _("Enable &Widescreen Patches"),
_("Enabling Widescreen Patches may occasionally cause issues."), wxITEM_CHECK);
CreatePcsx2Menu();
CreateCdvdMenu();
CreateConfigMenu();
CreateWindowsMenu();
CreateCaptureMenu();
#ifndef DISABLE_RECORDING
m_menuSys.Append(MenuId_EnableRecordingTools, _("Enable &Recording Tools"),
wxEmptyString, wxITEM_CHECK);
#endif
if(IsDebugBuild || IsDevBuild)
m_menuSys.Append(MenuId_EnableHostFs, _("Enable &Host Filesystem"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_Sys_Shutdown, _("Shut&down"),
_("Wipes all internal VM states and shuts down plugins."));
m_menuSys.FindItem(MenuId_Sys_Shutdown)->Enable(false);
m_menuSys.Append(MenuId_Exit, _("E&xit"),
AddAppName(_("Closing %s may be hazardous to your health")));
// ------------------------------------------------------------------------
wxMenu& isoRecents( wxGetApp().GetRecentIsoMenu() );
//m_menuCDVD.AppendSeparator();
m_menuItem_RecentIsoMenu = m_menuCDVD.AppendSubMenu(&isoRecents, _("ISO &Selector"));
m_menuCDVD.Append( GetPluginMenuId_Settings(PluginId_CDVD), _("Plugin &Menu"), m_PluginMenuPacks[PluginId_CDVD] );
m_menuCDVD.AppendSeparator();
m_menuCDVD.Append( MenuId_Src_Iso, _("&ISO"), _("Makes the specified ISO image the CDVD source."), wxITEM_RADIO );
m_menuCDVD.Append( MenuId_Src_Plugin, _("&Plugin"), _("Uses an external plugin as the CDVD source."), wxITEM_RADIO );
m_menuCDVD.Append( MenuId_Src_NoDisc, _("&No disc"), _("Use this to boot into your virtual PS2's BIOS configuration."), wxITEM_RADIO );
//m_menuCDVD.AppendSeparator();
//m_menuCDVD.Append( MenuId_SkipBiosToggle,_("Enable BOOT2 injection"),
// _("Skips PS2 splash screens when booting from ISO or DVD media"), wxITEM_CHECK );
// ------------------------------------------------------------------------
m_menuConfig.Append(MenuId_Config_SysSettings, _("Emulation &Settings") );
m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory cards") );
m_menuConfig.Append(MenuId_Config_BIOS, _("&Plugin/BIOS Selector") );
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_Config_GS, _("&Video (GS)"), m_PluginMenuPacks[PluginId_GS]);
m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio (SPU2)"), m_PluginMenuPacks[PluginId_SPU2]);
m_menuConfig.Append(MenuId_Config_PAD, _("&Controllers (PAD)"),m_PluginMenuPacks[PluginId_PAD]);
m_menuConfig.Append(MenuId_Config_DEV9, _("&Dev9"), m_PluginMenuPacks[PluginId_DEV9]);
m_menuConfig.Append(MenuId_Config_USB, _("&USB"), m_PluginMenuPacks[PluginId_USB]);
m_menuConfig.Append(MenuId_Config_FireWire, _("&Firewire"), m_PluginMenuPacks[PluginId_FW]);
//m_menuConfig.AppendSeparator();
//m_menuConfig.Append(MenuId_Config_Patches, _("Patches (unimplemented)"), wxEmptyString);
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_Config_Multitap0Toggle, _("Multitap &1"), wxEmptyString, wxITEM_CHECK );
m_menuConfig.Append(MenuId_Config_Multitap1Toggle, _("Multitap &2"), wxEmptyString, wxITEM_CHECK );
m_menuConfig.AppendSeparator();
m_menuConfig.Append(MenuId_Config_ResetAll, _("C&lear all settings..."),
AddAppName(_("Clears all %s settings and re-runs the startup wizard.")));
// ------------------------------------------------------------------------
m_menuMisc.Append( &m_MenuItem_Console );
#if defined(__unix__)
m_menuMisc.Append( &m_MenuItem_Console_Stdio );
#endif
// No dialogs implemented for these yet...
//m_menuMisc.Append(41, "Patch Browser...", wxEmptyString, wxITEM_NORMAL);
//m_menuMisc.Append(42, "Patch Finder...", wxEmptyString, wxITEM_NORMAL);
m_menuMisc.AppendSeparator();
m_menuMisc.Append(MenuId_About, _("&About...") );
m_menuMisc.AppendSeparator();
m_menuMisc.Append( MenuId_ChangeLang, L"Change &Language" ); // Always in English
m_menuDebug.Append(MenuId_Debug_Open, _("&Open Debug Window..."), wxEmptyString);
#ifdef PCSX2_DEVBUILD
m_menuDebug.Append(MenuId_Debug_Logging, _("&Logging..."), wxEmptyString);
#endif
m_menuDebug.AppendCheckItem(MenuId_Debug_CreateBlockdump, _("Create &Blockdump"), _("Creates a block dump for debugging purposes."));
// ------------------------------------------------------------------------
m_menuCapture.Append(MenuId_Capture_Video, _("Video"), &m_submenuVideoCapture);
m_submenuVideoCapture.Append(MenuId_Capture_Video_Record, _("Start Recording"));
m_submenuVideoCapture.Append(MenuId_Capture_Video_Stop, _("Stop Recording"))->Enable(false);
m_menuCapture.Append(MenuId_Capture_Screenshot, _("Screenshot"));
// ------------------------------------------------------------------------
#ifndef DISABLE_RECORDING
m_menuRecording.Append(MenuId_Recording_New, _("New"));
m_menuRecording.Append(MenuId_Recording_Stop, _("Stop"))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Play, _("Play"));
m_menuRecording.AppendSeparator();
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port0, _("Virtual Pad (Port 1)"));
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port1, _("Virtual Pad (Port 2)"));
CreateRecordMenu();
#endif
CreateHelpMenu();
m_MenuItem_Console.Check( g_Conf->ProgLogBox.Visible );
@ -667,64 +694,30 @@ void MainEmuFrame::ApplyCoreStatus()
}
const CDVD_SourceType Source = g_Conf->CdvdSource;
const MenuIdentifiers fullboot_id = MenuId_Boot_CDVD;
const MenuIdentifiers fastboot_id = MenuId_Boot_CDVD2;
wxMenuItem *cdvd_fast = menubar.FindItem(fastboot_id);
if (Source == CDVD_SourceType::NoDisc)
wxMenuItem *cdvd_menu = menubar.FindItem(MenuId_Boot_CDVD);
wxString label;
wxString help_text = _("Use fast boot to skip PS2 startup and splash screens");
switch (Source)
{
if(cdvd_fast)
m_menuSys.Destroy(cdvd_fast);
}
else
{
wxString label;
wxString help_text = _("Use fast boot to skip PS2 startup and splash screens");
switch (Source)
{
case CDVD_SourceType::Iso:
label = _("Boot ISO (&fast)");
break;
case CDVD_SourceType::Plugin:
label = _("Boot CDVD (&fast)");
break;
//case CDVD_SourceType::NoDisc: (Fast boot menu item is destroyed when no disc is selected)
default:
pxAssert(false);
}
if (cdvd_fast)
{
cdvd_fast->SetItemLabel(label);
cdvd_fast->SetHelp(help_text);
}
else
{
m_menuSys.Insert(1, fastboot_id, label, help_text);
}
case CDVD_SourceType::Iso:
label = _("Boot ISO");
break;
case CDVD_SourceType::Plugin:
label = _("Boot CDVD");
break;
case CDVD_SourceType::NoDisc:
label = _("Boot Bios");
break;
default:
label = _("Boot Bios");
break;
}
if (wxMenuItem *cdvd_full = menubar.FindItem(fullboot_id))
{
switch (Source)
{
case CDVD_SourceType::Iso:
cdvd_full->SetItemLabel(_("Boo&t ISO (full)"));
cdvd_full->SetHelp(_("Boot the VM using the current ISO source media"));
break;
case CDVD_SourceType::Plugin:
cdvd_full->SetItemLabel(_("Boo&t CDVD (full)"));
cdvd_full->SetHelp(_("Boot the VM using the current CD/DVD source media"));
break;
case CDVD_SourceType::NoDisc:
cdvd_full->SetItemLabel(_("Boo&t BIOS"));
cdvd_full->SetHelp(_("Boot the VM without any source media"));
break;
default:
pxAssert(false);
}
}
cdvd_menu->SetItemLabel(label);
cdvd_menu->SetHelp(help_text);
}
//Apply a config to the menu such that the menu reflects it properly
@ -758,6 +751,7 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags)
menubar.Check( MenuId_Config_Multitap0Toggle, configToApply.EmuOptions.MultitapPort0_Enabled );
menubar.Check( MenuId_Config_Multitap1Toggle, configToApply.EmuOptions.MultitapPort1_Enabled );
menubar.Check( MenuId_Config_FastBoot, configToApply.EnableFastBoot );
}
UpdateIsoSrcSelection(); //shouldn't be affected by presets but updates from g_Conf anyway and not from configToApply, so no problem here.

View File

@ -109,8 +109,7 @@ protected:
wxMenu& m_menuCDVD;
wxMenu& m_menuSys;
wxMenu& m_menuConfig;
wxMenu& m_menuMisc;
wxMenu& m_menuDebug;
wxMenu& m_menuWindow;
wxMenu& m_menuCapture;
wxMenu& m_submenuVideoCapture;
@ -118,9 +117,11 @@ protected:
#ifndef DISABLE_RECORDING
wxMenu& m_menuRecording;
#endif
wxMenu& m_menuHelp;
wxMenu& m_LoadStatesSubmenu;
wxMenu& m_SaveStatesSubmenu;
wxMenu& m_GameSettingsSubmenu;
wxMenuItem* m_menuItem_RecentIsoMenu;
wxMenuItem& m_MenuItem_Console;
@ -146,14 +147,24 @@ public:
void UpdateIsoSrcSelection();
void RemoveCdvdMenu();
void EnableMenuItem( int id, bool enable );
void CheckMenuItem(int id, bool checked);
void SetMenuItemLabel(int id, wxString str);
void EnableCdvdPluginSubmenu(bool isEnable = true);
void CreateCdvdMenu();
void CreatePcsx2Menu();
void CreateConfigMenu();
void CreateWindowsMenu();
void CreateCaptureMenu();
void CreateRecordMenu();
void CreateHelpMenu();
bool Destroy();
void ApplyConfigToGui(AppConfig& configToApply, int flags = 0);
void CommitPreset_noTrigger();
void AppendKeycodeNamesToMenuOptions();
void UpdateStatusBar();
protected:
void DoGiveHelp(const wxString& text, bool show);
@ -188,7 +199,8 @@ protected:
void Menu_EnableHostFs_Click(wxCommandEvent &event);
void Menu_BootCdvd_Click(wxCommandEvent &event);
void Menu_BootCdvd2_Click(wxCommandEvent &event);
void Menu_FastBoot_Click(wxCommandEvent &event);
void Menu_OpenELF_Click(wxCommandEvent &event);
void Menu_CdvdSource_Click(wxCommandEvent &event);
void Menu_LoadStates_Click(wxCommandEvent &event);
@ -206,13 +218,19 @@ protected:
void Menu_Debug_Open_Click(wxCommandEvent &event);
void Menu_Debug_MemoryDump_Click(wxCommandEvent &event);
void Menu_Debug_Logging_Click(wxCommandEvent &event);
void Menu_Debug_CreateBlockdump_Click(wxCommandEvent &event);
void Menu_Ask_On_Boot_Click(wxCommandEvent &event);
void Menu_ShowConsole(wxCommandEvent &event);
void Menu_ChangeLang(wxCommandEvent &event);
void Menu_ShowConsole_Stdio(wxCommandEvent &event);
void Menu_GetStarted(wxCommandEvent &event);
void Menu_Compatibility(wxCommandEvent &event);
void Menu_Forums(wxCommandEvent &event);
void Menu_Website(wxCommandEvent &event);
void Menu_Github(wxCommandEvent &event);
void Menu_Wiki(wxCommandEvent &event);
void Menu_ShowAboutBox(wxCommandEvent &event);
void Menu_Capture_Video_Record_Click(wxCommandEvent &event);

View File

@ -26,7 +26,6 @@
#include "Dialogs/ModalPopups.h"
#include "Dialogs/ConfigurationDialog.h"
#include "Dialogs/LogOptionsDialog.h"
#include "Debugger/DisassemblyDialog.h"
#include "Utilities/IniInterface.h"
@ -159,6 +158,7 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
g_Conf->CdvdSource = CDVD_SourceType::Iso;
SysUpdateIsoSrcFile( isoFilename );
if( result == wxID_RESET )
{
core_control.DisallowResume();
@ -384,14 +384,16 @@ void MainEmuFrame::Menu_CdvdSource_Click( wxCommandEvent &event )
void MainEmuFrame::Menu_BootCdvd_Click( wxCommandEvent &event )
{
g_Conf->EmuOptions.UseBOOT2Injection = false;
g_Conf->EmuOptions.UseBOOT2Injection = g_Conf->EnableFastBoot;
_DoBootCdvd();
}
void MainEmuFrame::Menu_BootCdvd2_Click( wxCommandEvent &event )
void MainEmuFrame::Menu_FastBoot_Click( wxCommandEvent &event )
{
g_Conf->EmuOptions.UseBOOT2Injection = true;
_DoBootCdvd();
g_Conf->EnableFastBoot = GetMenuBar()->IsChecked( MenuId_Config_FastBoot );
AppApplySettings();
AppSaveSettings();
UpdateStatusBar();
}
wxString GetMsg_IsoImageChanged()
@ -506,7 +508,7 @@ void MainEmuFrame::Menu_EnableRecordingTools_Click(wxCommandEvent&)
"These tools are provided as-is and should be enabled under your own discretion."), "Enabling Recording Tools"))
{
checked = false;
m_menuSys.FindChildItem(MenuId_EnableRecordingTools)->Check(false);
m_GameSettingsSubmenu.FindChildItem(MenuId_EnableRecordingTools)->Check(false);
}
}
@ -648,8 +650,6 @@ void MainEmuFrame::Menu_SuspendResume_Click(wxCommandEvent &event)
void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent &event)
{
//if( !SysHasValidState() && !CorePlugins.AreAnyInitialized() ) return;
UI_DisableSysShutdown();
Console.SetTitle("PCSX2 Program Log");
CoreThread.Reset();
@ -675,18 +675,18 @@ void MainEmuFrame::Menu_Debug_Open_Click(wxCommandEvent &event)
{
DisassemblyDialog* dlg = wxGetApp().GetDisassemblyPtr();
if (dlg)
dlg->Show();
{
if (event.IsChecked())
dlg->Show();
else
dlg->Hide();
}
}
void MainEmuFrame::Menu_Debug_MemoryDump_Click(wxCommandEvent &event)
{
}
void MainEmuFrame::Menu_Debug_Logging_Click(wxCommandEvent &event)
{
AppOpenDialog<LogOptionsDialog>( this );
}
void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event)
{
// Use messages to relay open/close commands (thread-safe)
@ -702,6 +702,36 @@ void MainEmuFrame::Menu_ShowConsole_Stdio(wxCommandEvent &event)
AppSaveSettings();
}
void MainEmuFrame::Menu_GetStarted(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://pcsx2.net/getting-started.html");
}
void MainEmuFrame::Menu_Compatibility(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://pcsx2.net/compatibility-list.html");
}
void MainEmuFrame::Menu_Forums(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://forums.pcsx2.net/");
}
void MainEmuFrame::Menu_Website(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://pcsx2.net/");
}
void MainEmuFrame::Menu_Github(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://github.com/PCSX2/pcsx2");
}
void MainEmuFrame::Menu_Wiki(wxCommandEvent &event)
{
wxLaunchDefaultBrowser("https://wiki.pcsx2.net/Main_Page");
}
void MainEmuFrame::Menu_ShowAboutBox(wxCommandEvent &event)
{
AppOpenDialog<AboutBoxDialog>( this );

View File

@ -39,6 +39,12 @@ void MainEmuFrame::SetMenuItemLabel(int id, wxString str)
item->SetItemLabel(str);
}
void MainEmuFrame::CheckMenuItem(int id, bool checked)
{
if (wxMenuItem *item = m_menubar.FindItem(id))
item->Check(checked);
}
static void _SaveLoadStuff(bool enabled)
{
sMainFrame.EnableMenuItem(MenuId_Sys_LoadStates, enabled);