diff --git a/Makefile b/Makefile index 9b379a3..ca4b8ca 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,6 @@ UNAMEOS = $(shell uname) COMMON_CFLAGS= -Wall -Wextra -ggdb -std=c99 -pedantic -Ithirdparty -Ibuild -DPENGER -SDL2_CFLAGS= `pkg-config --cflags sdl2` $(COMMON_CFLAGS) -RGFW_CFLAGS= $(COMMON_CFLAGS) COMMON_LIBS= -lm SDL2_LIBS= `pkg-config --libs sdl2` $(COMMON_LIBS) ifeq ($(UNAMEOS),Darwin) @@ -17,10 +15,10 @@ INSTALL?= install all: Makefile sowon sowon_rgfw man sowon_rgfw: src/main_rgfw.c build/digits.h build/penger_walk_sheet.h - $(CC) $(RGFW_CFLAGS) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS) + $(CC) $(COMMON_CFLAGS) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS) sowon: src/main.c build/digits.h build/penger_walk_sheet.h - $(CC) $(SDL2_CFLAGS) -o sowon src/main.c $(SDL2_LIBS) + $(CC) $(COMMON_CFLAGS) -o sowon src/main.c $(SDL2_LIBS) build/digits.h: build/png2c ./assets/digits.png ./build/png2c ./assets/digits.png digits > build/digits.h diff --git a/README.md b/README.md index 609e690..803d762 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,17 @@ Dependencies: [SDL2](https://www.libsdl.org/download-2.0.php) +### Fedora 42+ +Starting with Fedora 42, the native SDL2 library is no longer available. +It was replaced by the SDL3 library. For programs that still require SDL2, +an [`sdl2-compat`](https://github.com/libsdl-org/sdl2-compat) library, +which provids a compatibility layer over SDL3, was introduced. +```console +$ sudo dnf install sdl2-compat-devel libXi-devel libXrandr-devel +$ make +$ ./sowon +``` + ### Debian ```console $ sudo apt-get install libsdl2-dev @@ -57,7 +68,7 @@ $ ./sowon | Key | Description | | --- | --- | | SPACE | Toggle pause | -| = | Zoom in | +| = or + | Zoom in | | - | Zoom out | | 0 | Zoom 100% | | F5 | Restart | diff --git a/src/main.c b/src/main.c index 3692a9d..204be9b 100644 --- a/src/main.c +++ b/src/main.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include "common.c" @@ -115,7 +115,7 @@ void render_penger_at(SDL_Renderer *renderer, SDL_Texture *penger, float time, i } #endif -int main(int argc, char **argv) +int main(int argc, char *argv[]) { State state = {0}; parse_state_from_args(&state, argc, argv);