mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
Improved LLE Manager
Improved VFS
This commit is contained in:
parent
795729a0b7
commit
a59cf50f03
22 changed files with 559 additions and 175 deletions
|
|
@ -13,19 +13,20 @@ LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent) : FrameBase(par
|
|||
wxBoxSizer *s_p_panel = new wxBoxSizer(wxVERTICAL);
|
||||
wxPanel *p_main = new wxPanel(this);
|
||||
m_check_list = new wxCheckListBox(p_main, wxID_ANY);
|
||||
s_p_panel->Add(m_check_list, 0, wxEXPAND | wxALL, 5);
|
||||
s_p_panel->Add(m_check_list, 1, wxEXPAND | wxALL, 5);
|
||||
p_main->SetSizerAndFit(s_p_panel);
|
||||
s_panel->Add(p_main, 0, wxEXPAND | wxALL, 5);
|
||||
s_panel->Add(p_main, 1, wxEXPAND | wxALL, 5);
|
||||
SetSizerAndFit(s_panel);
|
||||
|
||||
Refresh();
|
||||
//Bind(wxEVT_CHECKLISTBOX, [this](wxCommandEvent& event) { UpdateSelection(); });
|
||||
Bind(wxEVT_SIZE, [p_main, this](wxSizeEvent& event) { p_main->SetSize(GetClientSize()); m_check_list->SetSize(p_main->GetClientSize() - wxSize(10, 10)); });
|
||||
Bind(wxEVT_CHECKLISTBOX, [this](wxCommandEvent& event) { UpdateSelection(event.GetInt()); event.Skip(); });
|
||||
Bind(wxEVT_SIZE, [p_main, this](wxSizeEvent& event) { p_main->SetSize(GetClientSize()); m_check_list->SetSize(p_main->GetClientSize() - wxSize(10, 10)); event.Skip(); });
|
||||
}
|
||||
|
||||
void LLEModulesManagerFrame::Refresh()
|
||||
{
|
||||
m_check_list->Clear();
|
||||
m_funcs.clear();
|
||||
|
||||
std::string path = "/dev_flash/sys/external/";
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ void LLEModulesManagerFrame::Refresh()
|
|||
vfsDir dir(path);
|
||||
|
||||
loader::handlers::elf64 sprx_loader;
|
||||
for (const DirEntryInfo* info = dir.Read(); info; info = dir.Read())
|
||||
for (const auto info : dir)
|
||||
{
|
||||
if (info->flags & DirEntry_TypeFile)
|
||||
{
|
||||
|
|
@ -49,17 +50,45 @@ void LLEModulesManagerFrame::Refresh()
|
|||
continue;
|
||||
}
|
||||
|
||||
sprx_loader.load();
|
||||
//loader::handlers::elf64::sprx_info info;
|
||||
//sprx_loader.load_sprx(info);
|
||||
|
||||
m_check_list->Check(m_check_list->Append(sprx_loader.sprx_get_module_name() +
|
||||
" v" + std::to_string((int)sprx_loader.m_sprx_module_info.version[0]) + "." + std::to_string((int)sprx_loader.m_sprx_module_info.version[1])));
|
||||
std::string name = sprx_loader.sprx_get_module_name();
|
||||
|
||||
bool is_skip = false;
|
||||
for (auto &i : m_funcs)
|
||||
{
|
||||
if (i == name)
|
||||
{
|
||||
is_skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_skip)
|
||||
continue;
|
||||
|
||||
m_funcs.push_back(name);
|
||||
|
||||
IniEntry<bool> load_lib;
|
||||
load_lib.Init(name, "LLE");
|
||||
|
||||
m_check_list->Check(m_check_list->Append(name +
|
||||
" v" + std::to_string((int)sprx_loader.m_sprx_module_info.version[0]) +
|
||||
"." + std::to_string((int)sprx_loader.m_sprx_module_info.version[1])),
|
||||
load_lib.LoadValue(false));
|
||||
}
|
||||
}
|
||||
|
||||
Emu.GetVFS().UnMountAll();
|
||||
}
|
||||
|
||||
void LLEModulesManagerFrame::UpdateSelection()
|
||||
void LLEModulesManagerFrame::UpdateSelection(int index)
|
||||
{
|
||||
if (index < 0)
|
||||
return;
|
||||
|
||||
IniEntry<bool> load_lib;
|
||||
load_lib.Init(m_funcs[index], "LLE");
|
||||
load_lib.SaveValue(m_check_list->IsChecked(index));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue