mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 21:23:29 +02:00
naett has had a complete libcurl backend all along; we just never built it, so Linux ran with HTTPS_NOT_AVAILABLE. That means no homebrew store over HTTPS, and RetroAchievements talking to plain http://retroachievements.org. libcurl is loaded with dlopen rather than linked, the same way we handle the Vulkan loader, so it stays a soft dependency: we need the curl headers at build time, but a build made here still starts on a machine without libcurl installed - it just reports HTTPS as unavailable, exactly like today. Distro packagers get the behavior they'd expect either way, and certificate validation comes free from the system CA store. New net::HTTPSAvailable() answers "did that work", and SDLMain folds it into SYSPROP_SUPPORTS_HTTPS, which everything downstream already degrades on. Four fixes to the backend itself, all noted in ext/naett/README-ppsspp.md: - panic() called exit(1) on a pipe or curl_multi_perform failure. Taking the emulator down because a download failed isn't acceptable - the backend now disables itself and requests complete with naettGenericError. - CURLINFO_RESPONSE_CODE writes a long into res->code, which is an int. Eight bytes into four, getting away with it only because the next field absorbs the zeroes. - curl_easy_setopt is varargs and wants a long for these options; int literals and int variables are UB on LP64. - naettPlatformCloseResponse called through a null function pointer when libcurl was missing. Found by testing that path, which segfaulted. CI needs libcurl4-openssl-dev (curl-dev on Alpine) or it would quietly keep building without HTTPS.
Build instructions ================== See https://github.com/hrydgard/ppsspp/wiki/Build-instructions . Also, for general information, see https://www.ppsspp.org/docs . SDL2 Game Controller Support Notes ================================== For SDL2 game controller support, at least SDL 2.0.4 is required. Under the assets directory is the SDL2 game controller database: gamecontrollerdb.txt. This file contains many known control pad mappings for Windows, Linux and MAC OS. PPSSPPSDL will load this file at start-up and work out how to assign control pad buttons for your control pad. Hot plugging of control pads is also supported. If you control pad has a "Guide" or "Home" button then when pressed, this will trigger the emulator pause menu, thus allowing you to exit the emulator if you wish or load another game from your library. WSL notes ========= Works fine on WSL2 with OpenGL, at least. For more notes, see https://www.ppsspp.org/docs/development/wsl/ . Running with valgrind ===================== Here's an example where we both use suppressions, and generate new ones (that you can then take from suppressions.log and simplify and copy to valgrind-wsl2.supp): > valgrind --suppressions=SDL/valgrind-wsl2.supp --gen-suppressions=all --log-file=suppressions.log build/PPSSPPSDL Running with ASAN ================= ./b.sh --sanitize build/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL Running with UBSAN ================== ./b.sh --sanitize --sanitizeub UBSAN_OPTIONS=print_stacktrack=true build/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL