Commit Graph

48 Commits (40d2dcabd7e5b978c0e1e5c76000de01e2d0c270)

Author SHA1 Message Date
Lioncash 40d2dcabd7
file_util: Add static assertions to ReadBytes() and WriteBytes()
Ensure that the actual types being passed in are trivially copyable. The internal
call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char*
which is always trivially copyable.
7 years ago
Lioncash 5d9ee12b1a
file_util: Remove compiler version checks around is_trivially_copyable()
The minimum clang/GCC versions we support already support this. We can also
remove is_standard_layout(), as fread and fwrite only require the type to be
trivially copyable.
7 years ago
N00byKing 75da830c13
file_util.h: Update Comment from citra to yuzu 7 years ago
James Rowe 096be16636 Format: Run the new clang format on everything 7 years ago
bunnei 707cc66362 file_util: Remove unused paths. 8 years ago
freiro 79317b63d9 Switch to AppData/Roaming 9 years ago
freiro 3d75e3cd07 Return by value and other fixes 9 years ago
freiro 29bb82cb8e Win32 move default user folder location to AppData 9 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Yuri Kunde Schlesner d6792632f0 Fix recursive scanning of directories
ForeachDirectoryEntry didn't actually do anything with the `recursive`
parameter, and the corresponding callback parameter was shadowing the
actual recursion counters in the user functions.
9 years ago
Emmanuel Gil Peyrot 8ab6f26c09 Common: Make recursive FileUtil functions take a maximum recursion
Fixes #1115.

Also improves the performances of DiskArchive’s directory
implementation a lot, simply by not going through the entire tree
instead of just listing the first level files.

Thanks to JayRoxFox for rebasing this on current master!
9 years ago
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 9 years ago
LittleWhite 9572652ddc Protect use of std::is_trivially_copyable to compile with GCC 4.9 9 years ago
Lioncash 5f51622e9d file_util: In-class initialize data members 9 years ago
Lioncash 655623ebb2 file_util: const qualify IOFile's Tell and GetSize functions 9 years ago
Lioncash a4120ca66c file_util: Don't expose IOFile internals through the API 9 years ago
Lioncash bf9945b81b file_util: Check for is_trivially_copyable
Also applies the template checks to ReadArray as well.
9 years ago
Lioncash 3ee4432fe3 file_util: Make IOFile data members private 9 years ago
MerryMage 226c5546e2 FileUtil: Missing #include, Add const to IOFile methods 9 years ago
archshift b3cfcf55ea Refactor ScanDirectoryTreeAndCallback to separate errors and retvals
ScanDirectoryTreeAndCallback, before this change, coupled error/return
codes and actual return values (number of entries found). This caused
confusion and difficulty interpreting the precise way the function
worked.

Supersedes, and closes #1255.
10 years ago
archshift 7134a17fc6 Split up FileUtil::ScanDirectoryTree to be able to use callbacks for custom behavior
Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively
to use the new ScanDirectoryTreeAndCallback function internally.
10 years ago
darkf e053d30bf7 Fix building under MinGW 10 years ago
Emmanuel Gil Peyrot fcdc8118eb Common: Remove the unused and commented GetThemeDir prototype from FileUtil. 10 years ago
Tony Wasserka 279e19732c FileUtil: Add a WriteObject method for writing a single, POD-type object. 10 years ago
Emmanuel Gil Peyrot 8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 10 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 10 years ago
Subv 71a063f45c Archives: Changed the way paths are built for the archives.
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
10 years ago
Subv 3bc9f5509b Archives: Change the folder layout of some archives.
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
10 years ago
Subv aade417b14 Archives: Reduced duplicate code in RomFS and SaveCheck.
Fixed a few warnings and cleaned up the code
10 years ago
Subv 2c89d4d5cd Archives: Implemented ExtSaveData and SharedExtSaveData
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively.
Also redirect some APT_A functions to their APT_U equivalents.
Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module.
Implemented formatting the savegame.
Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
10 years ago
purpasmart96 ebfd831ccb License change 11 years ago
Subv bec527fa24 SaveData: Implemented the SystemSaveData archive.
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
11 years ago
Subv ea9ce0fba7 Filesystem/Archives: Implemented the SaveData archive
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information

Got rid of the code duplication in File and Directory

Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.

FS_U: Use the correct error code when a file wasn't found
11 years ago
bunnei 5bac72282a Common: Add "sysdata" to GetUserPath and cleanup. 11 years ago
Rohit Nirmal 8a62423970 Change NULLs to nullptrs. 11 years ago
Emmanuel Gil Peyrot 739bb58c3a Remove tabs in all files except in skyeye imports and in generated GL code 11 years ago
bunnei a171000cbe Merge pull request #108 from archshift/config
Configuration files
11 years ago
archshift e6594f9f53 Added configuration file system.
Uses QSettings on citra-qt, and inih on citra-cli.
11 years ago
Emmanuel Gil Peyrot fbd72fd6bf Common: Add a helper function to generate a 8.3 filename from a long one.
Core: Fix the SDMC Directory implementation to make blargSnes work.
11 years ago
Lioncash ca2f0de08a Fix warnings in core and common 11 years ago
archshift 1966f7b0ad Use the citra user path for the sdmc directory 11 years ago
Emmanuel Gil Peyrot 6b7b36a874 Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions. 11 years ago
Emmanuel Gil Peyrot edaf59a759 Common: Return the number of items read/written in IOFile’s methods instead of a boolean. 11 years ago
archshift 5472fd4d9b Added string_util to common, small changes in loader.cpp 11 years ago
Lioncash 90e994471a Common: Move header guards over to pragma once
Also replaced C headers with the C++ equivalent ones
11 years ago
bunnei de0a034a84 fixed project includes to use new directory structure 11 years ago
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project 11 years ago