More Cleanup

Remove unused code as well as useless debug printf's
This commit is contained in:
tobid7 2023-08-28 17:11:07 +02:00
parent 267f9ce5c3
commit 566485ccd6
3 changed files with 6 additions and 87 deletions

View File

@ -13,52 +13,4 @@ class Ovl_Ftrace : public RenderD7::Ovl {
private: private:
}; };
class Ovl_UiBattery : public RenderD7::Ovl {
/// @brief Constructor
/// @param percentage Percentage
Ovl_UiBattery(float *percentage);
/// @brief Override for Draw
void Draw(void) const override;
/// @brief Override for Logic
void Logic() override;
private:
float *_pct_addr = 0;
};
class Ovl_UiSound : public RenderD7::Ovl {
/// @brief Constructor
/// @param percentage Percentage
Ovl_UiSound(float *percentage);
/// @brief Override for Draw
void Draw(void) const override;
/// @brief Override for Logic
void Logic() override;
private:
float *_pct_addr = 0;
};
class Ovl_Ui3d : public RenderD7::Ovl {
/// @brief Constructor
/// @param percentage Percentage
Ovl_Ui3d(float *percentage);
/// @brief Override for Draw
void Draw(void) const override;
/// @brief Override for Logic
void Logic() override;
private:
float *_pct_addr = 0;
};
class Ovl_UiWifi : public RenderD7::Ovl {
/// @brief Constructor
/// @param level strengh level
Ovl_UiWifi(uint8_t *level);
/// @brief Override for Draw
void Draw(void) const override;
/// @brief Override for Logic
void Logic() override;
private:
uint8_t *_pct_addr = 0;
};
} // namespace RenderD7 } // namespace RenderD7

View File

@ -8,28 +8,4 @@ Ovl_Ftrace::Ovl_Ftrace() {}
void Ovl_Ftrace::Draw(void) const { RenderD7::OnScreen(Top); } void Ovl_Ftrace::Draw(void) const { RenderD7::OnScreen(Top); }
void Ovl_Ftrace::Logic() {} void Ovl_Ftrace::Logic() {}
Ovl_UiBattery::Ovl_UiBattery(float *percentage) { _pct_addr = percentage; }
void Ovl_UiBattery::Draw(void) const {}
void Ovl_UiBattery::Logic() {}
Ovl_UiSound::Ovl_UiSound(float *percentage) { _pct_addr = percentage; }
void Ovl_UiSound::Draw(void) const {}
void Ovl_UiSound::Logic() {}
Ovl_Ui3d::Ovl_Ui3d(float *percentage) { _pct_addr = percentage; }
void Ovl_Ui3d::Draw(void) const {}
void Ovl_Ui3d::Logic() {}
Ovl_UiWifi::Ovl_UiWifi(uint8_t *level) { _pct_addr = level; }
void Ovl_UiWifi::Draw(void) const {}
void Ovl_UiWifi::Logic() {}
} // namespace RenderD7 } // namespace RenderD7

View File

