wxgui: Fix linux builds and other additions/fixes.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1491 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-07-12 00:55:12 +00:00
parent 3c195e9f9a
commit aeaba2ad18
12 changed files with 124 additions and 118 deletions

View File

@ -28,7 +28,7 @@
#define GOOGLE_NAMESPACE google
/* the location of <hash_fun.h>/<stl_hash_fun.h> */
#define HASH_FUN_H <ext/hash_fun.h>
#define HASH_FUN_H <backward/hash_fun.h>
/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE __gnu_cxx

View File

@ -47,7 +47,7 @@ namespace HashTools {
/// Note:
/// The reason for this (perhaps seemingly) hogwash red tape is because you can define custom
/// equality behavior for individual hashmaps, which are independent of the type used. The only
/// obvious scenario where such a feature is useful is in
/// obvious scenario where such a feature is useful is in
/// </remarks>
/// <seealso cref="DEFINE_HASHCODE_UNARY"/>
/// <seealso cref="DEFINE_HASH_API"/>
@ -100,7 +100,7 @@ namespace HashTools {
/// return val.GetHashCode(); // this member function must be implemented by the user.
/// }
/// };
///
///
/// struct UnaryEquals
/// {
/// bool operator()(const Type s1, const Type s2) const
@ -136,7 +136,7 @@ namespace HashTools {
/// <remarks>
/// Use of this macro is only needed if the hashable type in question is a struct that is a private
/// local to the namespace of a containing class.
/// </remarks>
/// </remarks>
#define PRIVATE_HASHMAP( Key, T ) \
typedef SpecializedHashMap<Key, T> Key##HashMap; \
friend Key##HashMap;
@ -178,6 +178,17 @@ extern const CommonHashClass GetCommonHash;
struct CommonHashClass
{
public:
hash_key_t DoInt( u32 val ) const
{
u32 key = val;
key = ~key + (key << 15);
key = key ^ (key >> 12);
key = key + (key << 2);
key = key ^ (key >> 4);
key = key * 2057;
key = key ^ (key >> 16);
}
hash_key_t operator()(const std::string& src) const
{
return Hash( src.data(), src.length() );
@ -187,7 +198,7 @@ public:
{
return Hash( (const char *)src.data(), src.length() * sizeof( wchar_t ) );
}
// Returns a hashcode for a character.
// This has function has been optimized to return an even distribution
// across the range of an int value. In theory that should be more rewarding
@ -198,14 +209,14 @@ public:
int cs = (int)( c1 + (char)64 );
return ( cs + ( cs<<8 ) + ( cs << 16 ) + (cs << 24 ) );
}
hash_key_t operator()( const wchar_t wc1 ) const
{
// Most unicode values are between 0 and 128, with 0-1024
// making up the bulk of the rest. Everything else is spatially used.
/*int wcs = (int) ( wc1 + 0x2000 );
return wcs ^ ( wcs + 0x19000 );*/
// or maybe I'll just feed it into the int hash:
return GetCommonHash( (u32)wc1 );
}
@ -222,14 +233,7 @@ public:
/// </remarks>
hash_key_t operator()( const u32 val ) const
{
u32 key = val;
key = ~key + (key << 15);
key = key ^ (key >> 12);
key = key + (key << 2);
key = key ^ (key >> 4);
key = key * 2057;
key = key ^ (key >> 16);
return key;
return DoInt(val);
}
/// <summary>
@ -244,7 +248,7 @@ public:
/// </remarks>
hash_key_t operator()( const s32 val ) const
{
return GetCommonHash((u32)val);
return DoInt(val);
}
/// <summary>
@ -283,7 +287,7 @@ public:
{
return GetCommonHash((u64)val);
}
hash_key_t operator()( const float val ) const
{
// floats do a fine enough job of being scattered about
@ -366,7 +370,7 @@ public:
/// class Hasher : IHashable
/// {
/// int someValue;
///
///
/// virtual bool Equals( const IHashable& right ) const
/// {
/// // Use pointer comparison first since it's fast and accurate:
@ -442,48 +446,48 @@ public:
/// struct Point
/// {
/// int x, y;
///
///
/// // Empty constructor is necessary for HashMap.
/// // This can either be initialized to zero, or uninitialized as here:
/// Point() {}
///
///
/// // Copy Constructor is just always necessary.
/// Point( const Point& src ) : first( src.first ), second( src.second ) {}
///
///
/// // Standard content constructor (Not needed by HashMap)
/// Point( int xpos, int ypos ) : x( xpos ), y( ypos ) {}
///
///
/// /**** Begin Hashmap Interface Implementation ****/
///
///
/// // HashMap Requires both GetEmptyKey() and GetDeleteKey() instance member
/// // methods to be defined. These act as defaults. The actual values used
/// // can be overridden on an individual HashMap basis via the HashMap constructor.
///
///
/// static Point GetEmptyKey() { return Point( -0xffffff, 0xffffff ); }
/// static Point GetDeletedKey() { return Kerning( -0xffffee, 0xffffee ); }
///
///
/// // HashMap Requires an Equality Overload.
/// // The inequality overload is not required but is probably a good idea since
/// // orphaned equality (without sibling inequality) operator overloads are ugly code.
///
///
/// bool Equals( const Point& right ) const
/// {
/// return ( x == right.x ) && ( y == right.y );
/// }
///
///
/// hash_key_t GetHashCode() const
/// {
/// // This is a decent "universal" hash method for when you have multiple int types:
/// return GetCommonHash( x ) ^ GetCommonHash( y );
/// }
///
///
/// // Use a macro to expose the hash API to the HashMap templates.
/// // This macro creates MakeHashCode and Compare structs, which use the ()
/// // operator to create "unary methods" for the GetHashCode and == operator above.
/// // Feeling dizzy yet? Don't worry. Just follow this template. It works!
///
///
/// DEFINE_HASH_API( Point );
///
///
/// /**** End HashMap Interface Implementation ****/
/// };
/// </code>
@ -506,15 +510,17 @@ public:
/// <remarks>
/// If found, the value associated with the requested key is copied into the <c>outval</c>
/// parameter. This is a more favorable alternative to the indexer operator since the
/// indexer implementation can and will create new entries for every request that
/// indexer implementation can and will create new entries for every request that
/// </remarks>
void TryGetValue( const Key& key, T& outval ) const
/*void TryGetValue( const Key& key, T& outval ) const
{
// GCC doesn't like this for some reason -- says const_iterator can't be found.
// Fortunately nothing uses these functions yet, so I just commented them out. --air
const_iterator iter = find( key );
if( iter != end() )
outval = iter->second;
}
}*/
const T& GetValue( Key key ) const
{
return (this->find( key ))->second;
@ -561,15 +567,16 @@ public:
/// <remarks>
/// If found, the value associated with the requested key is copied into the <c>outval</c>
/// parameter. This is a more favorable alternative to the indexer operator since the
/// indexer implementation can and will create new entries for every request that
/// indexer implementation can and will create new entries for every request that
/// </remarks>
void TryGetValue( const Key& key, T& outval ) const
/*void TryGetValue( const Key& key, T& outval ) const
{
// See above class for notes on why this is commented out.
const_iterator iter = find( key );
if( iter != end() )
outval = iter->second;
}
}*/
const T& GetValue( Key key ) const
{
return (this->find( key ))->second;
@ -591,7 +598,7 @@ public:
virtual ~Dictionary() {}
Dictionary( int initialCapacity=33, const std::string& emptyKey = "@@-EMPTY-@@", const std::string& deletedKey = "@@-DELETED-@@" ) :
HashMap( emptyKey, deletedKey, initialCapacity)
HashMap<std::string, T>( emptyKey, deletedKey, initialCapacity)
{
}
private:
@ -614,13 +621,13 @@ class UnicodeDictionary : public HashMap<std::wstring, T>
public:
virtual ~UnicodeDictionary() {}
UnicodeDictionary( int initialCapacity=33, std::wstring emptyKey = "@@-EMPTY-@@", std::wstring deletedKey = "@@-DELETED-@@" ) :
HashMap( emptykey, deletedkey, initialCapacity)
UnicodeDictionary( int initialCapacity=33, const std::wstring& emptyKey = L"@@-EMPTY-@@", const std::wstring& deletedKey = L"@@-DELETED-@@" ) :
HashMap<std::wstring, T>( emptyKey, deletedKey, initialCapacity)
{
}
}
private:
UnicodeDictionary( const UnicodeDictionary& src ) {}
};
}
}

View File

@ -185,7 +185,7 @@
<Unit filename="../IopMem.h" />
<Unit filename="../IopSio2.cpp" />
<Unit filename="../IopSio2.h" />
<Unit filename="../Linux/HostGui.cpp" />
<Unit filename="LnxHostSys.cpp" />
<Unit filename="../MMI.cpp" />
<Unit filename="../MTGS.cpp" />
<Unit filename="../Memory.cpp" />
@ -262,6 +262,8 @@
<Unit filename="../gui/ConsoleLogger.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.h" />
<Unit filename="../gui/Dialogs/ModalPopups.h" />
<Unit filename="../gui/Dialogs/PickUserModeDialog.cpp" />
<Unit filename="../gui/GameFixesDialog.h" />
<Unit filename="../gui/HostGui.cpp" />
<Unit filename="../gui/IniInterface.cpp" />
@ -289,6 +291,8 @@
<Unit filename="../gui/Resources/EmbeddedImage.h" />
<Unit filename="../gui/Resources/ps2_silver.h" />
<Unit filename="../gui/SpeedHacksDialog.h" />
<Unit filename="../gui/i18n.cpp" />
<Unit filename="../gui/i18n.h" />
<Unit filename="../gui/main.cpp" />
<Unit filename="../gui/wxHelpers.cpp" />
<Unit filename="../gui/wxHelpers.h" />

View File

@ -40,7 +40,7 @@ public:
wxASSERT_MSG( src.IsDir(), L"Warning: Creating a directory from what looks to be a filename..." );
Assign( src.GetPath() );
}
wxDirName() : wxFileName() {}
wxDirName( const wxDirName& src ) : wxFileName( src ) { }
explicit wxDirName( const char* src ) { Assign( wxString::FromAscii(src) ); }
@ -63,7 +63,7 @@ public:
}
void Clear() { wxFileName::Clear(); }
wxCharBuffer ToAscii() const { return GetPath().ToAscii(); }
wxString ToString() const { return GetPath(); }
@ -102,14 +102,14 @@ public:
bool Mkdir();
// ------------------------------------------------------------------------
wxDirName& operator=(const wxDirName& dirname) { Assign( dirname ); return *this; }
wxDirName& operator=(const wxString& dirname) { Assign( dirname ); return *this; }
wxDirName& operator=(const char* dirname) { Assign( wxString::FromAscii(dirname) ); return *this; }
wxFileName operator+( const wxFileName& right ) const { return Combine( right ); }
wxDirName operator+( const wxDirName& right ) const { return Combine( right ); }
bool operator==(const wxDirName& filename) const { return SameAs(filename); }
bool operator!=(const wxDirName& filename) const { return !SameAs(filename); }
@ -119,7 +119,7 @@ public:
// compare with a filename string interpreted as a native file name
bool operator==(const wxString& filename) const { return SameAs(wxDirName(filename)); }
bool operator!=(const wxString& filename) const { return !SameAs(wxDirName(filename)); }
const wxFileName& GetFilename() const { return *this; }
wxFileName& GetFilename() { return *this; }
};
@ -169,7 +169,7 @@ namespace PathDefs
extern const wxDirName Settings;
extern const wxDirName Plugins;
extern const wxDirName Themes;
extern wxDirName GetDocuments();
extern wxDirName GetSnapshots();
extern wxDirName GetBios();
@ -178,6 +178,8 @@ namespace PathDefs
extern wxDirName GetSavestates();
extern wxDirName GetMemoryCards();
extern wxDirName GetSettings();
extern wxDirName GetLogs();
extern wxDirName GetThemes();
}
namespace FilenameDefs

