From 28f266302fbeea2d75d5a62de651d464ab380798 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Sun, 4 Jul 2021 18:52:48 +0200 Subject: Add Nintendo Switch initial support --- src/core/common.h | 4 ++++ src/core/config.h | 9 +++++++-- src/core/re3.cpp | 2 -- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/common.h b/src/core/common.h index da162762..99aafc5a 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -11,6 +11,10 @@ #define __STDC_LIMIT_MACROS // so we get UINT32_MAX etc #endif +#ifdef GTA_SWITCH +#include +#endif + #include #include #include diff --git a/src/core/config.h b/src/core/config.h index 885f98b8..edb5fb5a 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -319,7 +319,7 @@ enum Config { #if !defined(RW_GL3) && defined(_WIN32) #define XINPUT #endif -#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined __SWITCH__) +#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined GTA_SWITCH) #define DETECT_JOYSTICK_MENU // Then we'll expect user to enter Controller->Detect joysticks if his joystick isn't detected at the start. #endif #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m @@ -439,7 +439,7 @@ enum Config { #endif // Streaming -#if !defined(_WIN32) && !defined(__SWITCH__) +#if !defined(_WIN32) && !defined(GTA_SWITCH) //#define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash - also not utilized too much right now(see commented LoadAllRequestedModels in Streaming.cpp) #define FLUSHABLE_STREAMING // Make it possible to interrupt reading when processing file isn't needed anymore. #endif @@ -461,4 +461,9 @@ enum Config { #undef PEDS_REPORT_CRIMES_ON_PHONE #endif +#ifdef GTA_SWITCH + #define IGNORE_MOUSE_KEYBOARD // ignore mouse & keyboard input + #define USE_UNNAMED_SEM // named semaphores are unsupported on the switch +#endif + #endif // VANILLA_DEFINES diff --git a/src/core/re3.cpp b/src/core/re3.cpp index b7d89363..40be153a 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -45,9 +45,7 @@ #include "Population.h" #include "IniFile.h" -#ifdef DETECT_JOYSTICK_MENU #include "crossplatform.h" -#endif #ifndef _WIN32 #include "assert.h" -- cgit v1.2.3