@ -393,7 +393,6 @@ Result RenderD7::Init::Main(std::string app_name) {
CFGU_GetSystemModel(&consoleModel); CFGU_GetSystemModel(&consoleModel);
cfguExit(); cfguExit();
} }
printf("cfgu\n");
rd7_security->SafeInit(aptInit, aptExit); rd7_security->SafeInit(aptInit, aptExit);
rd7_security->SafeInit(romfsInit, romfsExit); rd7_security->SafeInit(romfsInit, romfsExit);
@ -408,14 +407,13 @@ Result RenderD7::Init::Main(std::string app_name) {
Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT); Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
TextBuf = C2D_TextBufNew(4096); TextBuf = C2D_TextBufNew(4096);
Font = C2D_FontLoadSystem(CFG_REGION_USA); Font = C2D_FontLoadSystem(CFG_REGION_USA);
printf("Graphical Interface\n");
last_tm = svcGetSystemTick(); last_tm = svcGetSystemTick();
RenderD7::Ftrace::Beg("rd7-core", "do_splash"); RenderD7::Ftrace::Beg("rd7-core", "do_splash");
if (rd7_do_splash) if (rd7_do_splash)
PushSplash(); PushSplash();
RenderD7::Ftrace::End("rd7-core", "do_splash"); RenderD7::Ftrace::End("rd7-core", "do_splash");
printf("stuff\n");
if (cobj___) { if (cobj___) {
maxobj__ = cobj___; maxobj__ = cobj___;
} }
@ -427,7 +425,7 @@ Result RenderD7::Init::Main(std::string app_name) {
cfgpath += D_app_name; cfgpath += D_app_name;
std::filesystem::create_directories(cfgpath.c_str()); std::filesystem::create_directories(cfgpath.c_str());
bool renew = false; bool renew = false;
printf("folderset\n");
if (FS::FileExist(cfgpath + "/config.ini")) { if (FS::FileExist(cfgpath + "/config.ini")) {
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
@ -435,7 +433,7 @@ Result RenderD7::Init::Main(std::string app_name) {
if (version != CFGVER) if (version != CFGVER)
renew = true; renew = true;
} }
printf("vercheck\n");
if (!FS::FileExist(cfgpath + "/config.ini") || renew) { if (!FS::FileExist(cfgpath + "/config.ini") || renew) {
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
@ -454,22 +452,19 @@ Result RenderD7::Init::Main(std::string app_name) {
} }
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
////C3D_FrameRate(RenderD7::Convert::StringtoFloat(Fps));
metrikd = RenderD7::Convert::FloatToBool(RenderD7::Convert::StringtoFloat( metrikd = RenderD7::Convert::FloatToBool(RenderD7::Convert::StringtoFloat(
cfgstruct["metrik-settings"]["enableoverlay"])); cfgstruct["metrik-settings"]["enableoverlay"]));
mt_txtSize = mt_txtSize =
RenderD7::Convert::StringtoFloat(cfgstruct["metrik-settings"]["txtSize"]); RenderD7::Convert::StringtoFloat(cfgstruct["metrik-settings"]["txtSize"]);
mt_screen = mt_screen =
RenderD7::Convert::StringtoInt(cfgstruct["metrik-settings"]["Screen"]); RenderD7::Convert::StringtoInt(cfgstruct["metrik-settings"]["Screen"]);
printf("read\n");
// Check if citra // Check if citra
s64 citracheck = 0; s64 citracheck = 0;
svcGetSystemInfo(&citracheck, 0x20000, 0); svcGetSystemInfo(&citracheck, 0x20000, 0);
is_citra = citracheck ? true : false; is_citra = citracheck ? true : false;
printf("citra\n");
// Speedup // Speedup
osSetSpeedupEnable(true); osSetSpeedupEnable(true);
printf("boost\n");
RenderD7::Ftrace::End("rd7-core", f2s(RenderD7::Init::Main)); RenderD7::Ftrace::End("rd7-core", f2s(RenderD7::Init::Main));
// RenderD7::Msg::Display("RenderD7", "RenderD7 init success!\nWaiting for // RenderD7::Msg::Display("RenderD7", "RenderD7 init success!\nWaiting for
// MainLoop!", Top); // MainLoop!", Top);
@ -511,7 +506,6 @@ Result RenderD7::Init::Minimal(std::string app_name) {
cfgpath += D_app_name; cfgpath += D_app_name;
std::filesystem::create_directories(cfgpath.c_str()); std::filesystem::create_directories(cfgpath.c_str());
bool renew = false; bool renew = false;
printf("folderset\n");
if (FS::FileExist(cfgpath + "/config.ini")) { if (FS::FileExist(cfgpath + "/config.ini")) {
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
@ -519,7 +513,6 @@ Result RenderD7::Init::Minimal(std::string app_name) {
if (version != CFGVER) if (version != CFGVER)
renew = true; renew = true;
} }
printf("vercheck\n");
if (!FS::FileExist(cfgpath + "/config.ini") || renew) { if (!FS::FileExist(cfgpath + "/config.ini") || renew) {
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
@ -536,18 +529,16 @@ Result RenderD7::Init::Minimal(std::string app_name) {
cfgstruct["metrik-settings"]["txtSize"] = "0.7f"; cfgstruct["metrik-settings"]["txtSize"] = "0.7f";
cfgfile->write(cfgstruct); cfgfile->write(cfgstruct);
} }
if (renew)
printf("renew\n");
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
// C3D_FrameRate(RenderD7::Convert::StringtoFloat(Fps));
metrikd = RenderD7::Convert::FloatToBool(RenderD7::Convert::StringtoFloat( metrikd = RenderD7::Convert::FloatToBool(RenderD7::Convert::StringtoFloat(
cfgstruct["metrik-settings"]["enableoverlay"])); cfgstruct["metrik-settings"]["enableoverlay"]));
mt_txtSize = mt_txtSize =
RenderD7::Convert::StringtoFloat(cfgstruct["metrik-settings"]["txtSize"]); RenderD7::Convert::StringtoFloat(cfgstruct["metrik-settings"]["txtSize"]);
mt_screen = mt_screen =
RenderD7::Convert::StringtoInt(cfgstruct["metrik-settings"]["Screen"]); RenderD7::Convert::StringtoInt(cfgstruct["metrik-settings"]["Screen"]);
printf("boost\n");
return 0; return 0;
} }