diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-26 07:34:54 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-26 07:34:54 +0100 |
| commit | f7a34b7401695a4a9137889eb4eb322694f8c5c9 (patch) | |
| tree | 19e165da848a412641312b2d8e6fd4d49266732b /src/platform/headless_platform.cc | |
| parent | af70b169c3d65c053ed80dd85e85304dfa78dc35 (diff) | |
fix(src/platform): code review cleanup
- platform.h: deduplicate str_view/label_view/platform_wgpu_wait_any
(were identical in WIN32 and default branches); remove dead
platform_wgpu_set_error_callback and its never-used callback typedefs
- platform.cc: remove glfwSetWindowUserPointer(nullptr) + stale comment
block; drop if-guard on user pointer fixup in platform_poll; remove
redundant aspect_ratio recompute (framebuffer_size_callback owns it)
- headless_platform.cc: write g_virtual_time back to state->time in
platform_poll; remove never-set g_should_close variable
- stub_types.h: remove dead platform_wgpu_set_error_callback and
callback typedefs; add comment on non-empty WGPURenderPassColorAttachment
handoff(Gemini): platform layer cleaned up, no behaviour change
Diffstat (limited to 'src/platform/headless_platform.cc')
| -rw-r--r-- | src/platform/headless_platform.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/platform/headless_platform.cc b/src/platform/headless_platform.cc index 4ec8c5d..32e16fe 100644 --- a/src/platform/headless_platform.cc +++ b/src/platform/headless_platform.cc @@ -8,13 +8,11 @@ #include <stdio.h> static double g_virtual_time = 0.0; -static bool g_should_close = false; static const double FRAME_TIME = 1.0 / 60.0; PlatformState platform_init(bool fullscreen, int width, int height) { (void)fullscreen; g_virtual_time = 0.0; - g_should_close = false; printf("[headless] Platform initialized (simulated %dx%d)\n", width, height); PlatformState state = {}; @@ -33,13 +31,13 @@ void platform_shutdown(PlatformState* state) { } void platform_poll(PlatformState* state) { - (void)state; g_virtual_time += FRAME_TIME; + state->time = g_virtual_time; } bool platform_should_close(PlatformState* state) { (void)state; - return g_should_close; + return false; } void platform_toggle_fullscreen(PlatformState* state) { |
