The source project of this merge request has been removed.
Fix #353 -- PNG metadata now contains map IDs in screenshots
a small change, hope it's helpful
Problem: Screenshot PNG metadata was showing "Unknown" for the map ID field instead of the actual internal map name.
Solution:
- Increased maptext buffer size from 8 to
MAXMAPLUMPNAME
characters - Re-enabled the
G_BuildMapName(gamemap)
call with proper null checking (i'm curious, why was this commented out?) - Used
sizeof()
withsnprintf()
for safe bounds checking
Testing: Verified by taking a screenshot and checking PNG metadata shows correct map ID.
$ identify -format "%[*]" ~/ringracers/media/screenshots/ringracers0134.png
Build Date=Jun 14 2025
Build Time=01:57:50
date:create=2025-06-14T05:59:30+00:00
date:modify=2025-06-14T05:59:30+00:00
date:timestamp=2025-06-14T06:06:56+00:00
Description=Ring Racers Screenshot
Interface=SDL
Location=X:-128 Y:-128 Z:0 A:90
Mapname=Test Run Zone
Mapnum=RR_TESTRUN
Playername=Kimmmy
png:IHDR.bit-depth-orig=8
png:IHDR.bit_depth=8
png:IHDR.color-type-orig=2
png:IHDR.color_type=2 (Truecolor)
png:IHDR.interlace_method=0 (Not interlaced)
png:IHDR.width,height=1280, 800
png:text=11 tEXt/zTXt/iTXt chunks were found
Render Mode=Software
Revision=
Title=Dr. Robotnik's Ring Racers v2.4