SDL port for the Nintendo 3DS Homebrew toolchain contributed by:
To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run:
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release cmake --build build cmake --install build
#include <SDL3/SDL_main.h>in the source file that contains your main function.
osSetSpeedupEnable(false)in your main function.
SDL_GetBasePathreturns the romfs root instead of the executable's directory.
SDL_Delayfunctions, or blocking waits (
SDL_WaitThread). To avoid starving other threads,
SDL_WaitSemaphoreTimeoutwill yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information.