WerWolv / libtesla

The support library for Tesla overlays
GNU General Public License v2.0
218 stars 49 forks source link

Can't open files #39

Closed masagrator closed 4 years ago

masagrator commented 4 years ago

For some reason I can't open or remove any file on sdcard with newest libtesla. In old versions I didn't need to mount sdmc manually. Now I need to do it.

Is this how it should be?

WerWolv commented 4 years ago

Use raw fs calls if possible at all, otherwise there's tsl::doWithSDCardHandle: https://github.com/WerWolv/libtesla/blob/master/include/tesla.hpp#L225 The advantage of raw fs calls is that it's orders of magnitude faster and keeps the executable size small

masagrator commented 4 years ago

and keeps the executable size small

I'm not sure about that. After changing to raw fs calls my overlay got 8kB bigger. :P

Maybe for streaming it's better, but just for reading few bytes not so much.

WerWolv commented 4 years ago

Make sure you're not including stdio and co anywhere anymore and that you don't use any functions from it. Removing it made ovl-sysmodules 1.5MB smaller and Tesla Menu around 1MB. It's definitely significant if done right

HookedBehemoth commented 4 years ago

Well tbf you used std::filesystem which is big.