View File

@ -1,7 +1,7 @@
#ifndef PCSX2_PRECOMPILED_HEADER
#define PCSX2_PRECOMPILED_HEADER
//#pragma once // no dice, causes problems in GCC PCH (which doesn't really work very well
//#pragma once // no dice, causes problems in GCC PCH (which doesn't really work very well
//////////////////////////////////////////////////////////////////////////////////////////
// Define PCSX2's own i18n helpers. These override the wxWidgets helpers and provide
@ -71,8 +71,8 @@ typedef int BOOL;
// need a full recompile anyway, when modified (etc)
#include "zlib/zlib.h"
#include "i18n.h"
#include "Pcsx2Defs.h"
#include "i18n.h"
#include "Paths.h"
#include "Config.h"
#include "Utilities/Console.h"
@ -109,4 +109,4 @@ typedef int BOOL;
#endif // end GCC/Linux stuff
#endif
#endif

View File

@ -39,16 +39,17 @@ public:
virtual ~ConsoleLogFrame();
// menu callbacks
virtual void OnClose(wxCommandEvent& event);
virtual void OnClose(wxMenuEvent& event);
virtual void OnSave (wxMenuEvent& event);
virtual void OnClear(wxMenuEvent& event);
virtual void OnCloseWindow(wxCloseEvent& event);
virtual void OnSave (wxCommandEvent& event);
virtual void OnClear(wxCommandEvent& event);
virtual void Write( const wxChar* text );
virtual void Write( const char* text );
void Newline();
void Newline();
void SetColor( Console::Colors color );
void ClearColor();
@ -64,8 +65,6 @@ protected:
// common part of OnClose() and OnCloseWindow()
virtual void DoClose();
DECLARE_EVENT_TABLE()
void OnMoveAround( wxMoveEvent& evt );
void OnResize( wxSizeEvent& evt );
};

