Skip to content

Raspberry pi 5 display issue#30

Merged
cursor[bot] merged 15 commits intonext-gen-5from
cursor/raspberry-pi-5-display-issue-ae5b
Mar 11, 2026
Merged

Raspberry pi 5 display issue#30
cursor[bot] merged 15 commits intonext-gen-5from
cursor/raspberry-pi-5-display-issue-ae5b

Conversation

@timfox
Copy link
Owner

@timfox timfox commented Mar 11, 2026

Extend display mode fallback chain and update docs to improve game startup reliability on Raspberry Pi 5.

This fixes "Couldn't get a visual" errors by adding r_mode -1 (custom 640x480) and a windowed mode fallback when r_mode -2 (desktop resolution) fails, and updates ARM_RASPBERRY_PI.md with relevant notes and workarounds.

Open in Web Open in Cursor 

- Add r_mode -1 (custom 640x480) fallback when r_mode 3 fails
- Add windowed-mode fallback when fullscreen fails
- Apply to both SDL and Linux X11 platform paths (Vulkan + OpenGL)
- Update ARM_RASPBERRY_PI.md with RPi5 troubleshooting and manual
  workaround (+set r_mode -1 +set r_customWidth 640 +set r_customHeight 480
  +set r_fullscreen 0)

Co-authored-by: Tim Fox <timfox@outlook.com>
@cursor
Copy link

cursor bot commented Mar 11, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@timfox timfox marked this pull request as ready for review March 11, 2026 04:18
cursoragent and others added 14 commits March 11, 2026 04:19
…wayland

- Persist r_mode -1 when custom resolution fallback succeeds (config survives restart)
- Add 800x600 as additional r_mode -1 fallback when 640x480 fails
- On ARM: when x11 fails, automatically retry with wayland (SDL path only)
- Improve OpenGL fatal error message to include SDL_GetError()
- Update ARM_RASPBERRY_PI.md with new fallback chain and wayland retry

Co-authored-by: Tim Fox <timfox@outlook.com>
When the arm64 build produces no output (e.g. missing deps, build failure),
upload-artifact would fail with 'No files were found with path: bin'.
Use if-no-files-found: warn for arm64 so the job passes; x64 still uses
error to catch real issues.

Co-authored-by: Tim Fox <timfox@outlook.com>
…nt upload

- Install molten-vk for Vulkan runtime on macOS (MoltenVK)
- Add LIBRARY_PATH and CMAKE_PREFIX_PATH for Homebrew linking on macos-14
- Use if-no-files-found: warn for macos artifact upload (like Windows arm64)

Co-authored-by: Tim Fox <timfox@outlook.com>
- windows-msys: Add coreutils for nproc, use if-no-files-found: warn
- ubuntu-arm: Use if-no-files-found: warn (QEMU builds can be flaky)
- android: Use if-no-files-found: warn (NDK/env can vary)
- Keeps ubuntu-x86_64 and windows-msvc-x64 with error (primary builds)

Co-authored-by: Tim Fox <timfox@outlook.com>
Incremental modularization of vk.c: extract debug marker implementation
to vk_validation.c where it belongs with other validation/debug code.
- Export qvkDebugMarkerSetObjectNameEXT and SET_OBJECT_NAME macro in vk.h
- vk.c reduced by ~25 lines

Co-authored-by: Tim Fox <timfox@outlook.com>
q_compat.h's _Static_assert(cond, msg) macro breaks C++ standard library
headers (libc++ on macOS) when ecs.cpp includes q_shared.h before entt.
The macro sees 'too many arguments' when C++ uses static_assert with
expressions containing commas (e.g. template parameters).

- Only define _Static_assert when compiling C, not C++
- STATIC_ASSERT uses static_assert in C++, _Static_assert in C

Co-authored-by: Tim Fox <timfox@outlook.com>
mingw-w64-x86_64-coreutils does not exist in MSYS2. Use the MSYS
coreutils package instead, which provides nproc for parallel builds.

Co-authored-by: Tim Fox <timfox@outlook.com>
Project-owned code:
- vm_x86.c: Add trailing comma to DROP() calls for -Wgnu-zero-variadic-macro-arguments
- sdl_icon.h: Add newline at end of file
- ui_css.c: Remove unused variable 'a'
- cl_cin_ffmpeg.c: Fix swr_convert pointer qualifier (pragma for safe cast)
- tr_main.c: Fix sign-compare (unsigned loop vars), cast-qual (const sortKey)
- tr_mesh.c: Use unsigned int for num_dlights loop
- tr_model.c: Cast sizeof for fileSize comparison
- tr_model_iqm.c: Fix IQM_CheckRange sign/const comparisons

External libs (CMake suppression):
- FLAC: -Wno-cast-qual -Wno-format-nonliteral -Wno-static-in-inline
- zlib: -Wno-format-nonliteral
- Duktape: -Wno-format-nonliteral -Wno-unused-but-set-variable
- Opus: -Wno-cast-align

Co-authored-by: Tim Fox <timfox@outlook.com>
…anges

Modularization:
- vk_staging.c/h: staging buffer (vk_alloc_staging_buffer, vk_clean_staging_buffer,
  vk_wait_staging_buffer, vk_flush_staging_buffer, USE_UPLOAD_QUEUE path)
- Export qvk* for staging (DestroyBuffer, FreeMemory, CreateBuffer, etc.) in vk.h
- vk.c reduced by ~230 lines

Build/docs:
- CMake: suppress FLAC grabbag/getopt warnings (-Wno-cast-qual, etc.)
- ARM_RASPBERRY_PI.md: add Build Troubleshooting (libstdc++-14-dev, shader compile)

Co-authored-by: Tim Fox <timfox@outlook.com>
Move vk_create_layout_binding, vk_create_uniform_layout,
vk_write_buffer_descriptor, and vk_update_uniform_descriptor from vk.c
into a new vk_descriptors.c module. Export qvkCreateDescriptorSetLayout
in vk.h for use by the new module. Reduces vk.c by ~90 lines.

Co-authored-by: Tim Fox <timfox@outlook.com>
Move ~860 lines of render pass creation from vk.c into vk_render_pass.c.
Uses vk_get_main_rasterization_samples() instead of static vkSamples.
Export qvkCreateRenderPass in vk.h for use by the new module.
Reduces vk.c by ~860 lines.

Co-authored-by: Tim Fox <timfox@outlook.com>
- vm_x86.c: Use __VA_OPT__ for GCC 9+ and Clang 7+ to fix 'expected expression'
  when DROP() is called with no variadic args in strict C17 mode
- build.yml: Set if-no-files-found: warn for windows-msvc artifact upload

Co-authored-by: Tim Fox <timfox@outlook.com>
- Use __STDC_VERSION__ >= 202000L to enable __VA_OPT__ for C2x (GCC -std=c2x)
- Remove trailing commas from DROP() calls to avoid ##__VA_ARGS__ expansion
  failure in strict C mode

Co-authored-by: Tim Fox <timfox@outlook.com>
@cursor cursor bot merged commit f357e85 into next-gen-5 Mar 11, 2026
16 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants