Drop the perf suite's lowfpsfunc workaround, and record item 31
akgl_game_update_fps installs the default itself now, so the benchmark no longer has to. Leaving the hook NULL there is what keeps that true. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -793,14 +793,13 @@ int main(void)
|
||||
akgl_game.statelock = SDL_CreateMutex();
|
||||
FAIL_ZERO_BREAK(errctx, akgl_game.statelock, AKGL_ERR_SDL, "%s", SDL_GetError());
|
||||
|
||||
// And this one is not optional either. akgl_game_update_fps calls
|
||||
// game.lowfpsfunc through the pointer, unguarded, on every frame under
|
||||
// 30 fps -- which includes the first frame, before there is a frame rate
|
||||
// to compare. A host that brings the library up the way renderer.h
|
||||
// documents for an embedder, akgl_render_2d_bind over its own window,
|
||||
// segfaults on its first akgl_game_update. Filed in TODO.md; installing
|
||||
// the default by hand is the workaround.
|
||||
akgl_game.lowfpsfunc = &akgl_game_lowfps;
|
||||
// akgl_game.lowfpsfunc is deliberately left NULL. It used to have to be
|
||||
// installed by hand here, because akgl_game_update_fps called it
|
||||
// unguarded on every frame under 30 fps -- which includes the first,
|
||||
// before there is a frame rate to compare against -- and a host that
|
||||
// binds its own renderer the way renderer.h documents never went through
|
||||
// akgl_game_init to get one. It installs the default itself now, and
|
||||
// leaving it NULL here is what keeps that true.
|
||||
|
||||
benchfont = TTF_OpenFont(BENCH_FONT_PATH, BENCH_FONT_SIZE);
|
||||
FAIL_ZERO_BREAK(errctx, benchfont, AKGL_ERR_SDL, "Couldn't open %s: %s", BENCH_FONT_PATH, SDL_GetError());
|
||||
|
||||
Reference in New Issue
Block a user