View File

@ -79,7 +79,7 @@ namespace PathDefs
{
return AppRoot + Plugins;
}
wxDirName GetSettings()
{
return GetDocuments() + Settings;
@ -94,11 +94,6 @@ namespace PathDefs
{
return GetDocuments() + Logs;
}
wxDirName GetDumps()
{
return GetDocuments() + Dumps;
}
};
//////////////////////////////////////////////////////////////////////////////////////////
@ -245,20 +240,22 @@ void i18n_DoPackageCheck( int wxLangId, wxArrayString& destEng, wxArrayString& d
//
void i18n_EnumeratePackages( wxArrayString& englishNames, wxArrayString& xlatedNames)
{
for( int li=wxLANGUAGE_ABKHAZIAN; li<wxLANGUAGE_ZULU; ++li )
for( int li=wxLANGUAGE_UNKNOWN+1; li<wxLANGUAGE_USER_DEFINED; ++li )
{
i18n_DoPackageCheck( li, englishNames, xlatedNames );
}
// Brilliant. Because someone in the wx world didn't think to move wxLANGUAGE_USER_DEFINED
// to a place where it wasn't butt right up against the main languages (like, say, start user
// defined values at 4000 or something?), they had to add new languages in at some arbitrary
// value instead. Let's handle them here:
// fixme: these won't show up in alphabetical order if they're actually present (however
// horribly unlikely that is)... do we care? Probably not.
i18n_DoPackageCheck( wxLANGUAGE_VALENCIAN, englishNames, xlatedNames );
i18n_DoPackageCheck( wxLANGUAGE_SAMI, englishNames, xlatedNames );
// Note: These aren't even available in some packaged Linux distros anyway. >_<
//i18n_DoPackageCheck( wxLANGUAGE_VALENCIAN, englishNames, xlatedNames );
//i18n_DoPackageCheck( wxLANGUAGE_SAMI, englishNames, xlatedNames );
}
// ------------------------------------------------------------------------
@ -276,7 +273,6 @@ void AppConfig::LoadSave( IniInterface& ini )
ini.Flush();
}
// ------------------------------------------------------------------------
//
void AppConfig::Apply()

View File

@ -34,6 +34,7 @@
// filename and try to open it, returns true on success (file was opened),
// false if file couldn't be opened/created and -1 if the file selection
// dialog was canceled
//
static bool OpenLogFile(wxFile& file, wxString& filename, wxWindow *parent)
{
filename = wxSaveFileSelector(L"log", L"txt", L"log.txt", parent);
@ -63,7 +64,7 @@ static bool OpenLogFile(wxFile& file, wxString& filename, wxWindow *parent)
wxFAIL_MSG( L"invalid message box return value" );
}
return ( bAppend ) ?
return ( bAppend ) ?
file.Open(filename, wxFile::write_append) :
file.Create(filename, true /* overwrite */);
}
@ -73,15 +74,6 @@ static bool OpenLogFile(wxFile& file, wxString& filename, wxWindow *parent)
//////////////////////////////////////////////////////////////////////////////////////////
//
BEGIN_EVENT_TABLE(ConsoleLogFrame, wxFrame)
// wxLogWindow menu events
EVT_MENU(Menu_Close, ConsoleLogFrame::OnClose)
EVT_MENU(Menu_Save, ConsoleLogFrame::OnSave)
EVT_MENU(Menu_Clear, ConsoleLogFrame::OnClear)
EVT_CLOSE(ConsoleLogFrame::OnCloseWindow)
END_EVENT_TABLE()
ConsoleLogFrame::ConsoleLogFrame(MainEmuFrame *parent, const wxString& title) :
wxFrame(parent, wxID_ANY, title),
m_TextCtrl( *new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
@ -103,7 +95,12 @@ ConsoleLogFrame::ConsoleLogFrame(MainEmuFrame *parent, const wxString& title) :
// status bar for menu prompts
CreateStatusBar();
ClearColor();
Connect( Menu_Close, wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( ConsoleLogFrame::OnClose ) );
Connect( Menu_Save, wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( ConsoleLogFrame::OnSave ) );
Connect( Menu_Clear, wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( ConsoleLogFrame::OnClear ) );
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ConsoleLogFrame::OnCloseWindow) );
Connect( wxEVT_MOVE, wxMoveEventHandler(ConsoleLogFrame::OnMoveAround) );
Connect( wxEVT_SIZE, wxSizeEventHandler(ConsoleLogFrame::OnResize) );
}
@ -114,10 +111,10 @@ void ConsoleLogFrame::OnMoveAround( wxMoveEvent& evt )
{
// Docking check! If the window position is within some amount
// of the main window, enable docking.
wxPoint topright( GetParent()->GetRect().GetTopRight() );
wxRect snapzone( topright - wxSize( 8,8 ), wxSize( 16,16 ) );
if( snapzone.Contains( GetPosition() ) )
SetPosition( topright + wxSize( 1,0 ) );
@ -138,15 +135,15 @@ void ConsoleLogFrame::DoClose()
wxStaticCast( GetParent(), MainEmuFrame )->OnLogBoxHidden();
}
void ConsoleLogFrame::OnClose(wxCommandEvent& WXUNUSED(event)) { DoClose(); }
void ConsoleLogFrame::OnClose(wxMenuEvent& WXUNUSED(event)) { DoClose(); }
void ConsoleLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { DoClose(); }
void ConsoleLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
void ConsoleLogFrame::OnSave(wxMenuEvent& WXUNUSED(event))
{
wxString filename;
wxFile file;
int rc = OpenLogFile( file, filename, this );
if ( rc == -1 )
bool rc = OpenLogFile( file, filename, this );
if ( !rc )
{
// canceled
return;
@ -167,23 +164,24 @@ void ConsoleLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
wxLogStatus(this, L"Log saved to the file '%s'.", filename.c_str());
}
void ConsoleLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
void ConsoleLogFrame::OnClear(wxMenuEvent& WXUNUSED(event))
{
m_TextCtrl.Clear();
}
static const wxTextAttr tbl_color_codes[] =
static const wxTextAttr tbl_color_codes[] =
{
// Standard R, G, B format:
wxTextAttr( wxColor( 0, 0, 0 ) ),
wxTextAttr( wxColor( 255, 0, 0 ) ),
wxTextAttr( wxColor( 0,255, 0 ) ),
wxTextAttr( wxColor( 255,255, 0 ) ),
wxTextAttr( wxColor( 0, 0,255 ) ),
wxTextAttr( wxColor( 0,255,255 ) ),
wxTextAttr( wxColor( 255,255,255 ) )
wxTextAttr( wxColor( 128, 0, 0 ) ),
wxTextAttr( wxColor( 0,128, 0 ) ),
wxTextAttr( wxColor( 180,180, 0 ) ),
wxTextAttr( wxColor( 0, 0,128 ) ),
wxTextAttr( wxColor( 0,160,160 ) ),
wxTextAttr( wxColor( 160,160,160 ) )
};
static const wxTextAttr color_default( wxColor( 192, 192, 192 ) );
static const wxTextAttr color_default( wxColor( 0, 0, 0 ) );
// Note: SetColor currently does not work on Win32, but I suspect it *should* work when
// we enable unicode compilation. (I really hope!)
@ -244,7 +242,7 @@ namespace Console
void ClearColor()
{
if( ConsoleLogFrame* FrameHandle = wxGetApp().GetConsoleFrame() )
FrameHandle->ClearColor();
FrameHandle->ClearColor();
}
// ------------------------------------------------------------------------

View File

@ -57,6 +57,6 @@ Dialogs::ConfigurationDialog::ConfigurationDialog( wxWindow* parent, int id ) :
SetSizerAndFit( &mainSizer );
Center( wxCENTER_ON_SCREEN );
Center( wxCENTER_ON_SCREEN | wxBOTH );
}

