ux: Open files in existing ImHex instance if passed in as command line argument on windows

Closes #389
This commit is contained in:
WerWolv
2021-12-30 23:21:32 +01:00
parent 0884025b82
commit d3d9209b39
5 changed files with 62 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
#include <hex/helpers/utils.hpp>
#include <hex/helpers/logger.hpp>
#include <hex/helpers/shared_data.hpp>
#include "window.hpp"
@@ -11,13 +12,17 @@
#include <hex/helpers/file.hpp>
int main(int argc, char **argv, char **envp) {
hex::SharedData::mainArgc = argc;
hex::SharedData::mainArgv = argv;
hex::SharedData::mainEnvp = envp;
using namespace hex;
// Initialization
{
Window::initNative();
init::WindowSplash splashWindow(argc, argv, envp);
init::WindowSplash splashWindow;
for (const auto &[name, task] : init::getInitTasks())
splashWindow.addStartupTask(name, task);