| 164 | } |
| 165 | |
| 166 | ytutils::HistLog::HistLog(uint32_t tus) : Log(tus) |
| 167 | { |
| 168 | uint32_t i = 0; |
| 169 | char val[2]; |
| 170 | char data[SCE_INI_FILE_PROCESSOR_KEY_BUFFER_SIZE]; |
| 171 | Ini::InitParameter param; |
| 172 | Ini::MemAllocator alloc; |
| 173 | alloc.allocate = sce_paf_malloc; |
| 174 | alloc.deallocate = sce_paf_free; |
| 175 | |
| 176 | param.workmemSize = SCE_KERNEL_4KiB; |
| 177 | param.unk_0x4 = SCE_KERNEL_4KiB; |
| 178 | param.allocator = &alloc; |
| 179 | |
| 180 | m_ini = new Ini::IniFileProcessor(); |
| 181 | m_ini->initialize(¶m); |
| 182 | m_ini->open("savedata0:yt_hist_log.ini", "rw", 0); |
| 183 | |
| 184 | i = m_ini->size(); |
| 185 | if (i <= k_maxHistItems) |
| 186 | return; |
| 187 | |
| 188 | i = i - k_maxHistItems; |
| 189 | |
| 190 | while (i != 0) |
| 191 | { |
| 192 | m_ini->parse(data, val, sizeof(val)); |
| 193 | m_ini->del(data); |
| 194 | i--; |
| 195 | } |
| 196 | |
| 197 | m_ini->reset(); |
| 198 | } |
| 199 | |
| 200 | int32_t ytutils::HistLog::UpdateFromTUS() |
| 201 | { |
nothing calls this directly
no outgoing calls
no test coverage detected