View File

@ -26,7 +26,7 @@
using namespace HashTools;
//////////////////////////////////////////////////////////////////////////////////////////
// Notes to Translators:
// Notes to Translators:
// * The first line of each entry consists of an enumerated index (used internally), and
// the gettext lookup string (which you'll find in the PO data). The resulting translation
// should match the text underneath.
@ -40,7 +40,7 @@ const EnglishExpansionEntry m_tbl_English[] =
L"Warning!! These advanced options are provided for developers and advanced testers only. "
L"Changing these settings can cause program errors, so please be weary."
},
{ Msg_Tooltips_SettingsPath, wxLt(L"Setting Tooltip:Settings Path"),
L"This is the folder where PCSX2 saves all settings, including settings generated "
L"by most plugins.\n\nWarning: Some older versions of plugins may not respect this value."
@ -64,22 +64,22 @@ const EnglishExpansionEntry m_tbl_English[] =
L"This folder is where PCSX2 saves screenshots. Actual screenshot image format and style "
L"may vary depending on the GS plugin being used."
},
{ Msg_Tooltips_Bios, wxLt(L"Setting Tooltip:Bios Folder"),
L"This folder is where PCSX2 looks to find PS2 bios files. The actual bios used can be "
L"selected from the CPU dialog."
},
{ Msg_Tooltips_Logs, wxLt(L"Setting Tooltip:Logs Folder"),
L"This folder is where PCSX2 saves its logfiles and diagnostic dumps. Most plugins will "
L"also adhere to this folder, however some older plugins may ignore it."
},
{ Msg_Tooltips_Memorycards, wxLt(L"Setting Tooltip:Memorycards Folder"),
L"This is the default path where PCSX2 loads or creates its memory cards, and can be "
L"overridden in the MemoryCard Configuration by using absolute filenames."
},
};
C_ASSERT( ArraySize( m_tbl_English ) == ExpandedMsg_Count );
@ -92,7 +92,7 @@ static HashMap<int,HashedExpansionPair> m_EnglishExpansions( -1, 0xcdcdcd, Array
void i18n_InitPlainEnglish()
{
static bool IsInitialized = false;
IsInitialized = true;
for( int i=0; i<ExpandedMsg_Count; ++i )
{
@ -115,7 +115,7 @@ void i18n_InitPlainEnglish()
const wxChar* __fastcall pxExpandMsg( ExpandedMsgEnum key )
{
const HashedExpansionPair& data( m_EnglishExpansions[key] );
int curlangid = wxLocale::GetLanguageInfo( g_Conf.LanguageId )->Language;
if( curlangid == wxLANGUAGE_ENGLISH || curlangid == wxLANGUAGE_ENGLISH_US )
return data.Expanded;
@ -159,7 +159,7 @@ bool i18n_SetLanguage( int wxLangId )
if( !locale->IsOk() )
{
Console::Notice( wxsFormat( L"SetLanguage: '%s' [%s] is not supported by the operating system",
wxLocale::GetLanguageName( locale->GetLanguage() ), locale->GetCanonicalName() )
wxLocale::GetLanguageName( locale->GetLanguage() ).c_str(), locale->GetCanonicalName().c_str() )
);
safe_delete( locale );
@ -169,7 +169,7 @@ bool i18n_SetLanguage( int wxLangId )
if( !locale->AddCatalog( L"pcsx2main" ) ) //, wxLANGUAGE_UNKNOWN, NULL ) )
{
Console::Notice( wxsFormat( L"SetLanguage: Cannot find pcsx2main.mo file for language '%s' [%s]",
wxLocale::GetLanguageName( locale->GetLanguage() ), locale->GetCanonicalName() )
wxLocale::GetLanguageName( locale->GetLanguage() ).c_str(), locale->GetCanonicalName().c_str() )
);
safe_delete( locale );
}

View File

@ -37,7 +37,7 @@ Pcsx2App::Pcsx2App() :
, m_ToolbarImages( NULL )
, m_Bitmap_Logo( NULL )
{
SetAppName( L"Pcsx2" );
SetAppName( L"pcsx2" );
}
wxFrame* Pcsx2App::GetMainWindow() const { return m_MainFrame; }
@ -50,12 +50,12 @@ wxFileConfig* OpenConfig( const wxString& filename )
void Pcsx2App::ReadUserModeSettings()
{
wxString configfile( Path::Combine( wxGetCwd(), L"usermode.ini" ) );
if( !wxFile::Exists( configfile ) )
{
Dialogs::PickUserModeDialog( m_MainFrame ).ShowModal();
}
wxFileConfig* conf_usermode = OpenConfig( Path::Combine( wxGetCwd(), L"usermode.ini" ) );
// Ensure proper scoping (IniLoader gets closed prior to delete)

View File

@ -52,7 +52,7 @@ namespace wxHelpers
{
return StdSpace().Expand();
}
wxSizerFlags StdGroupie()
{
// Groups look better with a slightly smaller margin than standard.
@ -67,13 +67,13 @@ namespace wxHelpers
{
return wxSizerFlags().Align( wxALIGN_RIGHT ).Border();
}
wxSizerFlags Checkbox()
{
return StdExpand();
}
};
// ------------------------------------------------------------------------
// Creates a new checkbox and adds it to the specified sizer/parent combo.
// Uses the default spacer setting for adding checkboxes.
@ -119,7 +119,7 @@ namespace wxHelpers
sizer.Add(temp, SizerFlags::StdSpace().Align( alignFlags & wxALIGN_MASK ) );
return *temp;
}
// ------------------------------------------------------------------------
// Launches the specified file according to its mime type
//
@ -193,7 +193,7 @@ void wxDialogWithHelpers::AddOkCancel( wxBoxSizer &sizer, bool hasApply )
// create a sizer to hold the help and ok/cancel buttons, for platforms
// that need a custom help icon. [fixme: help icon prolly better off somewhere else]
buttonSizer = new wxBoxSizer( wxHORIZONTAL );
buttonSizer->Add( new wxContextHelpButton(this), wxHelpers::stdButtonSizerFlags.Align( wxALIGN_LEFT ) );
buttonSizer->Add( new wxContextHelpButton(this), wxHelpers::SizerFlags::StdButton().Align( wxALIGN_LEFT ) );
sizer.Add( buttonSizer, wxSizerFlags().Center() );
#endif
}
@ -234,7 +234,7 @@ wxRadioButton& wxPanelWithHelpers::AddRadioButton( wxBoxSizer& sizer, const wxSt
{
wxRadioButton& retval = wxHelpers::AddRadioButtonTo( this, sizer, label, id, m_StartNewRadioGroup );
m_StartNewRadioGroup = false;
if( !subtext.IsEmpty() )
{
sizer.Add( new wxStaticText( this, wxID_ANY, subtext ), wxSizerFlags().Border( wxLEFT, 25 ) );