Make the Linux viewer draw frames, read input and wait between them - #885
Merged
Merged
Conversation
raylib 6.0's CMake reads every SUPPORT_ flag in config.h into an option that defaults to ON, including the ones config.h sets to 0, and CUSTOMIZE_BUILD skips config.h's own values. So SUPPORT_CUSTOM_FRAME_CONTROL was on, and EndDrawing never swapped a frame onto the screen, never polled input and never waited for the next frame: the Linux window stayed blank and ignored every key and click while the loop spun. SUPPORT_BUSY_WAIT_LOOP was on the same way, and would have spun through the whole of every frame's wait once there was one. Switch both off, with every other flag config.h defaults to 0, and turn off SUPPORT_SCREEN_CAPTURE, whose F12 handler becomes reachable once input is read. PixelTests.PresentWaitsForTheNextFrame times sixty presents against the renderer the Ubuntu job builds. The pixel snapshots could never have noticed: a capture draws into a texture and never reaches EndDrawing.
Every item that was unverified, checked on c37bf9e: all of them hold, and none was fixed by #878, #881 or #884. Each now says whether it was reproduced, verified by reading, or needs a platform this machine lacks, with the current lines, the repro test names, and where the suggested fix turned out wrong or incomplete. An attached "Accept all in <solution>" deleting verified files whose snapshots were not written moves to Data loss. The repro tests are on a local branch, review-repros, rather than here: each fails until its item is fixed.
Co-authored-by: SimonCropp <122666+SimonCropp@users.noreply.github.com>
This was referenced Sep 23, 2026
Merged
Merged
Merged
Merged
Merged
This was referenced Sep 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
The Linux viewer has never shown a frame or read input.
native/CMakeLists.txtbuilds raylib withCUSTOMIZE_BUILD ON. raylib 6.0'scmake/ParseConfigHeader.cmaketurns every#define SUPPORT_X <value>inconfig.hinto an option that defaults to ON, including the onesconfig.hdefines as 0. That was fixed upstream in raysan5/raylib#5844, after the 6.0 tag.CUSTOMIZE_BUILDalso skipsconfig.h's own values. So the Linux configure output listsSUPPORT_CUSTOM_FRAME_CONTROL=ONandSUPPORT_BUSY_WAIT_LOOP=ON, along with every image format raylib has.With custom frame control on, raylib's
EndDrawingskipsSwapScreenBuffer, theSetTargetFPSwait andPollInputEvents.deview_presentcalls none of them itself. So on a real desktop:Evidence:
.sofiles:SwapScreenBufferandPollInputEventshave no call sites..soin WSL through Python ctypes, with a hidden window. A baredeview_presentloop ran at 41,659 fps.CI never noticed because the pixel snapshots go through
deview_capture. That draws into a render texture and never callsEndDrawing.This is also why #884's
SUPPORT_PARTIALBUSY_WAIT_LOOP OFFproduced byte-identical binaries.SUPPORT_BUSY_WAIT_LOOPwas on through the same misparse, and it takes precedence.The fix
SUPPORT_CUSTOM_FRAME_CONTROLandSUPPORT_BUSY_WAIT_LOOPoff, along with every other flag raylib 6.0'sconfig.hdefaults to 0:SUPPORT_SCREEN_CAPTUREoff. Its F12 handler inEndDrawingwritesscreenshotNNN.pnginto the working directory, and it becomes reachable as soon as input is polled.PixelTests.PresentWaitsForTheNextFrame. It times 60 presents on the shared hidden window and expects them to take at least 750 ms.todo.md:libGL.so.1.Checked
The configure output of this branch's
build-nativerun no longer turns on custom frame control, the busy wait loop, screen capture, or any of the formatsconfig.hdefaults off.PresentWaitsForTheNextFrameran in the Ubuntu pixel step and passed: 359 passed and 1 unrelated skip out of 360.The rebuilt linux-x64
.sofrom Rebuild native renderer binaries #886, driven the same way in WSL:nanosleepmainBoth need at most GLIBC_2.27 and link
libGL.so.1.Also in this PR
A second commit, "Record what checking the review's unverified items found", updates
todo.mdonly. It covers every item the review had left unverified, checked on c37bf9e:The repro tests fail by design, so they aren't here.
Before merging
Merge #886, which carries the rebuilt
.sofiles, into this branch first. Until it's in, thenativejob keeps loading the old binaries and still passes, because it only checks the ABI version.