mirror of https://github.com/PCSX2/pcsx2.git
Fix POD-hell.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3255 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
9fae2cc4f3
commit
900c3105c8
|
@ -798,6 +798,8 @@ extern __aligned16 AppCoreThread CoreThread;
|
|||
extern __aligned16 SysMtgsThread mtgsThread;
|
||||
extern __aligned16 AppPluginManager CorePlugins;
|
||||
|
||||
extern wxString AddAppName( const wxChar* fmt );
|
||||
extern wxString AddAppName( const char* fmt );
|
||||
|
||||
extern void UI_UpdateSysControls();
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void Pcsx2App::ReadUserModeSettings()
|
|||
#if 0
|
||||
if( !hasGroup )
|
||||
{
|
||||
wxDialogWithHelpers beta( NULL, wxsFormat(_("Welcome to %s %u.%u.%u (r%u)")), pxGetAppName(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo, SVN_REV );
|
||||
wxDialogWithHelpers beta( NULL, _fmt("Welcome to %s %u.%u.%u (r%u)", pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo, SVN_REV );
|
||||
beta.SetMinWidth(480);
|
||||
|
||||
beta += beta.Heading(
|
||||
|
@ -333,7 +333,7 @@ void Pcsx2App::AllocateCoreStuffs()
|
|||
|
||||
void Pcsx2App::OnInitCmdLine( wxCmdLineParser& parser )
|
||||
{
|
||||
parser.SetLogo( wxsFormat(L" >> %s -- A Playstation2 Emulator for the PC <<", pxGetAppName()) + L"\n\n" +
|
||||
parser.SetLogo( AddAppName(L" >> %s -- A Playstation2 Emulator for the PC <<") + L"\n\n" +
|
||||
_("All options are for the current session only and will not be saved.\n")
|
||||
);
|
||||
|
||||
|
@ -361,7 +361,7 @@ void Pcsx2App::OnInitCmdLine( wxCmdLineParser& parser )
|
|||
|
||||
parser.AddOption( wxEmptyString,L"cfgpath", _("changes the configuration file path"), wxCMD_LINE_VAL_STRING );
|
||||
parser.AddOption( wxEmptyString,L"cfg", _("specifies the PCSX2 configuration file to use"), wxCMD_LINE_VAL_STRING );
|
||||
parser.AddSwitch( wxEmptyString,L"forcewiz", wxsFormat(_("forces %s to start the First-time Wizard"), pxGetAppName()) );
|
||||
parser.AddSwitch( wxEmptyString,L"forcewiz", AddAppName(L"forces %s to start the First-time Wizard") );
|
||||
|
||||
const PluginInfo* pi = tbl_PluginInfo; do {
|
||||
parser.AddOption( wxEmptyString, pi->GetShortname().Lower(),
|
||||
|
@ -407,7 +407,7 @@ bool Pcsx2App::ParseOverrides( wxCmdLineParser& parser )
|
|||
Console.Warning( pi->GetShortname() + L" override: " + dest );
|
||||
else
|
||||
{
|
||||
wxDialogWithHelpers okcan( NULL, wxsFormat(_("Plugin Override Error - %s"), pxGetAppName()) );
|
||||
wxDialogWithHelpers okcan( NULL, AddAppName(L"Plugin Override Error - %s") );
|
||||
|
||||
okcan += okcan.Heading( wxsFormat(
|
||||
_("%s Plugin Override Error! The following file does not exist or is not a valid %s plugin:\n\n"),
|
||||
|
@ -417,7 +417,7 @@ bool Pcsx2App::ParseOverrides( wxCmdLineParser& parser )
|
|||
okcan += okcan.GetCharHeight();
|
||||
okcan += okcan.Text(dest);
|
||||
okcan += okcan.GetCharHeight();
|
||||
okcan += okcan.Heading(wxsFormat(_("Press OK to use the default configured plugin, or Cancel to close %s."), pxGetAppName()));
|
||||
okcan += okcan.Heading(AddAppName(L"Press OK to use the default configured plugin, or Cancel to close %s."));
|
||||
|
||||
if( wxID_CANCEL == pxIssueConfirmation( okcan, MsgButtons().OKCancel() ) ) return false;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ bool Pcsx2App::OnInit()
|
|||
}
|
||||
catch( Exception::HardwareDeficiency& ex )
|
||||
{
|
||||
Msgbox::Alert( ex.FormatDisplayMessage() + wxsFormat(_("\n\nPress OK to close %s."), pxGetAppName()), _("PCSX2 Error: Hardware Deficiency") );
|
||||
Msgbox::Alert( ex.FormatDisplayMessage() + AddAppName(L"\n\nPress OK to close %s."), _("PCSX2 Error: Hardware Deficiency") );
|
||||
CleanupOnExit();
|
||||
return false;
|
||||
}
|
||||
|
@ -562,8 +562,8 @@ bool Pcsx2App::OnInit()
|
|||
catch( Exception::RuntimeError& ex )
|
||||
{
|
||||
Console.Error( ex.FormatDiagnosticMessage() );
|
||||
Msgbox::Alert( ex.FormatDisplayMessage() + wxsFormat(_("\n\nPress OK to close %s."), pxGetAppName()),
|
||||
wxsFormat(_("%s Critical Error"), pxGetAppName()), wxICON_ERROR );
|
||||
Msgbox::Alert( ex.FormatDisplayMessage() + AddAppName(L"\n\nPress OK to close %s."),
|
||||
AddAppName(L"%s Critical Error"), wxICON_ERROR );
|
||||
CleanupOnExit();
|
||||
return false;
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ Pcsx2App::Pcsx2App()
|
|||
m_id_ProgramLogBox = wxID_ANY;
|
||||
m_ptr_ProgramLog = NULL;
|
||||
|
||||
SetAppName( L"pcsx2" );
|
||||
SetAppName( L"PCSX2" );
|
||||
BuildCommandHash();
|
||||
}
|
||||
|
||||
|
@ -760,6 +760,15 @@ void Pcsx2App::CleanUp()
|
|||
_parent::CleanUp();
|
||||
}
|
||||
|
||||
__forceinline wxString AddAppName( const wxChar* fmt )
|
||||
{
|
||||
return wxsFormat( fmt, pxGetAppName().c_str() );
|
||||
}
|
||||
|
||||
__forceinline wxString AddAppName( const char* fmt )
|
||||
{
|
||||
return wxsFormat( fromUTF8(fmt), pxGetAppName().c_str() );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Using the MSVCRT to track memory leaks:
|
||||
|
|
|
@ -296,7 +296,7 @@ void pxMessageOutputMessageBox::Printf(const wxChar* format, ...)
|
|||
|
||||
pos += 9; // strlen of [IsoFile]
|
||||
|
||||
wxDialogWithHelpers popup( NULL, wxsFormat(_("%s Commandline Options"), pxGetAppName()) );
|
||||
wxDialogWithHelpers popup( NULL, AddAppName(L"%s Commandline Options") );
|
||||
popup.SetMinWidth( 640 );
|
||||
popup += popup.Heading(out.Mid(0, pos));
|
||||
//popup += ;
|
||||
|
|
|
@ -32,7 +32,7 @@ using namespace pxSizerFlags;
|
|||
// --------------------------------------------------------------------------------------
|
||||
|
||||
Dialogs::AboutBoxDialog::AboutBoxDialog( wxWindow* parent )
|
||||
: wxDialogWithHelpers( parent, wxsFormat(_("About %s"), pxGetAppName()), pxDialogFlags().Resize().MinWidth( 460 ) )
|
||||
: wxDialogWithHelpers( parent, AddAppName(L"About %s"), pxDialogFlags().Resize().MinWidth( 460 ) )
|
||||
, m_bitmap_dualshock( this, wxID_ANY, wxBitmap( EmbeddedImage<res_Dualshock>().Get() ),
|
||||
wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN
|
||||
)
|
||||
|
|
|
@ -220,7 +220,7 @@ void Dialogs::BaseConfigurationDialog::OnScreenshot_Click( wxCommandEvent& evt )
|
|||
|
||||
wxString pagename( m_listbook ? (L"_" + m_listbook->GetPageText( m_listbook->GetSelection() )) : wxString() );
|
||||
wxString filenameDefault;
|
||||
filenameDefault.Printf( L"%s_%s%s.png", pxGetAppName().Lower(), GetDialogName().c_str(), pagename.c_str() );
|
||||
filenameDefault.Printf( L"%s_%s%s.png", pxGetAppName().Lower().c_str(), GetDialogName().c_str(), pagename.c_str() );
|
||||
filenameDefault.Replace( L"/", L"-" );
|
||||
|
||||
wxString filename( wxFileSelector( _("Save dialog screenshots to..."), g_Conf->Folders.Snapshots.ToString(),
|
||||
|
|
|
@ -43,7 +43,7 @@ bool ApplicableWizardPage::PrepForApply()
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
Panels::SettingsDirPickerPanel::SettingsDirPickerPanel( wxWindow* parent )
|
||||
: DirPickerPanel( parent, FolderId_Settings, _("Settings"), wxsFormat(_("Select a folder for %s settings"), pxGetAppName()) )
|
||||
: DirPickerPanel( parent, FolderId_Settings, _("Settings"), AddAppName(L"Select a folder for %s settings") )
|
||||
{
|
||||
pxSetToolTip( this, pxE( ".Tooltip:Folders:Settings",
|
||||
L"This is the folder where PCSX2 saves your settings, including settings generated "
|
||||
|
@ -69,7 +69,7 @@ FirstTimeWizard::UsermodePage::UsermodePage( wxWizard* parent ) :
|
|||
m_panel_LangSel = new LanguageSelectionPanel( &panel );
|
||||
m_panel_UserSel = new DocsFolderPickerPanel( &panel );
|
||||
|
||||
panel += panel.Heading(wxsFormat(_("%s is starting from a new or unknown folder and needs to be configured."), pxGetAppName())).Bold();
|
||||
panel += panel.Heading(AddAppName(L"%s is starting from a new or unknown folder and needs to be configured.")).Bold();
|
||||
|
||||
panel += m_panel_LangSel | StdCenter();
|
||||
panel += m_panel_UserSel | pxExpand.Border( wxALL, 8 );
|
||||
|
@ -117,7 +117,7 @@ bool FirstTimeWizard::UsermodePage::PrepForApply()
|
|||
if( !path.Exists() )
|
||||
{
|
||||
wxDialogWithHelpers dialog( NULL, _("Create folder?") );
|
||||
dialog += dialog.Heading(wxsFormat(_("%s will create the following folder for documents. You can change this setting later, at any time."), pxGetAppName()));
|
||||
dialog += dialog.Heading(AddAppName(L"%s will create the following folder for documents. You can change this setting later, at any time."));
|
||||
dialog += 12;
|
||||
dialog += dialog.Heading( path.ToString() );
|
||||
|
||||
|
@ -130,7 +130,7 @@ bool FirstTimeWizard::UsermodePage::PrepForApply()
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
FirstTimeWizard::FirstTimeWizard( wxWindow* parent )
|
||||
: wxWizard( parent, wxID_ANY, wxsFormat(_("%s First Time Configuration"), pxGetAppName()) )
|
||||
: wxWizard( parent, wxID_ANY, AddAppName(L"%s First Time Configuration") )
|
||||
, m_page_usermode ( *new UsermodePage( this ) )
|
||||
, m_page_plugins ( *new ApplicableWizardPage( this, &m_page_usermode ) )
|
||||
, m_page_bios ( *new ApplicableWizardPage( this, &m_page_plugins ) )
|
||||
|
|
|
@ -26,7 +26,7 @@ Dialogs::PickUserModeDialog::PickUserModeDialog( wxWindow* parent )
|
|||
m_panel_usersel = new DocsFolderPickerPanel( this, false );
|
||||
m_panel_langsel = new LanguageSelectionPanel( this );
|
||||
|
||||
*this += Heading(wxsFormat(_("%s is starting from a new or unknown folder and needs to be configured."), pxGetAppName()));
|
||||
*this += Heading(AddAppName(L"%s is starting from a new or unknown folder and needs to be configured."));
|
||||
*this += m_panel_langsel | pxSizerFlags::StdCenter();
|
||||
*this += m_panel_usersel | wxSizerFlags().Expand().Border( wxALL, 8 );
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
using namespace Panels;
|
||||
|
||||
Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent)
|
||||
: BaseConfigurationDialog( parent, wxsFormat(_("Emulation Settings - %s"), pxGetAppName()), 580 )
|
||||
: BaseConfigurationDialog( parent, AddAppName(L"Emulation Settings - %s"), 580 )
|
||||
{
|
||||
ScopedBusyCursor busy( Cursor_ReallyBusy );
|
||||
|
||||
|
@ -45,7 +45,7 @@ Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent)
|
|||
}
|
||||
|
||||
Dialogs::ComponentsConfigDialog::ComponentsConfigDialog(wxWindow* parent)
|
||||
: BaseConfigurationDialog( parent, wxsFormat(_("Components Selectors - %s"), pxGetAppName()), 600 )
|
||||
: BaseConfigurationDialog( parent, AddAppName(L"Components Selectors - %s"), 600 )
|
||||
{
|
||||
ScopedBusyCursor busy( Cursor_ReallyBusy );
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ WaitingForThreadedTaskDialog::WaitingForThreadedTaskDialog( pxThread* thr, wxWin
|
|||
*this += Text( content ) | StdExpand();
|
||||
*this += 15;
|
||||
*this += Heading(_("Press Cancel to attempt to cancel the action."));
|
||||
*this += Heading(wxsFormat(_("Press Terminate to kill %s immediately."), pxGetAppName()));
|
||||
*this += Heading(AddAppName(L"Press Terminate to kill %s immediately."));
|
||||
|
||||
*this += new wxButton( this, wxID_CANCEL );
|
||||
*this += new wxButton( this, wxID_ANY, _("Terminate App") );
|
||||
|
|
|
@ -40,7 +40,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
if( filenames.GetCount() > 1 )
|
||||
{
|
||||
wxDialogWithHelpers dialog( m_WindowBound, _("Drag and Drop Error") );
|
||||
dialog += dialog.Heading(wxsFormat(_("It is an error to drop multiple files onto a %s window. One at a time please, thank you."), pxGetAppName()));
|
||||
dialog += dialog.Heading(AddAppName(L"It is an error to drop multiple files onto a %s window. One at a time please, thank you."));
|
||||
pxIssueConfirmation( dialog, MsgButtons().Cancel() );
|
||||
return false;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
{
|
||||
wxDialogWithHelpers dialog( m_WindowBound, _("Confirm PS2 Reset") );
|
||||
|
||||
dialog += dialog.Heading(wxsFormat(_("You have dropped the following ELF binary into %s:\n\n"), pxGetAppName()));
|
||||
dialog += dialog.Heading(AddAppName(L"You have dropped the following ELF binary into %s:\n\n"));
|
||||
dialog += dialog.GetCharHeight();
|
||||
dialog += dialog.Text( filenames[0] );
|
||||
dialog += dialog.GetCharHeight();
|
||||
|
@ -110,7 +110,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
if (isoDetect(&iso))
|
||||
{
|
||||
Console.WriteLn( L"(Drag&Drop) Found valid ISO file type!" );
|
||||
SwapOrReset_Iso(m_WindowBound, stopped_core, filenames[0], wxsFormat(_("You have dropped the following ISO image into %s:"), pxGetAppName()));
|
||||
SwapOrReset_Iso(m_WindowBound, stopped_core, filenames[0], AddAppName(L"You have dropped the following ISO image into %s:"));
|
||||
}
|
||||
|
||||
_closefile( iso.handle );
|
||||
|
|
|
@ -320,13 +320,13 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
if( PCSX2_VersionLo & 1 )
|
||||
{
|
||||
// Odd versions: beta / development editions, which feature revision number and compile date.
|
||||
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
wintitle.Printf( _("%s %d.%d.%d.%d%s (svn) %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// evens: stable releases, with a simpler title.
|
||||
wintitle.Printf( _("%s %d.%d.%d %s"), pxGetAppName(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
wintitle.Printf( _("%s %d.%d.%d %s"), pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
SVN_MODS ? _("(modded)") : wxEmptyString
|
||||
);
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
_("Wipes all internal VM states and shuts down plugins."));
|
||||
|
||||
m_menuSys.Append(MenuId_Exit, _("Exit"),
|
||||
wxsFormat(_("Closing %s may be hazardous to your health"), pxGetAppName()));
|
||||
AddAppName(L"Closing %s may be hazardous to your health"));
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -440,7 +440,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
|
||||
m_menuConfig.AppendSeparator();
|
||||
m_menuConfig.Append(MenuId_Config_ResetAll, _("Clear all settings..."),
|
||||
wxsFormat(_("Clears all %s settings and re-runs the startup wizard."), pxGetAppName()));
|
||||
AddAppName(L"Clears all %s settings and re-runs the startup wizard."));
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void MainEmuFrame::Menu_ResetAllSettings_Click(wxCommandEvent &event)
|
|||
L"manually restart %s after this operation.\n\n"
|
||||
L"WARNING!! Click OK to delete *ALL* settings for %s and force-close the app, losing any current emulation progress. Are you absolutely sure?"
|
||||
L"\n\n(note: settings for plugins are unaffected)"
|
||||
), pxGetAppName(), pxGetAppName(), pxGetAppName() ),
|
||||
), pxGetAppName().c_str(), pxGetAppName().c_str(), pxGetAppName().c_str() ),
|
||||
_("Reset all settings?") ) )
|
||||
{
|
||||
suspender.AllowResume();
|
||||
|
|
|
@ -221,7 +221,7 @@ void Panels::DirPickerPanel::Apply()
|
|||
if( !wxDir::Exists( path ) )
|
||||
{
|
||||
wxDialogWithHelpers dialog( NULL, _("Create folder?") );
|
||||
dialog += dialog.Heading(wxsFormat(_("A configured folder does not exist. Should %s try to create it?"), pxGetAppName()));
|
||||
dialog += dialog.Heading(AddAppName(L"A configured folder does not exist. Should %s try to create it?"));
|
||||
dialog += 12;
|
||||
dialog += dialog.Heading( path );
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isF
|
|||
m_radio_UserMode->Realize();
|
||||
if( pxStaticText* woot = m_radio_UserMode->GetSubText(0) ) woot->Unwrapped(); // wrapping sucks for path names!
|
||||
|
||||
m_dirpicker_custom = new DirPickerPanel( this, FolderId_Documents, wxsFormat(_("Select a document root for %s"), pxGetAppName()) );
|
||||
m_dirpicker_custom = new DirPickerPanel( this, FolderId_Documents, AddAppName(L"Select a document root for %s") );
|
||||
|
||||
*this += Heading( isFirstTime ? usermodeExplained : usermodeWarning );
|
||||
*this += m_radio_UserMode | StdExpand();
|
||||
|
|
|
@ -447,7 +447,7 @@ static wxString GetApplyFailedMsg()
|
|||
L"All plugins must have valid selections for %s to run. If you are unable to make\n"
|
||||
L"a valid selection due to missing plugins or an incomplete install of %s, then\n"
|
||||
L"press cancel to close the Configuration panel."
|
||||
), pxGetAppName(), pxGetAppName() );
|
||||
), pxGetAppName().c_str(), pxGetAppName().c_str() );
|
||||
}
|
||||
|
||||
void Panels::PluginSelectorPanel::Apply()
|
||||
|
|
Loading…
Reference in New Issue