mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
Added patches display window
This commit is contained in:
@@ -32,7 +32,7 @@ namespace hex::prv {
|
||||
virtual void writeRaw(u64 offset, const void *buffer, size_t size) = 0;
|
||||
virtual size_t getActualSize() = 0;
|
||||
|
||||
const std::map<u64, u8>& getPatches() { return this->m_patches.back(); }
|
||||
std::map<u64, u8>& getPatches() { return this->m_patches.back(); }
|
||||
void applyPatches() {
|
||||
for (auto &[patchAddress, patch] : this->m_patches.back())
|
||||
this->writeRaw(patchAddress, &patch, 1);
|
||||
|
||||
29
include/views/view_patches.hpp
Normal file
29
include/views/view_patches.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#include "imgui.h"
|
||||
#include "views/view.hpp"
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace hex {
|
||||
|
||||
namespace prv { class Provider; }
|
||||
|
||||
class ViewPatches : public View {
|
||||
public:
|
||||
explicit ViewPatches(prv::Provider* &dataProvider);
|
||||
~ViewPatches() override;
|
||||
|
||||
void createView() override;
|
||||
void createMenu() override;
|
||||
|
||||
private:
|
||||
prv::Provider* &m_dataProvider;
|
||||
|
||||
|
||||
u64 m_selectedPatch;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user