From 3bde84f6c8480217b2fcd7ec29c28f62672a3279 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Mon, 12 Jul 2021 01:26:11 +0200 Subject: Move assets to dedicated folder and redefine GLFW mappings for Switch --- README.md | 2 +- logo.png | Bin 24295 -> 0 bytes logo.svg | 88 ----------------------------------------------- logo_switch.jpg | Bin 18096 -> 0 bytes res/images/logo.svg | 88 +++++++++++++++++++++++++++++++++++++++++++++++ res/images/logo_1024.png | Bin 0 -> 24295 bytes res/images/logo_256.jpg | Bin 0 -> 18096 bytes src/CMakeLists.txt | 2 +- src/skel/crossplatform.h | 25 ++++++++++++++ 9 files changed, 115 insertions(+), 90 deletions(-) delete mode 100644 logo.png delete mode 100644 logo.svg delete mode 100644 logo_switch.jpg create mode 100644 res/images/logo.svg create mode 100644 res/images/logo_1024.png create mode 100644 res/images/logo_256.jpg diff --git a/README.md b/README.md index 9ccabf1e..bcbecaba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -re3 logo +re3 logo [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGTAmodding%2Fre3%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master) diff --git a/logo.png b/logo.png deleted file mode 100644 index 50ae8690..00000000 Binary files a/logo.png and /dev/null differ diff --git a/logo.svg b/logo.svg deleted file mode 100644 index 9db8447c..00000000 --- a/logo.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/logo_switch.jpg b/logo_switch.jpg deleted file mode 100644 index 595d2c3b..00000000 Binary files a/logo_switch.jpg and /dev/null differ diff --git a/res/images/logo.svg b/res/images/logo.svg new file mode 100644 index 00000000..9db8447c --- /dev/null +++ b/res/images/logo.svg @@ -0,0 +1,88 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/res/images/logo_1024.png b/res/images/logo_1024.png new file mode 100644 index 00000000..50ae8690 Binary files /dev/null and b/res/images/logo_1024.png differ diff --git a/res/images/logo_256.jpg b/res/images/logo_256.jpg new file mode 100644 index 00000000..595d2c3b Binary files /dev/null and b/res/images/logo_256.jpg differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1cf10d0f..425f2315 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -171,7 +171,7 @@ if(NINTENDO_SWITCH) nx_create_nro(${EXECUTABLE} NACP ${EXECUTABLE}.nacp - ICON "${PROJECT_SOURCE_DIR}/logo_switch.jpg" + ICON "${PROJECT_SOURCE_DIR}/res/images/logo_256.jpg" ) if(${PROJECT}_INSTALL) diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index aa90ce5a..67bb4282 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -157,3 +157,28 @@ bool FindNextFile(HANDLE, WIN32_FIND_DATA*); void FileTimeToSystemTime(time_t*, SYSTEMTIME*); void GetDateFormat(int, int, SYSTEMTIME*, int, char*, int); #endif + +#ifdef __SWITCH__ + +// tweak glfw values for switch to match expected pc bindings +#ifdef GLFW_GAMEPAD_BUTTON_A + #undef GLFW_GAMEPAD_BUTTON_A +#endif +#define GLFW_GAMEPAD_BUTTON_A 1 + +#ifdef GLFW_GAMEPAD_BUTTON_B + #undef GLFW_GAMEPAD_BUTTON_B +#endif +#define GLFW_GAMEPAD_BUTTON_B 0 + +#ifdef GLFW_GAMEPAD_BUTTON_X + #undef GLFW_GAMEPAD_BUTTON_X +#endif +#define GLFW_GAMEPAD_BUTTON_X 3 + +#ifdef GLFW_GAMEPAD_BUTTON_Y + #undef GLFW_GAMEPAD_BUTTON_Y +#endif +#define GLFW_GAMEPAD_BUTTON_Y 2 + +#endif -- cgit v1.2.3