From d3f1c2ad86ab2a28991db8e87b7368777647e154 Mon Sep 17 00:00:00 2001 From: LiquidFenrir Date: Sat, 13 Nov 2021 10:30:23 +0100 Subject: [PATCH] 3.8.0 final changes --- 3ds/include/CheatManagerOverlay.hpp | 2 +- 3ds/include/ErrorOverlay.hpp | 2 +- 3ds/include/InfoOverlay.hpp | 2 +- 3ds/include/InputState.hpp | 2 +- 3ds/include/KeyboardManager.hpp | 2 +- 3ds/include/MainScreen.hpp | 4 ++-- 3ds/include/YesNoOverlay.hpp | 2 +- 3ds/include/archive.hpp | 2 +- 3ds/include/cheatmanager.hpp | 2 +- 3ds/include/clickable.hpp | 2 +- 3ds/include/configuration.hpp | 2 +- 3ds/include/directory.hpp | 2 +- 3ds/include/fsstream.hpp | 2 +- 3ds/include/gui.hpp | 2 +- 3ds/include/hid.hpp | 2 +- 3ds/include/io.hpp | 2 +- 3ds/include/main.hpp | 2 +- 3ds/include/scrollable.hpp | 2 +- 3ds/include/smdh.hpp | 2 +- 3ds/include/spi.hpp | 2 +- 3ds/include/thread.hpp | 2 +- 3ds/include/title.hpp | 2 +- 3ds/include/util.hpp | 2 +- 3ds/source/CheatManagerOverlay.cpp | 2 +- 3ds/source/ErrorOverlay.cpp | 2 +- 3ds/source/InfoOverlay.cpp | 2 +- 3ds/source/MainScreen.cpp | 10 +++++++--- 3ds/source/YesNoOverlay.cpp | 2 +- 3ds/source/archive.cpp | 2 +- 3ds/source/cheatmanager.cpp | 4 ++-- 3ds/source/clickable.cpp | 2 +- 3ds/source/configuration.cpp | 2 +- 3ds/source/directory.cpp | 2 +- 3ds/source/fsstream.cpp | 2 +- 3ds/source/gui.cpp | 2 +- 3ds/source/io.cpp | 2 +- 3ds/source/main.cpp | 2 +- 3ds/source/scrollable.cpp | 2 +- 3ds/source/smdh.cpp | 2 +- 3ds/source/spi.cpp | 2 +- 3ds/source/thread.cpp | 2 +- 3ds/source/title.cpp | 2 +- 3ds/source/util.cpp | 2 +- Makefile | 4 ++-- README.md | 21 ++++++++++----------- common/Overlay.hpp | 4 ++-- common/Screen.cpp | 2 +- common/Screen.hpp | 2 +- common/common.cpp | 2 +- common/common.hpp | 2 +- common/iclickable.hpp | 6 +++--- common/ihid.hpp | 2 +- common/iscrollable.hpp | 4 ++-- common/logger.hpp | 2 +- common/multiselection.cpp | 2 +- common/multiselection.hpp | 4 ++-- switch/include/CheatManagerOverlay.hpp | 2 +- switch/include/ErrorOverlay.hpp | 2 +- switch/include/InfoOverlay.hpp | 2 +- switch/include/InputState.hpp | 2 +- switch/include/KeyboardManager.hpp | 2 +- switch/include/MainScreen.hpp | 2 +- switch/include/YesNoOverlay.hpp | 2 +- switch/include/account.hpp | 2 +- switch/include/cheatmanager.hpp | 2 +- switch/include/clickable.hpp | 2 +- switch/include/colors.hpp | 2 +- switch/include/configuration.hpp | 2 +- switch/include/directory.hpp | 2 +- switch/include/filesystem.hpp | 2 +- switch/include/hid.hpp | 26 ++++++++++++++------------ switch/include/io.hpp | 2 +- switch/include/main.hpp | 6 +++--- switch/include/pksmbridge.hpp | 2 +- switch/include/scrollable.hpp | 2 +- switch/include/title.hpp | 2 +- switch/include/util.hpp | 2 +- switch/source/CheatManagerOverlay.cpp | 2 +- switch/source/ErrorOverlay.cpp | 2 +- switch/source/InfoOverlay.cpp | 2 +- switch/source/KeyboardManager.cpp | 2 +- switch/source/MainScreen.cpp | 5 +++-- switch/source/SDLHelper.cpp | 2 +- switch/source/YesNoOverlay.cpp | 2 +- switch/source/account.cpp | 7 +++---- switch/source/cheatmanager.cpp | 4 ++-- switch/source/clickable.cpp | 8 ++++---- switch/source/colors.cpp | 2 +- switch/source/configuration.cpp | 2 +- switch/source/directory.cpp | 2 +- switch/source/filesystem.cpp | 2 +- switch/source/io.cpp | 2 +- switch/source/main.cpp | 4 ++-- switch/source/pksmbridge.cpp | 2 +- switch/source/scrollable.cpp | 6 +++--- switch/source/title.cpp | 4 ++-- switch/source/util.cpp | 2 +- 97 files changed, 147 insertions(+), 142 deletions(-) diff --git a/3ds/include/CheatManagerOverlay.hpp b/3ds/include/CheatManagerOverlay.hpp index b4811bd..9c5b891 100644 --- a/3ds/include/CheatManagerOverlay.hpp +++ b/3ds/include/CheatManagerOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/ErrorOverlay.hpp b/3ds/include/ErrorOverlay.hpp index b458287..6ca48ec 100644 --- a/3ds/include/ErrorOverlay.hpp +++ b/3ds/include/ErrorOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/InfoOverlay.hpp b/3ds/include/InfoOverlay.hpp index cc436c1..fb7585a 100644 --- a/3ds/include/InfoOverlay.hpp +++ b/3ds/include/InfoOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/InputState.hpp b/3ds/include/InputState.hpp index 0e7a885..6d2f148 100644 --- a/3ds/include/InputState.hpp +++ b/3ds/include/InputState.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/KeyboardManager.hpp b/3ds/include/KeyboardManager.hpp index 2dc402e..812e80c 100644 --- a/3ds/include/KeyboardManager.hpp +++ b/3ds/include/KeyboardManager.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/MainScreen.hpp b/3ds/include/MainScreen.hpp index 1aa5c1d..7256daf 100644 --- a/3ds/include/MainScreen.hpp +++ b/3ds/include/MainScreen.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,7 +66,7 @@ private: C2D_Text ins1, ins2, ins3, ins4, c2dId, c2dMediatype; C2D_Text checkpoint, version; // instructions text - C2D_Text top_move, top_a, top_y, top_my, top_b, bot_ts, bot_x, coins; + C2D_Text top_move, top_a, top_y, top_my, top_b, top_hb, bot_ts, bot_x, coins; C2D_TextBuf dynamicBuf, staticBuf; const float scaleInst = 0.7f; diff --git a/3ds/include/YesNoOverlay.hpp b/3ds/include/YesNoOverlay.hpp index 56709e5..074e4f7 100644 --- a/3ds/include/YesNoOverlay.hpp +++ b/3ds/include/YesNoOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/archive.hpp b/3ds/include/archive.hpp index 89bff2a..0246982 100644 --- a/3ds/include/archive.hpp +++ b/3ds/include/archive.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/cheatmanager.hpp b/3ds/include/cheatmanager.hpp index deb5c2c..cea1f80 100644 --- a/3ds/include/cheatmanager.hpp +++ b/3ds/include/cheatmanager.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/clickable.hpp b/3ds/include/clickable.hpp index 92d4334..657c5d7 100644 --- a/3ds/include/clickable.hpp +++ b/3ds/include/clickable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/configuration.hpp b/3ds/include/configuration.hpp index e94c476..f6da9af 100644 --- a/3ds/include/configuration.hpp +++ b/3ds/include/configuration.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/directory.hpp b/3ds/include/directory.hpp index 1c4dacf..07d4088 100644 --- a/3ds/include/directory.hpp +++ b/3ds/include/directory.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/fsstream.hpp b/3ds/include/fsstream.hpp index 20c9614..e9cbb3f 100644 --- a/3ds/include/fsstream.hpp +++ b/3ds/include/fsstream.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/gui.hpp b/3ds/include/gui.hpp index 6c2db07..e5b7104 100644 --- a/3ds/include/gui.hpp +++ b/3ds/include/gui.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/hid.hpp b/3ds/include/hid.hpp index b11058e..f822f6d 100644 --- a/3ds/include/hid.hpp +++ b/3ds/include/hid.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/io.hpp b/3ds/include/io.hpp index 13c0c6f..bfc8004 100644 --- a/3ds/include/io.hpp +++ b/3ds/include/io.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/main.hpp b/3ds/include/main.hpp index 137e5dc..2b501b2 100644 --- a/3ds/include/main.hpp +++ b/3ds/include/main.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/scrollable.hpp b/3ds/include/scrollable.hpp index fa8b7e1..f611f7f 100644 --- a/3ds/include/scrollable.hpp +++ b/3ds/include/scrollable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/smdh.hpp b/3ds/include/smdh.hpp index b17b3e8..d4cbd72 100644 --- a/3ds/include/smdh.hpp +++ b/3ds/include/smdh.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/spi.hpp b/3ds/include/spi.hpp index b4c40bc..14877a8 100644 --- a/3ds/include/spi.hpp +++ b/3ds/include/spi.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/thread.hpp b/3ds/include/thread.hpp index 1a0479c..9ee835d 100644 --- a/3ds/include/thread.hpp +++ b/3ds/include/thread.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/title.hpp b/3ds/include/title.hpp index fefc143..069afd4 100644 --- a/3ds/include/title.hpp +++ b/3ds/include/title.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/include/util.hpp b/3ds/include/util.hpp index 0782c58..8dc57d2 100644 --- a/3ds/include/util.hpp +++ b/3ds/include/util.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/CheatManagerOverlay.cpp b/3ds/source/CheatManagerOverlay.cpp index ca3e27e..fa04936 100644 --- a/3ds/source/CheatManagerOverlay.cpp +++ b/3ds/source/CheatManagerOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/ErrorOverlay.cpp b/3ds/source/ErrorOverlay.cpp index 45c22f0..0a70aac 100644 --- a/3ds/source/ErrorOverlay.cpp +++ b/3ds/source/ErrorOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/InfoOverlay.cpp b/3ds/source/InfoOverlay.cpp index a0855ff..7e0b172 100644 --- a/3ds/source/InfoOverlay.cpp +++ b/3ds/source/InfoOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/MainScreen.cpp b/3ds/source/MainScreen.cpp index 3f8a47e..0be3de0 100644 --- a/3ds/source/MainScreen.cpp +++ b/3ds/source/MainScreen.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ MainScreen::MainScreen(void) : hid(rowlen * collen, collen) selectionTimer = 0; refreshTimer = 0; - staticBuf = C2D_TextBufNew(256); + staticBuf = C2D_TextBufNew(261); dynamicBuf = C2D_TextBufNew(256); buttonBackup = std::make_unique(204, 102, 110, 35, COLOR_GREY_DARKER, COLOR_WHITE, "Backup \uE004", true); @@ -62,6 +62,7 @@ MainScreen::MainScreen(void) : hid(rowlen * collen, collen) C2D_TextParse(&top_y, staticBuf, "\uE003 to multiselect a title"); C2D_TextParse(&top_my, staticBuf, "\uE003 hold to multiselect all titles"); C2D_TextParse(&top_b, staticBuf, "\uE001 to exit target or deselect all titles"); + C2D_TextParse(&top_hb, staticBuf, "\uE001 hold to refresh titles"); C2D_TextParse(&bot_ts, staticBuf, "\uE01D \uE006 to move\nbetween backups"); C2D_TextParse(&bot_x, staticBuf, "\uE002 to delete backups"); C2D_TextParse(&coins, staticBuf, "\uE075"); @@ -80,6 +81,7 @@ MainScreen::MainScreen(void) : hid(rowlen * collen, collen) C2D_TextOptimize(&top_y); C2D_TextOptimize(&top_my); C2D_TextOptimize(&top_b); + C2D_TextOptimize(&top_hb); C2D_TextOptimize(&bot_ts); C2D_TextOptimize(&bot_x); C2D_TextOptimize(&coins); @@ -147,7 +149,7 @@ void MainScreen::drawTop(void) const if (hidKeysHeld() & KEY_SELECT) { const u32 inst_lh = scaleInst * fontGetInfo(NULL)->lineFeed; - const u32 inst_h = ceilf((240 - scaleInst * inst_lh * 6) / 2); + const u32 inst_h = ceilf((240 - scaleInst * inst_lh * 6) / 2.0); C2D_DrawRectSolid(0, 0, 0.5f, 400, 240, COLOR_OVERLAY); C2D_DrawText(&top_move, C2D_WithColor, ceilf((400 - StringUtils::textWidth(top_move, scaleInst)) / 2), inst_h, 0.9f, scaleInst, scaleInst, COLOR_WHITE); @@ -159,6 +161,8 @@ void MainScreen::drawTop(void) const scaleInst, COLOR_WHITE); C2D_DrawText(&top_my, C2D_WithColor, ceilf((400 - StringUtils::textWidth(top_my, scaleInst)) / 2), inst_h + inst_lh * 4, 0.9f, scaleInst, scaleInst, COLOR_WHITE); + C2D_DrawText(&top_hb, C2D_WithColor, ceilf((400 - StringUtils::textWidth(top_hb, scaleInst)) / 2), inst_h + inst_lh * 5, 0.9f, scaleInst, + scaleInst, COLOR_WHITE); } C2D_DrawText(&version, C2D_WithColor, 400 - 4 - ceilf(0.45f * version.width), 3.0f, 0.5f, 0.45f, 0.45f, COLOR_GREY_LIGHT); diff --git a/3ds/source/YesNoOverlay.cpp b/3ds/source/YesNoOverlay.cpp index 94079dc..33a2ade 100644 --- a/3ds/source/YesNoOverlay.cpp +++ b/3ds/source/YesNoOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/archive.cpp b/3ds/source/archive.cpp index 68cb588..321dd0f 100644 --- a/3ds/source/archive.cpp +++ b/3ds/source/archive.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/cheatmanager.cpp b/3ds/source/cheatmanager.cpp index 1735e7f..3fcdbea 100644 --- a/3ds/source/cheatmanager.cpp +++ b/3ds/source/cheatmanager.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ CheatManager::CheatManager(void) u32 size = ftell(f); unsigned int destLen = CHEAT_SIZE_DECOMPRESSED; char* s = new char[size]; - char* d = new char[destLen](); + char* d = new char[destLen + 1](); rewind(f); fread(s, 1, size, f); diff --git a/3ds/source/clickable.cpp b/3ds/source/clickable.cpp index c950ce2..661f9ef 100644 --- a/3ds/source/clickable.cpp +++ b/3ds/source/clickable.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/configuration.cpp b/3ds/source/configuration.cpp index 8543486..413ceb1 100644 --- a/3ds/source/configuration.cpp +++ b/3ds/source/configuration.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/directory.cpp b/3ds/source/directory.cpp index de31328..2aff725 100644 --- a/3ds/source/directory.cpp +++ b/3ds/source/directory.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/fsstream.cpp b/3ds/source/fsstream.cpp index 11c4cbd..3e463eb 100644 --- a/3ds/source/fsstream.cpp +++ b/3ds/source/fsstream.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/gui.cpp b/3ds/source/gui.cpp index a7f01ad..ddd0207 100644 --- a/3ds/source/gui.cpp +++ b/3ds/source/gui.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/io.cpp b/3ds/source/io.cpp index 8def60b..68d13a4 100644 --- a/3ds/source/io.cpp +++ b/3ds/source/io.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/main.cpp b/3ds/source/main.cpp index cc055b0..e4cbcf0 100644 --- a/3ds/source/main.cpp +++ b/3ds/source/main.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/scrollable.cpp b/3ds/source/scrollable.cpp index dc4e01d..01cdc3f 100644 --- a/3ds/source/scrollable.cpp +++ b/3ds/source/scrollable.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/smdh.cpp b/3ds/source/smdh.cpp index 94656c5..e8b7f90 100644 --- a/3ds/source/smdh.cpp +++ b/3ds/source/smdh.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/spi.cpp b/3ds/source/spi.cpp index 930d6f9..ca9ba3b 100644 --- a/3ds/source/spi.cpp +++ b/3ds/source/spi.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/thread.cpp b/3ds/source/thread.cpp index 8f7e7bc..76161ef 100644 --- a/3ds/source/thread.cpp +++ b/3ds/source/thread.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/title.cpp b/3ds/source/title.cpp index 38af352..969edec 100644 --- a/3ds/source/title.cpp +++ b/3ds/source/title.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/3ds/source/util.cpp b/3ds/source/util.cpp index e78e33c..e8120a2 100644 --- a/3ds/source/util.cpp +++ b/3ds/source/util.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Makefile b/Makefile index 8e39980..e4e15d6 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ SUBDIRS = 3ds switch VERSION_MAJOR := 3 -VERSION_MINOR := 7 -VERSION_MICRO := 5 +VERSION_MINOR := 8 +VERSION_MICRO := 0 GIT_REV="$(shell git rev-parse --short HEAD)" all: $(SUBDIRS) diff --git a/README.md b/README.md index 7a2724e..641d8d6 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ devkitARM and devkitA64 are required to compile Checkpoint for 3DS and Switch, r ### 3DS version -`dkp-pacman -S libctru citro3d citro2d 3ds-bzip2` +`dkp-pacman -S libctru citro3d citro2d tex3ds 3ds-bzip2` ### Switch version @@ -102,17 +102,16 @@ This project is licensed under the GNU GPLv3. Additional Terms 7.b and 7.c of GP ## Credits -Even though this is the result of independent research and work, Checkpoint for 3DS couldn't be possible without J-D-K's original [JKSM](https://github.com/J-D-K/JKSM) version. +* [Bernardo](https://github.com/BernardoGiordano/) for creating Checkpoint. +* [J-D-K](https://github.com/J-D-K) for the original [JKSM](https://github.com/J-D-K/JKSM) version. +* [TuxSH](https://github.com/tuxsh) for [TWLSaveTool](https://github.com/TuxSH/TWLSaveTool), from which SPI code has been taken. +* WinterMute, fincs and [devkitPro](https://devkitpro.org/) contributors for devkitARM, devkitA64 and [dkp-pacman](https://github.com/devkitPro/pacman/releases). +* Yellows8 and all the mantainers for [switch-examples](https://github.com/switchbrew/switch-examples). +* [rakujira](https://twitter.com/rakujira) for the awesome Checkpoint logo. +* Fellow testers and troubleshooters for their help. +* The huge amount of supporters that this project has gained over the years. -TuxSH for [TWLSaveTool](https://github.com/TuxSH/TWLSaveTool), from which SPI code has been taken. - -WinterMute, fincs and [devkitPro](https://devkitpro.org/) contributors for devkitARM, devkitA64 and [dkp-pacman](https://github.com/devkitPro/pacman/releases). - -Yellows8 and all the mantainers for [switch-examples](https://github.com/switchbrew/switch-examples). - -[rakujira](https://twitter.com/rakujira) for the awesome Checkpoint logo. - -Fellow testers and troubleshooters for their help. +Without you, this project wouldn't have existed. Thank you. --- diff --git a/common/Overlay.hpp b/common/Overlay.hpp index 450ff1e..093f087 100644 --- a/common/Overlay.hpp +++ b/common/Overlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ class Overlay { public: Overlay(Screen& screen) : screen(screen), me(screen.currentOverlay) {} - virtual ~Overlay() = default; + virtual ~Overlay() = default; virtual void update(const InputState&) = 0; #if defined(_3DS) virtual void drawTop() const = 0; diff --git a/common/Screen.cpp b/common/Screen.cpp index 31d2f27..2ee9c83 100644 --- a/common/Screen.cpp +++ b/common/Screen.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/Screen.hpp b/common/Screen.hpp index 226f4e8..60477c6 100644 --- a/common/Screen.hpp +++ b/common/Screen.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/common.cpp b/common/common.cpp index 935fb97..dbd2cea 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/common.hpp b/common/common.hpp index 92b6b74..b80a8f6 100644 --- a/common/common.hpp +++ b/common/common.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/iclickable.hpp b/common/iclickable.hpp index 8cd44f4..2535f24 100644 --- a/common/iclickable.hpp +++ b/common/iclickable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,8 +27,8 @@ #ifndef ICLICKABLE_HPP #define ICLICKABLE_HPP -#include #include "InputState.hpp" +#include typedef uint8_t u8; typedef uint16_t u16; @@ -45,7 +45,7 @@ public: mCanChangeColorWhenSelected = false; } - virtual ~IClickable() = default; + virtual ~IClickable() = default; virtual void draw(float size, T overlay) = 0; virtual void drawOutline(T color) = 0; virtual bool held(void) = 0; diff --git a/common/ihid.hpp b/common/ihid.hpp index 7a92bef..1d4a1a1 100644 --- a/common/ihid.hpp +++ b/common/ihid.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/iscrollable.hpp b/common/iscrollable.hpp index c1c24ca..fbc48ef 100644 --- a/common/iscrollable.hpp +++ b/common/iscrollable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,8 +27,8 @@ #ifndef ISCROLLABLE_HPP #define ISCROLLABLE_HPP -#include "iclickable.hpp" #include "InputState.hpp" +#include "iclickable.hpp" #include template diff --git a/common/logger.hpp b/common/logger.hpp index d702d45..f20d80b 100644 --- a/common/logger.hpp +++ b/common/logger.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/multiselection.cpp b/common/multiselection.cpp index 7cfb184..77f027d 100644 --- a/common/multiselection.cpp +++ b/common/multiselection.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/common/multiselection.hpp b/common/multiselection.hpp index 26f31f1..7693e08 100644 --- a/common/multiselection.hpp +++ b/common/multiselection.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +24,8 @@ * reasonable ways as different from the original version. */ -#include #include +#include namespace MS { std::vector selectedEntries(void); diff --git a/switch/include/CheatManagerOverlay.hpp b/switch/include/CheatManagerOverlay.hpp index b07fbc7..3df0e4b 100644 --- a/switch/include/CheatManagerOverlay.hpp +++ b/switch/include/CheatManagerOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/ErrorOverlay.hpp b/switch/include/ErrorOverlay.hpp index 634f33f..dd9c1b0 100644 --- a/switch/include/ErrorOverlay.hpp +++ b/switch/include/ErrorOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/InfoOverlay.hpp b/switch/include/InfoOverlay.hpp index 2693cfc..c585e4e 100644 --- a/switch/include/InfoOverlay.hpp +++ b/switch/include/InfoOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/InputState.hpp b/switch/include/InputState.hpp index 2d5ad48..d2fc237 100644 --- a/switch/include/InputState.hpp +++ b/switch/include/InputState.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/KeyboardManager.hpp b/switch/include/KeyboardManager.hpp index d047ff2..aacd7ad 100644 --- a/switch/include/KeyboardManager.hpp +++ b/switch/include/KeyboardManager.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/MainScreen.hpp b/switch/include/MainScreen.hpp index 3e74605..cde5c4f 100644 --- a/switch/include/MainScreen.hpp +++ b/switch/include/MainScreen.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/YesNoOverlay.hpp b/switch/include/YesNoOverlay.hpp index f8b6ad1..adcde10 100644 --- a/switch/include/YesNoOverlay.hpp +++ b/switch/include/YesNoOverlay.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/account.hpp b/switch/include/account.hpp index bdb55cb..bd920c2 100644 --- a/switch/include/account.hpp +++ b/switch/include/account.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/cheatmanager.hpp b/switch/include/cheatmanager.hpp index 3fef292..b227251 100644 --- a/switch/include/cheatmanager.hpp +++ b/switch/include/cheatmanager.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/clickable.hpp b/switch/include/clickable.hpp index 4e310d8..dd0a6fc 100644 --- a/switch/include/clickable.hpp +++ b/switch/include/clickable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/colors.hpp b/switch/include/colors.hpp index 778c98d..baf3134 100644 --- a/switch/include/colors.hpp +++ b/switch/include/colors.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/configuration.hpp b/switch/include/configuration.hpp index 3c42c16..1a6db76 100644 --- a/switch/include/configuration.hpp +++ b/switch/include/configuration.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/directory.hpp b/switch/include/directory.hpp index 5ee689d..eefe165 100644 --- a/switch/include/directory.hpp +++ b/switch/include/directory.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/filesystem.hpp b/switch/include/filesystem.hpp index 33a7960..a940a3e 100644 --- a/switch/include/filesystem.hpp +++ b/switch/include/filesystem.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/hid.hpp b/switch/include/hid.hpp index 2e824a8..f2844c2 100644 --- a/switch/include/hid.hpp +++ b/switch/include/hid.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,32 +27,34 @@ #ifndef HID_HPP #define HID_HPP -#include "ihid.hpp" #include "InputState.hpp" +#include "ihid.hpp" #include -#define DELAY_TICKS 2500000 +#define DELAY_TICKS 3000000 template class Hid : public IHid { public: Hid(size_t entries, size_t columns) : IHid(entries, columns), input(g_input) {} - Hid(size_t entries, size_t columns, const InputState& _input) : IHid(entries, columns), input(&_input) {} + Hid(size_t entries, size_t columns, const InputState& _input) : IHid(entries, columns), input(&_input) + { + } private: const InputState* input; - bool downDown() const override { return input && input->kDown & HidNpadButton_Down; } - bool upDown() const override { return input && input->kDown & HidNpadButton_Up; } - bool leftDown() const override { return input && input->kDown & HidNpadButton_Left; } - bool rightDown() const override { return input && input->kDown & HidNpadButton_Right; } + bool downDown() const override { return input && input->kDown & HidNpadButton_AnyDown; } + bool upDown() const override { return input && input->kDown & HidNpadButton_AnyUp; } + bool leftDown() const override { return input && input->kDown & HidNpadButton_AnyLeft; } + bool rightDown() const override { return input && input->kDown & HidNpadButton_AnyRight; } bool leftTriggerDown() const override { return input && input->kDown & HidNpadButton_L; } bool rightTriggerDown() const override { return input && input->kDown & HidNpadButton_R; } - bool downHeld() const override { return input && input->kHeld & HidNpadButton_Down; } - bool upHeld() const override { return input && input->kHeld & HidNpadButton_Up; } - bool leftHeld() const override { return input && input->kHeld & HidNpadButton_Left; } - bool rightHeld() const override { return input && input->kHeld & HidNpadButton_Right; } + bool downHeld() const override { return input && input->kHeld & HidNpadButton_AnyDown; } + bool upHeld() const override { return input && input->kHeld & HidNpadButton_AnyUp; } + bool leftHeld() const override { return input && input->kHeld & HidNpadButton_AnyLeft; } + bool rightHeld() const override { return input && input->kHeld & HidNpadButton_AnyRight; } bool leftTriggerHeld() const override { return input && input->kHeld & HidNpadButton_L; } bool rightTriggerHeld() const override { return input && input->kHeld & HidNpadButton_R; } u64 tick() const override { return armGetSystemTick(); } diff --git a/switch/include/io.hpp b/switch/include/io.hpp index 4f7b041..5e78171 100644 --- a/switch/include/io.hpp +++ b/switch/include/io.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/main.hpp b/switch/include/main.hpp index 3e6b274..cff8a32 100644 --- a/switch/include/main.hpp +++ b/switch/include/main.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,11 +27,11 @@ #ifndef MAIN_HPP #define MAIN_HPP +#include "InputState.hpp" #include "Screen.hpp" #include "account.hpp" #include "title.hpp" #include "util.hpp" -#include "InputState.hpp" #include #include @@ -47,7 +47,7 @@ inline bool g_shouldExitNetworkLoop = false; inline std::string g_selectedCheatKey; inline std::vector g_selectedCheatCodes; inline u32 g_username_dotsize; -inline sort_t g_sortMode = SORT_ALPHA; +inline sort_t g_sortMode = SORT_ALPHA; inline const InputState* g_input = nullptr; inline std::string g_currentFile = ""; inline bool g_isTransferringFile = false; diff --git a/switch/include/pksmbridge.hpp b/switch/include/pksmbridge.hpp index 9a62148..643e6bf 100644 --- a/switch/include/pksmbridge.hpp +++ b/switch/include/pksmbridge.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/scrollable.hpp b/switch/include/scrollable.hpp index b77f816..457c217 100644 --- a/switch/include/scrollable.hpp +++ b/switch/include/scrollable.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/title.hpp b/switch/include/title.hpp index ec3b1aa..7b1f818 100644 --- a/switch/include/title.hpp +++ b/switch/include/title.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/include/util.hpp b/switch/include/util.hpp index 1f07b23..b80a841 100644 --- a/switch/include/util.hpp +++ b/switch/include/util.hpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/CheatManagerOverlay.cpp b/switch/source/CheatManagerOverlay.cpp index 09f33a1..31ae83b 100644 --- a/switch/source/CheatManagerOverlay.cpp +++ b/switch/source/CheatManagerOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/ErrorOverlay.cpp b/switch/source/ErrorOverlay.cpp index f2d9b45..789739c 100644 --- a/switch/source/ErrorOverlay.cpp +++ b/switch/source/ErrorOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/InfoOverlay.cpp b/switch/source/InfoOverlay.cpp index 70fc70f..6dc5c5a 100644 --- a/switch/source/InfoOverlay.cpp +++ b/switch/source/InfoOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/KeyboardManager.cpp b/switch/source/KeyboardManager.cpp index 1dbf621..48acd76 100644 --- a/switch/source/KeyboardManager.cpp +++ b/switch/source/KeyboardManager.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/MainScreen.cpp b/switch/source/MainScreen.cpp index a46d568..f051339 100644 --- a/switch/source/MainScreen.cpp +++ b/switch/source/MainScreen.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -300,7 +300,8 @@ void MainScreen::handleEvents(const InputState& input) } // Handle touching the backup list - if (input.touch.count > 0 && input.touch.touches[0].x > 538 && input.touch.touches[0].x < 952 && input.touch.touches[0].y > 276 && input.touch.touches[0].y < 656) { + if (input.touch.count > 0 && input.touch.touches[0].x > 538 && input.touch.touches[0].x < 952 && input.touch.touches[0].y > 276 && + input.touch.touches[0].y < 656) { // Activate backup list only if multiple selections are enabled if (!MS::multipleSelectionEnabled()) { g_backupScrollEnabled = true; diff --git a/switch/source/SDLHelper.cpp b/switch/source/SDLHelper.cpp index 042f520..58a34cd 100644 --- a/switch/source/SDLHelper.cpp +++ b/switch/source/SDLHelper.cpp @@ -194,7 +194,7 @@ void drawPulsingOutline(u32 x, u32 y, u16 w, u16 h, u8 size, SDL_Color color) { float highlight_multiplier = fmax(0.0, fabs(fmod(g_currentTime, 1.0) - 0.5) / 0.5); color = FC_MakeColor(color.r + (255 - color.r) * highlight_multiplier, color.g + (255 - color.g) * highlight_multiplier, - color.b + (255 - color.b) * highlight_multiplier, 255); + color.b + (255 - color.b) * highlight_multiplier, 255); drawOutline(x, y, w, h, size, color); } diff --git a/switch/source/YesNoOverlay.cpp b/switch/source/YesNoOverlay.cpp index 601819e..d492c18 100644 --- a/switch/source/YesNoOverlay.cpp +++ b/switch/source/YesNoOverlay.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/account.cpp b/switch/source/account.cpp index cd2bb49..6b77b39 100644 --- a/switch/source/account.cpp +++ b/switch/source/account.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -112,7 +112,6 @@ SDL_Texture* Account::icon(AccountUid id) AccountUid Account::selectAccount(void) { - AccountUid out_id; LibAppletArgs args; libappletArgsCreate(&args, 0x10000); u8 st_in[0xA0] = {0}; @@ -124,8 +123,8 @@ AccountUid Account::selectAccount(void) u64 lres = *(u64*)st_out; AccountUid uid = *(AccountUid*)&st_out[8]; if (lres == 0) - out_id = uid; + return uid; } - return out_id; + return g_currentUId; } \ No newline at end of file diff --git a/switch/source/cheatmanager.cpp b/switch/source/cheatmanager.cpp index 5f4a65c..8fc6b3c 100644 --- a/switch/source/cheatmanager.cpp +++ b/switch/source/cheatmanager.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ CheatManager::CheatManager(void) u32 size = ftell(f); unsigned int destLen = CHEAT_SIZE_DECOMPRESSED; char* s = new char[size]; - char* d = new char[destLen](); + char* d = new char[destLen + 1](); rewind(f); fread(s, 1, size, f); diff --git a/switch/source/clickable.cpp b/switch/source/clickable.cpp index 05bc791..87892b8 100644 --- a/switch/source/clickable.cpp +++ b/switch/source/clickable.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,9 +35,9 @@ bool Clickable::held() bool Clickable::released() { const auto [on, currentlyTouching] = [this]() { - return std::make_pair(g_input->touch.count > 0 && g_input->touch.touches[0].y > (unsigned)my && g_input->touch.touches[0].y < (unsigned)(my + mh) && - g_input->touch.touches[0].x > (unsigned)mx && g_input->touch.touches[0].x < (unsigned)(mx + mw), - g_input->touch.count > 0); + return std::make_pair(g_input->touch.count > 0 && g_input->touch.touches[0].y > (unsigned)my && + g_input->touch.touches[0].y < (unsigned)(my + mh) && g_input->touch.touches[0].x > (unsigned)mx && + g_input->touch.touches[0].x<(unsigned)(mx + mw), g_input->touch.count> 0); }(); if (on) { diff --git a/switch/source/colors.cpp b/switch/source/colors.cpp index 5d6676a..01be3b0 100644 --- a/switch/source/colors.cpp +++ b/switch/source/colors.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/configuration.cpp b/switch/source/configuration.cpp index e49a979..08c07d8 100644 --- a/switch/source/configuration.cpp +++ b/switch/source/configuration.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/directory.cpp b/switch/source/directory.cpp index bfb7ffb..6fbd197 100644 --- a/switch/source/directory.cpp +++ b/switch/source/directory.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/filesystem.cpp b/switch/source/filesystem.cpp index 479543e..7df86a1 100644 --- a/switch/source/filesystem.cpp +++ b/switch/source/filesystem.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/io.cpp b/switch/source/io.cpp index ac0ed24..aadd556 100644 --- a/switch/source/io.cpp +++ b/switch/source/io.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/main.cpp b/switch/source/main.cpp index 0fadd41..3856d8c 100644 --- a/switch/source/main.cpp +++ b/switch/source/main.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,7 +74,7 @@ int main(void) break; input.kHeld = padGetButtons(&pad); - input.kUp = padGetButtonsUp(&pad); + input.kUp = padGetButtonsUp(&pad); hidGetTouchScreenStates(&input.touch, 1); g_screen->doDraw(); diff --git a/switch/source/pksmbridge.cpp b/switch/source/pksmbridge.cpp index 364d4fb..17aa78b 100644 --- a/switch/source/pksmbridge.cpp +++ b/switch/source/pksmbridge.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/switch/source/scrollable.cpp b/switch/source/scrollable.cpp index 2095746..2f5a3cf 100644 --- a/switch/source/scrollable.cpp +++ b/switch/source/scrollable.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,8 +56,8 @@ void Scrollable::updateSelection(void) { const int hu = (mHid.maxEntries(size()) + 1) * mh / mVisibleEntries; - if (g_input->touch.count > 0 && g_input->touch.touches[0].y > (float)my && g_input->touch.touches[0].y < (float)(my + hu) && g_input->touch.touches[0].x > (float)mx && - g_input->touch.touches[0].x < (float)(mx + mw)) { + if (g_input->touch.count > 0 && g_input->touch.touches[0].y > (float)my && g_input->touch.touches[0].y < (float)(my + hu) && + g_input->touch.touches[0].x > (float)mx && g_input->touch.touches[0].x < (float)(mx + mw)) { mHid.index(ceilf((g_input->touch.touches[0].y - my) * mVisibleEntries / mh)); } diff --git a/switch/source/title.cpp b/switch/source/title.cpp index 01ed641..8e54985 100644 --- a/switch/source/title.cpp +++ b/switch/source/title.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ void Title::init(u8 saveDataType, u64 id, AccountUid userID, const std::string& std::string aname = StringUtils::removeAccents(mName); size_t pos = aname.rfind(":"); - mDisplayName = std::make_pair(name, ""); + mDisplayName = std::make_pair(aname, ""); if (pos != std::string::npos) { std::string name1 = aname.substr(0, pos); std::string name2 = aname.substr(pos + 1); diff --git a/switch/source/util.cpp b/switch/source/util.cpp index 6295306..edf1974 100644 --- a/switch/source/util.cpp +++ b/switch/source/util.cpp @@ -1,6 +1,6 @@ /* * This file is part of Checkpoint - * Copyright (C) 2017-2019 Bernardo Giordano, FlagBrew + * Copyright (C) 2017-2021 Bernardo Giordano, FlagBrew * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by