diff --git a/src/port/Game.cpp b/src/port/Game.cpp index 4a9bdcfc4..7e93888e7 100644 --- a/src/port/Game.cpp +++ b/src/port/Game.cpp @@ -809,6 +809,22 @@ extern "C" CustomEngineInit(); + switch(CVarGetInteger("gSkipIntro", 0)) { + case 0: + gMenuSelection = HARBOUR_MASTERS_MENU; + break; + case 1: + gMenuSelection = LOGO_INTRO_MENU; + break; + case 2: + gMenuSelection = START_MENU; + break; + case 3: + gMenuSelection = MAIN_MENU; + break; + } + + // Debug mode override gSkipIntro if (CVarGetInteger("gEnableDebugMode", 0) == true) { gMenuSelection = START_MENU; } diff --git a/src/port/ui/Menu.cpp b/src/port/ui/Menu.cpp index 670e304fc..9c68d2786 100644 --- a/src/port/ui/Menu.cpp +++ b/src/port/ui/Menu.cpp @@ -764,6 +764,8 @@ void Menu::DrawElement() { // for (auto& entryName : sidebar->at(sectionIndex).sidebarOrder) { for (auto& entry : sidebar->at(sectionIndex).columnWidgets.at(i)) { MenuDrawItem(entry, 90 / sidebar->at(sectionIndex).columnCount, menuThemeIndex); + ImGui::Spacing(); + ImGui::Spacing(); } //} if (useColumns) { diff --git a/src/port/ui/Menu.h b/src/port/ui/Menu.h index 199a973a8..6efd056ca 100644 --- a/src/port/ui/Menu.h +++ b/src/port/ui/Menu.h @@ -60,6 +60,23 @@ class Menu : public GuiWindow { virtual void ProcessReset() { gGamestateNext = MAIN_MENU_FROM_QUIT; gIsGamePaused = 0; + + switch(CVarGetInteger("gSkipIntro", 0)) { + case 0: + gMenuSelection = HARBOUR_MASTERS_MENU; + break; + case 1: + gMenuSelection = LOGO_INTRO_MENU; + break; + case 2: + gMenuSelection = START_MENU; + break; + case 3: + gMenuSelection = MAIN_MENU; + break; + } + + // Debug mode override gSkipIntro if (CVarGetInteger("gEnableDebugMode", 0) == true) { gMenuSelection = START_MENU; } else { diff --git a/src/port/ui/PortMenu.cpp b/src/port/ui/PortMenu.cpp index 65f169a8c..e6a1c9ac6 100644 --- a/src/port/ui/PortMenu.cpp +++ b/src/port/ui/PortMenu.cpp @@ -99,6 +99,12 @@ void PortMenu::AddSettings() { .Callback([](WidgetInfo& info) { Ship::Context::GetInstance()->GetWindow()->ToggleFullscreen(); }) .Options(CheckboxOptions().Tooltip("Toggles Fullscreen On/Off.")); + AddWidget(path, "Startup Behaviour", WIDGET_CVAR_COMBOBOX) + .CVar("gSkipIntro") + .Options(ComboboxOptions() + .ComboMap(introBehaviourOptions) + .Tooltip("Select which scene or menu the game launch to.")); + AddWidget(path, "Menu Theme", WIDGET_CVAR_COMBOBOX) .CVar("gSettings.Menu.Theme") .Options(ComboboxOptions() diff --git a/src/port/ui/PortMenu.h b/src/port/ui/PortMenu.h index 12eb60379..a96e3570e 100644 --- a/src/port/ui/PortMenu.h +++ b/src/port/ui/PortMenu.h @@ -26,6 +26,13 @@ static const std::unordered_map menuThemeOptions = { { UIWidgets::Colors::DarkGray, "Dark Gray" }, }; +static const std::unordered_map introBehaviourOptions = { + { 0, "Both" }, + { 1, "Authentic" }, + { 2, "Start Menu" }, + { 3, "Main Menu" }, +}; + static const std::unordered_map textureFilteringMap = { { Fast::FilteringMode::FILTER_THREE_POINT, "Three-Point" }, { Fast::FilteringMode::FILTER_LINEAR, "Linear" }, diff --git a/src/stubs.c b/src/stubs.c index 029448860..eefbb7d78 100644 --- a/src/stubs.c +++ b/src/stubs.c @@ -97,6 +97,8 @@ s32 osPfsAllocateFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name } s32 osPfsIsPlug(OSMesgQueue* queue, u8* pattern) { + *pattern = 1; + return 1; } s32 osPfsInit(OSMesgQueue* queue, OSPfs* pfs, int channel) {