Add startup delay option

This commit is contained in:
Carson Coder 2025-06-21 22:34:20 -04:00
parent 3678c97ec3
commit 853ab259f4
2 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,7 @@ endif()
find_program(SDL_SHADERCROSS_BIN NAMES "shadercross")
find_package(Python3 3.11 COMPONENTS Interpreter)
option(ISLE_STARTUP_DELAY "Enable startup delay" ON)
option(ISLE_BUILD_APP "Build isle application" ON)
option(ISLE_ASAN "Enable Address Sanitizer" OFF)
option(ISLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF)
@ -44,6 +45,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" CACHE PATH "Directory w
set(ISLE_EMSCRIPTEN_HOST "" CACHE STRING "Host URL for Emscripten streaming (e.g., https://test.com)")
cmake_dependent_option(BUILD_SHARED_LIBS "Build lego1 as a shared library" ON "NOT EMSCRIPTEN" OFF)
message(STATUS "Startup delay: ${ISLE_STARTUP_DELAY}")
message(STATUS "Isle app: ${ISLE_BUILD_APP}")
message(STATUS "Config app: ${ISLE_BUILD_CONFIG}")
message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")
@ -553,6 +555,10 @@ if (ISLE_BUILD_CONFIG)
endif()
endif()
if (ISLE_STARTUP_DELAY)
target_compile_definitions(STARTUP_DELAY);
endif()
if (ISLE_MINIWIN)
set_property(TARGET ${isle_targets} APPEND PROPERTY LINK_LIBRARIES "miniwin")
endif()

View File

@ -908,8 +908,13 @@ inline bool IsleApp::Tick()
// GLOBAL: ISLE 0x4101c0
static MxLong g_lastFrameTime = 0;
#ifdef STARTUP_DELAY
// GLOBAL: ISLE 0x4101bc
static MxS32 g_startupDelay = 200;
#else
// GLOBAL: ISLE 0x4101bc
static MxS32 g_startupDelay = 1;
#endif
if (IsleDebug_Paused() && IsleDebug_StepModeEnabled()) {
IsleDebug_SetPaused(false);