4646#include " controller/controldeck/ControlDeck.h"
4747#include " port/mods/utils/GfxPrint.h"
4848
49- #ifdef __SWITCH__
50- #include < port/switch/SwitchImpl.h>
51- #endif
52-
5349const float imguiScaleOptionToValue[4 ] = { 0 .75f , 1 .0f , 1 .5f , 2 .0f };
5450std::shared_ptr<Fast::Fast3dWindow> gsFast3dWindow;
5551const uint32_t defaultImGuiScale = 1 ;
@@ -122,11 +118,6 @@ bool VerifyArchiveVersion(OTRVersion version) {
122118GameEngine::GameEngine () : dictionary(nullptr ) {
123119 this ->context = Ship::Context::CreateUninitializedInstance (" Ghostship" , " sm64" , " ghostship.cfg.json" );
124120
125- #ifdef __SWITCH__
126- Ship::Switch::Init (Ship::PreInitPhase);
127- Ship::Switch::Init (Ship::PostInitPhase);
128- #endif
129-
130121 this ->context ->InitConfiguration (); // without this line InitConsoleVariables fails at Config::Reload()
131122 this ->context ->InitConsoleVariables (); // without this line the controldeck constructor failes in
132123 // ShipDeviceIndexMappingManager::UpdateControllerNamesFromConfig()
@@ -173,7 +164,9 @@ GameEngine::GameEngine() : dictionary(nullptr) {
173164 archiveFiles.push_back (assets_path);
174165 }
175166
176- if (const std::string patches_path = Ship::Context::GetPathRelativeToAppDirectory (" mods" ); !patches_path.empty ()) {
167+ const std::string patches_path = Ship::Context::GetPathRelativeToAppDirectory (" mods" );
168+
169+ if (!patches_path.empty ()) {
177170 if (!std::filesystem::exists (patches_path)) {
178171 std::filesystem::create_directories (patches_path);
179172 }
@@ -190,6 +183,13 @@ GameEngine::GameEngine() : dictionary(nullptr) {
190183 archiveFiles.push_back (p.path ().generic_string ());
191184 }
192185 }
186+
187+ for (const auto & p : std::filesystem::directory_iterator (patches_path)) {
188+ if (p.is_directory ()){
189+ SPDLOG_INFO (" Found mod directory: {}" , p.path ().generic_string ());
190+ archiveFiles.push_back (p.path ().generic_string ());
191+ }
192+ }
193193 }
194194 }
195195
@@ -421,9 +421,6 @@ void GameEngine::Destroy() {
421421 gsFast3dWindow = nullptr ;
422422 Instance->context = nullptr ;
423423 AudioExit ();
424- #ifdef __SWITCH__
425- Ship::Switch::Exit ();
426- #endif
427424}
428425
429426void GameEngine::StartFrame () const {
0 commit comments