3ds macro name change - fix #464

also fix useless dependency on vector in spi.cpp
This commit is contained in:
LiquidFenrir 2022-08-03 01:00:33 +02:00
parent 6080bb2b1f
commit da3b79eb19
6 changed files with 7 additions and 7 deletions

View file

@ -81,7 +81,7 @@ CFLAGS := -g -gdwarf-4 -Wall -Wextra -Wno-psabi -O2 -mword-relocations -flto \
-DGIT_REV=\"${GIT_REV}\" \ -DGIT_REV=\"${GIT_REV}\" \
-DCHEAT_SIZE_DECOMPRESSED=${CHEAT_SIZE_DECOMPRESSED} -DCHEAT_SIZE_DECOMPRESSED=${CHEAT_SIZE_DECOMPRESSED}
CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE=1 CFLAGS += $(INCLUDE) -DARM11 -D__3DS__ -D_GNU_SOURCE=1
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17 CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17

View file

@ -44,7 +44,7 @@
#include "spi.hpp" #include "spi.hpp"
static std::vector<u32> knownJEDECs = {0x204012, 0x621600, 0x204013, 0x621100, 0x204014, 0x202017, 0x204017, 0x208013}; static const u32 knownJEDECS[] = {0x204012, 0x621600, 0x204013, 0x621100, 0x204014, 0x202017, 0x204017, 0x208013};
u8* fill_buf = NULL; u8* fill_buf = NULL;
@ -409,7 +409,7 @@ Result SPIGetCardType(CardType* type, int infrared)
if (R_SUCCEEDED(res)) { if (R_SUCCEEDED(res)) {
Logger::getInstance().log(Logger::INFO, "Found JEDEC: 0x%016lX", jedec); Logger::getInstance().log(Logger::INFO, "Found JEDEC: 0x%016lX", jedec);
Logger::getInstance().log(Logger::INFO, "CardType (While inside maxTries loop): %016lX", t); Logger::getInstance().log(Logger::INFO, "CardType (While inside maxTries loop): %016lX", t);
if (std::find(knownJEDECs.begin(), knownJEDECs.end(), jedec) != knownJEDECs.end()) { if (std::find(std::begin(knownJEDECS), std::end(knownJEDECS), jedec) != std::end(knownJEDECS)) {
Logger::getInstance().log(Logger::INFO, "Found a jedec equal to one in the ordered list. Type: %016lX", *type); Logger::getInstance().log(Logger::INFO, "Found a jedec equal to one in the ordered list. Type: %016lX", *type);
} }
else { else {

View file

@ -35,7 +35,7 @@ public:
Overlay(Screen& screen) : screen(screen), me(screen.currentOverlay) {} Overlay(Screen& screen) : screen(screen), me(screen.currentOverlay) {}
virtual ~Overlay() = default; virtual ~Overlay() = default;
virtual void update(const InputState&) = 0; virtual void update(const InputState&) = 0;
#if defined(_3DS) #if defined(__3DS__)
virtual void drawTop() const = 0; virtual void drawTop() const = 0;
virtual void drawBottom() const = 0; virtual void drawBottom() const = 0;
#elif defined(__SWITCH__) #elif defined(__SWITCH__)

View file

@ -27,7 +27,7 @@
#include "Screen.hpp" #include "Screen.hpp"
#include "Overlay.hpp" #include "Overlay.hpp"
#if defined(_3DS) #if defined(__3DS__)
void Screen::doDrawTop() const void Screen::doDrawTop() const
{ {

View file

@ -38,7 +38,7 @@ class Screen {
public: public:
virtual ~Screen() = default; virtual ~Screen() = default;
// Call draw, then currentOverlay->draw if it exists // Call draw, then currentOverlay->draw if it exists
#if defined(_3DS) #if defined(__3DS__)
void doDrawTop(void) const; void doDrawTop(void) const;
void doDrawBottom(void) const; void doDrawBottom(void) const;
virtual void drawTop(void) const = 0; virtual void drawTop(void) const = 0;

View file

@ -67,7 +67,7 @@ private:
Logger(Logger const&) = delete; Logger(Logger const&) = delete;
void operator=(Logger const&) = delete; void operator=(Logger const&) = delete;
#if defined(_3DS) #if defined(__3DS__)
const std::string mPath = "sdmc:/3ds/Checkpoint/checkpoint.log"; const std::string mPath = "sdmc:/3ds/Checkpoint/checkpoint.log";
#elif defined(__SWITCH__) #elif defined(__SWITCH__)
const std::string mPath = "/switch/Checkpoint/checkpoint.log"; const std::string mPath = "/switch/Checkpoint/checkpoint.log";