fix: Loading of plugins and localizations after restart
This commit is contained in:
parent
a99f8f78d0
commit
8aec382440
@ -108,10 +108,11 @@ namespace hex {
|
||||
|
||||
void LangEntry::resetLanguageStrings() {
|
||||
LangEntry::s_currStrings.clear();
|
||||
LangEntry::s_selectedLanguage.clear();
|
||||
}
|
||||
|
||||
const std::string &LangEntry::getSelectedLanguage() {
|
||||
return s_selectedLanguage;
|
||||
return LangEntry::s_selectedLanguage;
|
||||
}
|
||||
|
||||
}
|
@ -419,6 +419,11 @@ namespace hex::init {
|
||||
}
|
||||
|
||||
bool loadPlugins() {
|
||||
// Load all plugins
|
||||
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) {
|
||||
PluginManager::load(dir);
|
||||
}
|
||||
|
||||
// Get loaded plugins
|
||||
auto &plugins = PluginManager::getPlugins();
|
||||
|
||||
|
@ -21,12 +21,6 @@
|
||||
|
||||
using namespace hex;
|
||||
|
||||
void loadPlugins() {
|
||||
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) {
|
||||
PluginManager::load(dir);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
Window::initNative();
|
||||
|
||||
@ -34,10 +28,16 @@ int main(int argc, char **argv) {
|
||||
|
||||
std::vector<std::string> args(argv + 1, argv + argc);
|
||||
|
||||
loadPlugins();
|
||||
if (argc > 1) {
|
||||
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) {
|
||||
PluginManager::load(dir);
|
||||
}
|
||||
|
||||
hex::messaging::setupMessaging();
|
||||
hex::subcommands::processArguments(args);
|
||||
hex::messaging::setupMessaging();
|
||||
hex::subcommands::processArguments(args);
|
||||
|
||||
PluginManager::unload();
|
||||
}
|
||||
|
||||
log::info("Welcome to ImHex {}!", ImHexApi::System::getImHexVersion());
|
||||
log::info("Compiled using commit {}@{}", ImHexApi::System::getCommitBranch(), ImHexApi::System::getCommitHash());
|
||||
|
@ -218,6 +218,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::UnderlinedText("hex.builtin.welcome.header.help"_lang);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5_scaled);
|
||||
ImGui::Dummy({0, 0});
|
||||
{
|
||||
if (ImGui::IconHyperlink(ICON_VS_GITHUB, "hex.builtin.welcome.help.repo"_lang)) hex::openWebpage("hex.builtin.welcome.help.repo.link"_lang);
|
||||
if (ImGui::IconHyperlink(ICON_VS_ORGANIZATION, "hex.builtin.welcome.help.gethelp"_lang)) hex::openWebpage("hex.builtin.welcome.help.gethelp.link"_lang);
|
||||
|
Loading…
Reference in New Issue
Block a user