Skip to content

Commit

Permalink
Check for GDB and Latest libnx
Browse files Browse the repository at this point in the history
  • Loading branch information
proferabg committed Jun 23, 2023
1 parent e6442c0 commit 45dad1d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 25 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@
#.gitignore #
###################

#
# Visual Studio Code
#
.settings/
.classpath
.factorypath
.project
.vscode/

#
# CMAKE
#
build/
out/
*.lst
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

APP_TITLE := EdiZon
APP_AUTHOR := WerWolv & proferabg
APP_VERSION := v1.0.5
APP_VERSION := v1.0.6

TARGET := EdiZon
OUTDIR := out
Expand Down Expand Up @@ -177,6 +177,7 @@ DEPENDS := $(OFILES:.o=.d)
all : $(OUTPUT).ovl

$(OUTPUT).ovl : $(OUTPUT).nro
@cp $(OUTPUT).nro $(OUTPUT).ovl

$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Continued Support by proferabg
<br />
<br />

# Latest Changelog - v1.0.5
# Latest Changelog - v1.0.6

Updated libtesla to fix crashes related to docked mode
Changed highlight color to light blue
Allow overlay to run when using GDB
Pulled latest libnx with @masagrator's changes
<br />

# How To Use Submenus
Expand Down
2 changes: 1 addition & 1 deletion libs/libtesla
2 changes: 2 additions & 0 deletions source/cheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ namespace edz::cheat {
/////// FrozenAddress Type ///////

Result CheatManager::initialize() {
dmntchtInitialize();
return CheatManager::reload();
}

void CheatManager::exit() {
dmntchtExit();
for (auto &cheat : CheatManager::s_cheats)
delete cheat;
CheatManager::s_cheats.clear();
Expand Down
40 changes: 20 additions & 20 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class GuiMain : public tsl::Gui {
auto *rootFrame = new tsl::elm::HeaderOverlayFrame();
rootFrame->setHeader(new tsl::elm::CustomDrawer([this](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
renderer->drawString("EdiZon", false, 20, 50, 30, renderer->a(tsl::style::color::ColorText));
renderer->drawString("v1.0.5", false, 20, 70, 15, renderer->a(tsl::style::color::ColorDescription));
renderer->drawString("v1.0.6", false, 20, 70, 15, renderer->a(tsl::style::color::ColorDescription));

if (edz::cheat::CheatManager::getProcessID() != 0) {
renderer->drawString("Program ID:", false, 150, 40, 15, renderer->a(tsl::style::color::ColorText));
Expand All @@ -302,31 +302,32 @@ class GuiMain : public tsl::Gui {

auto list = new tsl::elm::List();

auto cheatsItem = new tsl::elm::ListItem("Cheats");
auto statsItem = new tsl::elm::ListItem("System Information");
cheatsItem->setClickListener([](s64 keys) {
if (keys & HidNpadButton_A) {
tsl::changeTo<GuiCheats>("");
return true;
}

return false;
});
if(edz::cheat::CheatManager::isCheatServiceAvailable()){
auto cheatsItem = new tsl::elm::ListItem("Cheats");
cheatsItem->setClickListener([](s64 keys) {
if (keys & HidNpadButton_A) {
tsl::changeTo<GuiCheats>("");
return true;
}
return false;
});
list->addItem(cheatsItem);
} else {
auto noDmntSvc = new tsl::elm::ListItem("Cheat Service Unavailable!");
list->addItem(noDmntSvc);
}

auto statsItem = new tsl::elm::ListItem("System Information");
statsItem->setClickListener([](s64 keys) {
if (keys & HidNpadButton_A) {
tsl::changeTo<GuiStats>();
return true;
}

return false;
});

list->addItem(cheatsItem);
list->addItem(statsItem);

rootFrame->setContent(list);

return rootFrame;
}

Expand All @@ -344,8 +345,8 @@ class EdiZonOverlay : public tsl::Overlay {
~EdiZonOverlay() { }

void initServices() override {
dmntchtInitialize();
edz::cheat::CheatManager::initialize();
if(edz::cheat::CheatManager::isCheatServiceAvailable()) // GDB Check
edz::cheat::CheatManager::initialize();
tsInitialize();
if (hosversionAtLeast(15,0,0)) {
nifmInitialize(NifmServiceType_User);
Expand All @@ -354,12 +355,11 @@ class EdiZonOverlay : public tsl::Overlay {
}
clkrstInitialize();
pcvInitialize();

}

virtual void exitServices() override {
dmntchtExit();
edz::cheat::CheatManager::exit();
if(edz::cheat::CheatManager::isCheatServiceAvailable())
edz::cheat::CheatManager::exit();
tsExit();
wlaninfExit();
nifmExit();
Expand Down

0 comments on commit 45dad1d

Please sign in to comment.