From c5e4535f9ac06c25bd37529b351fbbf927e82683 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 30 Nov 2017 19:18:45 +0100 Subject: Added PYRA and CHIP support --- CMakeLists.txt | 11 ++++++++++- src/main.c | 8 +++++++- src/sdl/input.c | 13 +++++++++++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ef299f..8c2a26c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,18 @@ cmake_minimum_required(VERSION 2.8) option(PANDORA "Set to ON if targeting an OpenPandora device" ${PANDORA}) +option(PYRA "Set to ON if targeting an DragonBox Pyra device" ${PANDORA}) +option(CHIP "Set to ON if targeting an PocketCHIP device" ${PANDORA}) + if(PANDORA) - add_definitions(-DPANDORA -DARM -DNEON) + add_definitions(-DPANDORA) +endif() +if(PYRA) + add_definitions(-DPYRA) +endif() +if(CHIP) + add_definitions(-DCHIP) endif() #create a _SDL2 later? diff --git a/src/main.c b/src/main.c index 475ba5c..cd09738 100644 --- a/src/main.c +++ b/src/main.c @@ -39,12 +39,18 @@ int main(int argc, char **argv) osSetSpeedupEnable(false); #endif #ifdef _SDL - #ifdef PANDORA + #if defined(PANDORA) || defined(PYRA) || defined(CHIP) wantFullscreen = 1; #else wantFullscreen = 0; #endif + #ifdef CHIP + screenScale = 1; + #elif defined(PYRA) + screenScale = 3; + #else screenScale = 2; + #endif useJoystick = 1; // get command line arguments for (int i=1; i