mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Add startup delay option
This commit is contained in:
parent
3678c97ec3
commit
853ab259f4
@ -28,6 +28,7 @@ endif()
|
|||||||
find_program(SDL_SHADERCROSS_BIN NAMES "shadercross")
|
find_program(SDL_SHADERCROSS_BIN NAMES "shadercross")
|
||||||
find_package(Python3 3.11 COMPONENTS Interpreter)
|
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_BUILD_APP "Build isle application" ON)
|
||||||
option(ISLE_ASAN "Enable Address Sanitizer" OFF)
|
option(ISLE_ASAN "Enable Address Sanitizer" OFF)
|
||||||
option(ISLE_UBSAN "Enable Undefined Behavior 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)")
|
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)
|
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 "Isle app: ${ISLE_BUILD_APP}")
|
||||||
message(STATUS "Config app: ${ISLE_BUILD_CONFIG}")
|
message(STATUS "Config app: ${ISLE_BUILD_CONFIG}")
|
||||||
message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")
|
message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")
|
||||||
@ -553,6 +555,10 @@ if (ISLE_BUILD_CONFIG)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (ISLE_STARTUP_DELAY)
|
||||||
|
target_compile_definitions(STARTUP_DELAY);
|
||||||
|
endif()
|
||||||
|
|
||||||
if (ISLE_MINIWIN)
|
if (ISLE_MINIWIN)
|
||||||
set_property(TARGET ${isle_targets} APPEND PROPERTY LINK_LIBRARIES "miniwin")
|
set_property(TARGET ${isle_targets} APPEND PROPERTY LINK_LIBRARIES "miniwin")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -908,8 +908,13 @@ inline bool IsleApp::Tick()
|
|||||||
// GLOBAL: ISLE 0x4101c0
|
// GLOBAL: ISLE 0x4101c0
|
||||||
static MxLong g_lastFrameTime = 0;
|
static MxLong g_lastFrameTime = 0;
|
||||||
|
|
||||||
|
#ifdef STARTUP_DELAY
|
||||||
// GLOBAL: ISLE 0x4101bc
|
// GLOBAL: ISLE 0x4101bc
|
||||||
static MxS32 g_startupDelay = 200;
|
static MxS32 g_startupDelay = 200;
|
||||||
|
#else
|
||||||
|
// GLOBAL: ISLE 0x4101bc
|
||||||
|
static MxS32 g_startupDelay = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IsleDebug_Paused() && IsleDebug_StepModeEnabled()) {
|
if (IsleDebug_Paused() && IsleDebug_StepModeEnabled()) {
|
||||||
IsleDebug_SetPaused(false);
|
IsleDebug_SetPaused(false);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user