diff --git a/app/include/archive_helper.h b/app/include/archive_helper.h index ab28fd2..b925570 100644 --- a/app/include/archive_helper.h +++ b/app/include/archive_helper.h @@ -1,6 +1,8 @@ #ifndef _CMFILEMANAGER_ARCHIVE_HELPER_H_ #define _CMFILEMANAGER_ARCHIVE_HELPER_H_ +#include + namespace ArchiveHelper { int Extract(const std::string &path); } diff --git a/app/source/gui.cpp b/app/source/gui.cpp index c29db71..e172878 100644 --- a/app/source/gui.cpp +++ b/app/source/gui.cpp @@ -38,9 +38,12 @@ namespace GUI { G2D::FontSetStyle(1.f, WHITE, INTRAFONT_ALIGN_LEFT); G2D::DrawText(5, 14, time_string); - int state = scePowerIsBatteryCharging(); - int percent = scePowerGetBatteryLifePercent(); - int battery_val = (percent / 20); + int state = 0, percent = 0, battery_val = 0; + if (scePowerIsBatteryExist()) { + state = scePowerIsBatteryCharging(); + percent = scePowerGetBatteryLifePercent(); + battery_val = (percent / 20); + } static char percent_string[10]; std::snprintf(percent_string, 10, "%d", percent); diff --git a/app/source/gui/audioplayer.cpp b/app/source/gui/audioplayer.cpp index 996f96a..b6e47f7 100644 --- a/app/source/gui/audioplayer.cpp +++ b/app/source/gui/audioplayer.cpp @@ -168,7 +168,7 @@ namespace AudioPlayer { G2D::DrawText(455 - length_time_width, 240, length_time); G2D::DrawRect(230, 245, 225, 2, G2D_RGBA(97, 97, 97, 150)); - G2D::DrawRect(230, 245, ((static_cast(Audio::GetPosition())/static_cast(Audio::GetLength())) * 225.0), 2, WHITE); + G2D::DrawRect(230, 245, ((static_cast(Audio::GetPosition())/static_cast(Audio::GetLength())) * 225.0), 2, WHITE); g2dFlip(G2D_VSYNC); int ctrl = Utils::ReadControls(); diff --git a/app/source/gui/filebrowser.cpp b/app/source/gui/filebrowser.cpp index 83a66fc..02ae624 100644 --- a/app/source/gui/filebrowser.cpp +++ b/app/source/gui/filebrowser.cpp @@ -28,7 +28,7 @@ namespace GUI { G2D::DrawRect(40, 43, 400, 3, SELECTOR_COLOUR); if ((device == BROWSE_STATE_INTERNAL) || (device == BROWSE_STATE_EXTERNAL)) { - float fill = (static_cast(item.used_storage)/static_cast(item.total_storage)) * 400.f; + float fill = (static_cast(item.used_storage)/static_cast(item.total_storage)) * 400.f; G2D::DrawRect(40, 43, fill, 3, TITLE_COLOUR); } diff --git a/launcher/source/main.c b/launcher/source/main.c index 1d9e7e5..760adae 100644 --- a/launcher/source/main.c +++ b/launcher/source/main.c @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/libs/include/systemctrl.h b/libs/include/systemctrl.h index 831d087..680296e 100644 --- a/libs/include/systemctrl.h +++ b/libs/include/systemctrl.h @@ -5,6 +5,7 @@ extern "C" { #endif +#include #include #include #include