Lilypad and PCSX2 ini/config bugfixes.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2362 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-12-19 23:02:05 +00:00
parent 9f41fc4793
commit bb319266fc
3 changed files with 10 additions and 9 deletions

View File

@ -427,8 +427,6 @@ namespace Panels
class ComboBoxPanel : public wxPanelWithHelpers
{
protected:
EventListenerBinding<PluginEventType> m_Listener_CorePluginStatus;
wxComboBox* m_combobox[PluginId_Count];
wxButton* m_configbutton[PluginId_Count];
DirPickerPanel& m_FolderPicker;

View File

@ -184,7 +184,6 @@ static const int ButtonId_Configure = 51;
// =====================================================================================================
Panels::PluginSelectorPanel::ComboBoxPanel::ComboBoxPanel( PluginSelectorPanel* parent )
: wxPanelWithHelpers( parent, wxVERTICAL )
, m_Listener_CorePluginStatus( wxGetApp().Source_CorePluginStatus(), EventListener<PluginEventType> ( this, OnCorePluginStatusChanged ) )
, m_FolderPicker( *new DirPickerPanel( this, FolderId_Plugins,
_("Plugins Search Path:"),
_("Select a folder with PCSX2 plugins") )
@ -237,11 +236,15 @@ void __evt_fastcall Panels::PluginSelectorPanel::OnCorePluginStatusChanged( void
if( (evt != PluginsEvt_Loaded) && (evt != PluginsEvt_Unloaded) ) return; // everything else we don't care about
PluginSelectorPanel& panel = *(PluginSelectorPanel*)obj;
if( panel.IsBeingDeleted() ) return;
const PluginInfo* pi = tbl_PluginInfo; do {
const PluginInfo* pi = tbl_PluginInfo; do
{
wxComboBox& box( panel.m_ComponentBoxes->Get(pi->id) );
panel.m_ComponentBoxes->GetConfigButton(pi->id).Enable(
(panel.m_FileList==NULL) ? false :
g_Conf->FullpathMatchTest( pi->id, (*panel.m_FileList)[pi->id] )
(panel.m_FileList==NULL || panel.m_FileList->Count() == 0) ? false :
g_Conf->FullpathMatchTest( pi->id, panel.m_FileList->at((int)box.GetClientData(box.GetSelection())) )
);
} while( ++pi, pi->shortname != NULL );
@ -474,7 +477,7 @@ void Panels::PluginSelectorPanel::OnPluginSelected( wxCommandEvent& evt )
const PluginInfo* pi = tbl_PluginInfo; do
{
wxComboBox& box = m_ComponentBoxes->Get(pi->id);
wxComboBox& box( m_ComponentBoxes->Get(pi->id) );
if( box.GetId() == evt.GetId() )
{
// Button is enabled if:

View File

@ -274,10 +274,10 @@ wchar_t *GetCommandStringW(u8 command, int port, int slot) {
static wchar_t iniFile[MAX_PATH*2] = L"inis\\LilyPad.ini";
void CALLBACK PADsetSettingsDir(wchar_t *dir)
void CALLBACK PADsetSettingsDir( const char *dir )
{
// emulator assures a trailing slash/backslash (yay!)
wcscpy(iniFile, (dir==NULL) ? L"inis\\" : dir);
swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
wcscat(iniFile, L"LilyPad.ini");
createIniDir = false;