mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
fix: Dropping files onto ImHex opening them twice
This commit is contained in:
@@ -86,6 +86,13 @@ namespace hex {
|
||||
RequestChangeTheme::post(hex::containsIgnoreCase(result, "uint32 1") ? "Light" : "Dark");
|
||||
});
|
||||
|
||||
// Register file drop callback
|
||||
glfwSetDropCallback(m_window, [](GLFWwindow *, int count, const char **paths) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
EventFileDropped::post(reinterpret_cast<const char8_t *>(paths[i]));
|
||||
}
|
||||
});
|
||||
|
||||
if (themeFollowSystem)
|
||||
EventOSThemeChanged::post();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user