mirror of https://github.com/PCSX2/pcsx2.git
wxgui: Additional fixups to linux behavior.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1664 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
db3e81504e
commit
12eea0fc5a
|
@ -178,6 +178,9 @@ extern const CommonHashClass GetCommonHash;
|
|||
struct CommonHashClass
|
||||
{
|
||||
public:
|
||||
// GCC needs empty constructors on const instances, because it likes pointlessness.
|
||||
CommonHashClass() {}
|
||||
|
||||
hash_key_t DoInt( u32 val ) const
|
||||
{
|
||||
u32 key = val;
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
<Unit filename="../GS.h" />
|
||||
<Unit filename="../Gif.cpp" />
|
||||
<Unit filename="../HashMap.h" />
|
||||
<Unit filename="../HashTools.cpp" />
|
||||
<Unit filename="../HostGui.h" />
|
||||
<Unit filename="../Hw.cpp" />
|
||||
<Unit filename="../Hw.h" />
|
||||
|
|
|
@ -183,18 +183,7 @@ void FirstTimeWizard::OnPageChanged( wxWizardEvent& evt )
|
|||
// receive any Show events >_<
|
||||
if( (sptr)evt.GetPage() == (sptr)&m_page_plugins )
|
||||
m_panel_PluginSel.OnShown();
|
||||
}
|
||||
|
||||
/*
|
||||
wxString biosfolder( Path::Combine( conf.GetDefaultDocumentsFolder(), conf.Folders.Bios ) );
|
||||
|
||||
if( wxDir::Exists( biosfolder ) )
|
||||
{
|
||||
if( wxDir::GetAllFiles( biosfolder, NULL, L"*.bin", wxDIR_FILES ) )
|
||||
else if( (sptr)evt.GetPage() == (sptr)&m_page_bios )
|
||||
m_panel_BiosSel.OnShown();
|
||||
}
|
||||
|
||||
if( !wxDir::Exists( biosfolder ) )
|
||||
{
|
||||
Msgbox::Alert( ("First Time Installation:\n\n") + BIOS_GetMsg_Required() );
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "Resources/BackgroundLogo.h"
|
||||
|
||||
#include <wx/cmdline.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
IMPLEMENT_APP(Pcsx2App)
|
||||
|
||||
|
@ -65,13 +66,35 @@ Pcsx2App::Pcsx2App() :
|
|||
|
||||
wxFrame* Pcsx2App::GetMainWindow() const { return m_MainFrame; }
|
||||
|
||||
#include "HashMap.h"
|
||||
|
||||
// User mode settings can't be stores in the CWD for two reasons:
|
||||
// (a) the user may not have permission to do so (most obvious)
|
||||
// (b) it would result in sloppy usermode.ini found all over a hard drive if people runs the
|
||||
// exe from many locations (ugh).
|
||||
//
|
||||
// So better to use the registry on Win32 and a "default ini location" config file under Linux,
|
||||
// and store the usermode settings for the CWD based on the CWD's hash.
|
||||
//
|
||||
void Pcsx2App::ReadUserModeSettings()
|
||||
{
|
||||
wxFileName usermodefile( FilenameDefs::GetUsermodeConfig() );
|
||||
usermodefile.SetPath( wxGetCwd() );
|
||||
wxString cwd( wxGetCwd() );
|
||||
u32 hashres = HashTools::Hash( (char*)cwd.c_str(), cwd.Length() );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
if( true ) // fixme!!
|
||||
#else
|
||||
wxDirName usrlocaldir( wxStandardPaths::Get().GetUserLocalDataDir() );
|
||||
if( !usrlocaldir.Exists() )
|
||||
usrlocaldir.Mkdir();
|
||||
|
||||
wxFileName usermodefile( wxsFormat( L"%08x.usermode.ini", hashres ) );
|
||||
usermodefile.SetPath( usrlocaldir.ToString() );
|
||||
wxScopedPtr<wxFileConfig> conf_usermode( OpenFileConfig( usermodefile.GetFullPath() ) );
|
||||
|
||||
if( !wxFile::Exists( usermodefile.GetFullPath() ) )
|
||||
#endif
|
||||
|
||||
{
|
||||
// first time startup, so give the user the choice of user mode:
|
||||
//if( Dialogs::PickUserModeDialog( NULL ).ShowModal() == wxID_CANCEL )
|
||||
|
|
Loading…
Reference in New Issue