From 9de5225d21f85a42749d98b01ab1cf8b8e6bef5a Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Sat, 19 Mar 2022 16:16:42 +0000 Subject: [PATCH 1/2] pico: Disable tilt example It doesn't do anything interesting without accel, also doesn't build with a 320x240 framebuffer --- examples/tilt/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/tilt/CMakeLists.txt b/examples/tilt/CMakeLists.txt index 234677799..22268f5ec 100644 --- a/examples/tilt/CMakeLists.txt +++ b/examples/tilt/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.9) project (tilt) find_package (32BLIT CONFIG REQUIRED PATHS ../..) + +if(32BLIT_PICO) + # No accelerometer + return() +endif() + blit_executable (tilt tilt.cpp) blit_metadata (tilt metadata.yml) From 4d2757b6e28afe1f1352f9885185aaf6d4a7bb77 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Sat, 2 Oct 2021 22:41:12 +0100 Subject: [PATCH 2/2] Set ALLOW_HIRES=0 for platformer example This allows it to build for pico with a 320x240 display and also makes it so there's an example of using this define --- examples/platformer/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/platformer/CMakeLists.txt b/examples/platformer/CMakeLists.txt index 8167dec7e..c320dba7f 100644 --- a/examples/platformer/CMakeLists.txt +++ b/examples/platformer/CMakeLists.txt @@ -3,4 +3,8 @@ project (platformer) find_package (32BLIT CONFIG REQUIRED PATHS ../..) blit_executable (platformer platformer.cpp) blit_assets_yaml (platformer assets.yml) -blit_metadata (platformer metadata.yml) \ No newline at end of file +blit_metadata (platformer metadata.yml) + +# This removes support for set_screen_mode(hires) for Pico-based devices +# freeing up some extra RAM +target_compile_definitions(platformer PRIVATE ALLOW_HIRES=0)