Refactoring of game features for better management. (#126)

This commit is contained in:
Mikaël Capelle
2024-06-09 12:26:39 +02:00
committed by GitHub
parent a966db7d19
commit 790d0a1097
11 changed files with 110 additions and 99 deletions
+12 -11
View File
@@ -82,17 +82,6 @@ namespace mo2::python {
try {
static const char* argv0 = "ModOrganizer.exe";
PyConfig config;
PyConfig_InitIsolatedConfig(&config);
// from PyBind11
config.parse_argv = 0;
config.install_signal_handlers = 0;
// from MO2
config.site_import = 1;
config.optimization_level = 2;
// set the module search paths
//
auto paths = pythonPaths;
@@ -110,6 +99,18 @@ namespace mo2::python {
}
}
PyConfig config;
PyConfig_InitIsolatedConfig(&config);
// from PyBind11
config.parse_argv = 0;
config.install_signal_handlers = 0;
// from MO2
config.site_import = 1;
config.optimization_level = 2;
// set paths to configuration
if (!paths.empty()) {
config.module_search_paths_set = 1;
for (auto const& path : paths) {