Emulator: migrate SDL2 -> SDL3
Port the shared emulator harness (all apps) to SDL 3.4 + SDL3_ttf 3.2:
- window creation without position args; renderer logical size via
SDL_SetRenderLogicalPresentation(LETTERBOX); SDL_RenderTexture;
SDL_SaveBMP_IO frame dumps
- SDL_EVENT_* event scheme, flattened SDL_KeyboardEvent, float mouse
coords; clicks mapped with SDL_ConvertEventToRenderCoordinates, keeping
the Xwayland global-state cross-check from 260a2b3
- audio shim on the stream API (SDL_OpenAudioDeviceStream +
SDL_PutAudioStreamData) since SDL_QueueAudio is gone
- TTF_RenderText_Blended (explicit length); SDL3_ttf header layout
handled via __has_include (Ubuntu installs under SDL3_ttf/)
- e2e freeze-tint pixel assertions updated to the committed
diagonal-stripe pattern (stale since the freeze rework; pre-existing
failures at HEAD under SDL2), sampled away from the freeze text
Full suite green: 14 unit + 7 integration + 3 E2E journeys, 0 failures.
MissileCommand, MiataDrive, NetDeck build; CrtTerminal (missing sndBlip
declaration) and Lotus3 (sketch not in repo) fail identically at HEAD -
pre-existing, out of scope.
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
# SDL2 emulator for T-Deck example sketches (run the app on your PC)
|
||||
# SDL3 emulator for T-Deck example sketches (run the app on your PC)
|
||||
#
|
||||
# make build the MissileCommand emulator (default)
|
||||
# make APP=CrtTerminal build the CRT terminal emulator
|
||||
@@ -38,9 +38,9 @@ APP_TITLE ?= $(APP)
|
||||
|
||||
CXX ?= g++
|
||||
CXXFLAGS ?= -std=gnu++17 -O2 -Wall -Wextra
|
||||
SDLFLAGS := -I/usr/include/SDL2
|
||||
SDLFLAGS := $(shell pkg-config --cflags sdl3 sdl3-ttf)
|
||||
INC := -Isrc/shim -I$(APP_DIR) $(if $(APP_EXTRA_INC),-I$(APP_EXTRA_INC))
|
||||
LIBS := -lSDL2 -lSDL2_ttf
|
||||
LIBS := $(shell pkg-config --libs sdl3 sdl3-ttf)
|
||||
|
||||
DEFS += -DAPP_INO='"$(APP).ino"' -DAPP_NAME='"$(APP_TITLE)"'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user