Skip to content

Commit

Permalink
Disabled 'Size' option on 351ELEC for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardigrade-nx committed Jul 6, 2021
1 parent 1d3ab10 commit 079c568
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif

SRC = $(wildcard src/*.cpp)
OBJ = $(patsubst %cpp,%o,$(SRC))
COMPILER_FLAGS = $(shell $(SDL2_CONFIG) --cflags) -Wall -pedantic -Wfatal-errors -DDEVICE_$(DEVICE) -DSTART_PATH=\"$(START_PATH)\" -DRES_PATH=\"$(RES_PATH)\"
COMPILER_FLAGS = $(shell $(SDL2_CONFIG) --cflags) -Wall -pedantic -Wfatal-errors -DDEVICE_$(DEVICE) -DSTART_PATH=\"$(START_PATH)\" -DRES_PATH=\"$(RES_PATH)\" -DFIRMWARE_$(FIRMWARE)
LINKER_FLAGS = $(shell $(SDL2_CONFIG) --libs) -lSDL2_image -lSDL2_ttf

all : $(OBJ)
Expand Down
2 changes: 1 addition & 1 deletion build_RG351.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build351Files() {
START_PATH="$3"
RES_PATH="$4"
make clean
make CC="$TOOLCHAIN_DIR"/bin/aarch64-libreelec-linux-gnueabi-g++ DEVICE="$DEVICE" SDL2_CONFIG="$TOOLCHAIN_DIR"/aarch64-libreelec-linux-gnueabi/sysroot/usr/bin/sdl2-config START_PATH="$START_PATH" RES_PATH="$RES_PATH"
make CC="$TOOLCHAIN_DIR"/bin/aarch64-libreelec-linux-gnueabi-g++ DEVICE="$DEVICE" SDL2_CONFIG="$TOOLCHAIN_DIR"/aarch64-libreelec-linux-gnueabi/sysroot/usr/bin/sdl2-config START_PATH="$START_PATH" RES_PATH="$RES_PATH" FIRMWARE="$FIRMWARE"
mkdir -p build/351Files
cp -r 351Files README.md res build/351Files
cp launchers/"$FIRMWARE"/351Files.sh build
Expand Down
7 changes: 1 addition & 6 deletions src/fileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void FileUtils::renameFile(const std::string &p_file1, const std::string &p_file
unsigned long long int FileUtils::getDirSize(const std::string &p_path)
{
// Execute command 'du'
std::string l_line = "du -s " + p_path;
std::string l_line = "du -bs " + p_path;
char l_buffer[256];
FILE *l_pipe = popen(l_line.c_str(), "r");
if (l_pipe == NULL)
Expand All @@ -339,10 +339,5 @@ unsigned long long int FileUtils::getDirSize(const std::string &p_path)
unsigned long long int l_result = 0;
std::istringstream iss(l_line);
iss >> l_result;
// Convert to bytes
if (std::getenv("POSIXLY_CORRECT") != NULL)
l_result *= 512;
else
l_result *= 1024;
return l_result;
}
2 changes: 2 additions & 0 deletions src/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,10 @@ void MainWindow::openContextMenu(void)
l_dialog.addOption("Delete", 3, g_iconTrash);
if (nbSelected == 1)
l_dialog.addOption("Rename", 9, g_iconEdit);
#ifndef FIRMWARE_351ELEC
if (m_fileLister.getNbSelected('d') > 0)
l_dialog.addOption("Size", 4, g_iconDisk);
#endif
l_dialog.addOption("Select all", 5, g_iconSelect);
l_dialog.addOption("Select none", 6, g_iconNone);
l_dialog.addOption("New directory", 7, g_iconNewDir);
Expand Down
1 change: 0 additions & 1 deletion src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ int IWindow::execute(void)
// Render all windows
void IWindow::renderAll(void)
{
//~ INHIBIT(std::cout << "renderAll - " << g_windows.size() << " windows\n";)
if (g_windows.empty())
return;
// First window to draw is the last that is fullscreen
Expand Down

0 comments on commit 079c568

Please sign in to comment.