MCPcopy Create free account
hub / github.com/cemu-project/Cemu / OnGameLoaded

Method OnGameLoaded

src/gui/debugger/ModuleWindow.cpp:80–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80void ModuleWindow::OnGameLoaded()
81{
82 Freeze();
83
84 m_modules->DeleteAllItems();
85
86 const auto module_count = RPLLoader_GetModuleCount();
87 const auto module_list = RPLLoader_GetModuleList();
88 for (int i = 0; i < module_count; i++)
89 {
90 const auto module = module_list[i];
91 if (module)
92 {
93 wxListItem item;
94 item.SetId(i);
95 item.SetText(module->moduleName2.c_str());
96
97 const auto index = m_modules->InsertItem(item);
98 m_modules->SetItem(index, ColumnAddress, wxString::Format("%08x", module->regionMappingBase_text.GetMPTR()));
99 m_modules->SetItem(index, ColumnSize, wxString::Format("%x", module->regionSize_text));
100 }
101 }
102
103 sint32 patch_count = 0;
104 for (auto& gfx_pack : GraphicPack2::GetGraphicPacks())
105 {
106 for (auto& patch_group : gfx_pack->GetPatchGroups())
107 {
108 if (patch_group->isApplied())
109 {
110 wxListItem item;
111 item.SetId(module_count + patch_count);
112 item.SetText(std::string(patch_group->getName()));
113
114 const auto index = m_modules->InsertItem(item);
115 m_modules->SetItem(index, ColumnAddress, wxString::Format("%08x", patch_group->getCodeCaveBase()));
116 m_modules->SetItem(index, ColumnSize, wxString::Format("%x", patch_group->getCodeCaveSize()));
117 patch_count++;
118 }
119 }
120 }
121
122 Thaw();
123}
124
125
126void ModuleWindow::OnLeftDClick(wxMouseEvent& event)

Callers

nothing calls this directly

Calls 12

RPLLoader_GetModuleCountFunction · 0.85
RPLLoader_GetModuleListFunction · 0.85
DeleteAllItemsMethod · 0.80
SetTextMethod · 0.80
InsertItemMethod · 0.80
SetItemMethod · 0.80
getCodeCaveBaseMethod · 0.80
getCodeCaveSizeMethod · 0.80
c_strMethod · 0.45
GetMPTRMethod · 0.45
isAppliedMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected