iUltimateLP / NXGallery

🎮 A Nintendo Switch Homebrew Application to transfer your screenshots to your phone or PC in no-time 📱⚡
MIT License
72 stars 3 forks source link

Things that need to change for a recompile #9

Closed Slluxx closed 2 years ago

Slluxx commented 3 years ago

i looked into it but lost interest after i noticed it needs a little more changes. im writing this down in case i will not touch this again or if someone else wants to take a look.

makefile:68

allows the usage of std::filesystem

    CFLAGS  :=  -g -std=c++17 -Wall -O2 -ffunction-sections \

albuwrapper.cpp:351

fix a bug that will crash the whole homwbrew upon opening the website

    // Determine the type by looking at the file extension
    // bool isVideo = foundFileName.compare(foundFileName.length() - 3, 3, "mp4") == 0;
    // jsonObj["type"] = isVideo ? "video" : "screenshot";

    jsonObj["type"] = "screenshot";
    std::filesystem::path filePath = foundFileName;
    if (filePath.extension() == ".mp4")
        jsonObj["type"] = "video";

currently the "path" key inside the gallery content is missing, which will result in no images shown, even if the above homebrew-crashing bug is fixed. i am not quite sure if its because my emummc is RAW2 or because readdir is broken. i suggest you use std::filesystem to iterate through folders.

albumwrapper.hpp:19

emummc paths can be RAW2 (and probably RAW3,4,5 too). I only have one emummc and yet hekate formatted it this way.

index.html:37

change unpgk to fixed versions. this will fix current react and materialui issues

    <script src="https://unpkg.com/react@16.13.1/umd/react.development.js" crossorigin></script>
    <script src="https://unpkg.com/react-dom@16.13.1/umd/react-dom.development.js" crossorigin></script>
    <script src="https://unpkg.com/@material-ui/core@4.11.4/umd/material-ui.development.js" crossorigin></script>
iUltimateLP commented 3 years ago

Thanks! I'll include that into a rework of this shortly!