From 5b4aaf4eb1b848d023b3bac0ce7a8e34faab9ba1 Mon Sep 17 00:00:00 2001 From: ubkp <118854183+ubkp@users.noreply.github.com> Date: Thu, 3 Aug 2023 05:29:45 -0300 Subject: [PATCH] Adds CMake option for SUPPORT_CUSTOM_FRAME_CONTROL (#3221) --- CMakeOptions.txt | 1 + cmake/CompileDefinitions.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeOptions.txt b/CMakeOptions.txt index c643427c..cc57a851 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -46,6 +46,7 @@ cmake_dependent_option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing syn cmake_dependent_option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF CUSTOMIZE_BUILD OFF) cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution can improve the accuracy of time-out intervals in wait functions" OFF CUSTOMIZE_BUILD OFF) cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON) +cmake_dependent_option(SUPPORT_CUSTOM_FRAME_CONTROL "Enabling this flag allows manual control of the frame processes, use at your own risk" OFF CUSTOMIZE_BUILD OFF) # rshapes.c cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON) diff --git a/cmake/CompileDefinitions.cmake b/cmake/CompileDefinitions.cmake index 74922245..689f98ac 100644 --- a/cmake/CompileDefinitions.cmake +++ b/cmake/CompileDefinitions.cmake @@ -28,6 +28,7 @@ if (${CUSTOMIZE_BUILD}) define_if("raylib" SUPPORT_EVENTS_WAITING) define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER) define_if("raylib" SUPPORT_COMPRESSION_API) + define_if("raylib" SUPPORT_CUSTOM_FRAME_CONTROL) define_if("raylib" SUPPORT_QUADS_DRAW_MODE) define_if("raylib" SUPPORT_IMAGE_EXPORT) define_if("raylib" SUPPORT_IMAGE_GENERATION) @@ -69,17 +70,17 @@ if (${CUSTOMIZE_BUILD}) else () target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512") endif () - + target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4") target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8") target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32") target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10") target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16") - + target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"") target_compile_definitions("raylib" PUBLIC "MAX_CHAR_PRESSED_QUEUE=16") target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64") - + if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11") target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192") elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")