mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
api: Added api function to create pattern
This commit is contained in:
@@ -15,8 +15,7 @@
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
static void openFile(const std::fs::path &path) {
|
||||
hex::prv::Provider *provider = nullptr;
|
||||
EventManager::post<RequestCreateProvider>("hex.builtin.provider.file", &provider);
|
||||
auto provider = ImHexApi::Provider::createProvider("hex.builtin.provider.file");
|
||||
|
||||
if (auto fileProvider = dynamic_cast<prv::FileProvider *>(provider)) {
|
||||
fileProvider->setPath(path);
|
||||
|
||||
Reference in New Issue
Block a user