Commit Graph

112 Commits (f98a2c42dee1a3c20f4a4e876069a32982395f05)

Author SHA1 Message Date
freiro 972b289c78 Removed /user/ from path 9 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
Anthony J. Bentley 26af2b644c common: convert to standard stat()/fstat() interfaces
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.

glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.

Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
9 years ago
Jan Beich 51f92f0e4e common: stat64 is non-standard, hide on a random Unix
src/common/file_util.cpp:79:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:79:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:99:19: error: variable has incomplete type 'struct stat64'
    struct stat64 file_info;
                  ^
src/common/file_util.cpp:99:12: note: forward declaration of 'stat64'
    struct stat64 file_info;
           ^
src/common/file_util.cpp:342:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:342:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
src/common/file_util.cpp:359:19: error: variable has incomplete type 'struct stat64'
    struct stat64 buf;
                  ^
src/common/file_util.cpp:359:12: note: forward declaration of 'stat64'
    struct stat64 buf;
           ^
4 errors generated.
9 years ago
Yuri Kunde Schlesner f120e78b56 Remove special rules for Windows.h and library includes 9 years ago
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 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
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Emmanuel Gil Peyrot 519e7013be Common: readdir_r() is deprecated, switch to readdir(). 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
bunnei 6d29c20208 Merge pull request #1672 from wwylele/win-driver-fix
Fix driver root identification on Windows
9 years ago
wwylele 43b6cbd762 fix driver root identification on Windows 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
LFsWang 87afef73b1 remove debug code 9 years ago
LFsWang be01912539 fix unicode url problem on windows 9 years ago
LFsWang acfa76aa38 Fix encode problem On Windows 9 years ago
Subv 922b31ebbd DiskDirectory: Initialize the directory member with valid info. 9 years ago
LFsWang 8376821776 Add missing return values in ForeachDirectoryEntry
ForeachDirectoryEntry is changed by #1256 ,but return value at last line
was missing.
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
bunnei 11a64acf23 Merge pull request #1095 from archshift/game-list
Initial implementation of a game list
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
Lioncash 751fbfdcc3 general: Silence some warnings when using clang 10 years ago
Emmanuel Gil Peyrot 8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 10 years ago
Emmanuel Gil Peyrot b1503b2020 Remove every trailing whitespace from the project (but externals). 10 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 10 years ago
Yuri Kunde Schlesner f3c096951b Common: Move IO-specific compatibility macros to file_util.cpp 10 years ago
Yuri Kunde Schlesner bf12f270b3 Common: Remove many unnecessary cross-platform compatibility macros 10 years ago
Emmanuel Gil Peyrot 129ad721c1 Common: Switch to the XDG Base Directory Specification for directory selection.
This allows for easily movable and independent configuration and data directories, using standardized paths.
10 years ago
Emmanuel Gil Peyrot 54d6f6c82b Common: Change names containing “Dolphin” or “PPSSPP” to something more generic. 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 10 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.
10 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
10 years ago
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 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 f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 11 years ago
bunnei ce8390ac03 Merge pull request #133 from archshift/sdmc-enabled
Use config files to store whether SDMC is enabled or not, auto-create SDMC dir.
11 years ago
Yuri Kunde Schlesner b75ac24391 Use std sized types instead of platform specific typedefs 11 years ago
archshift a7c7946867 Common: Return from CreateFullPath early if the directory creation fails 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
bunnei 532a9e80a0 Merge pull request #99 from archshift/ext-check
loader.cpp: improved file extension checking, made Upper/LowerStr useful, moved string_util into Common namespace
11 years ago
archshift 9d7cc2bedc common: Prune all redundant includes 11 years ago
archshift 5472fd4d9b Added string_util to common, small changes in loader.cpp 11 years ago
Lioncash da6f24b374 Common: Move remaining C header includes over to their C++ equivalent 11 years ago
bunnei 7a136b8a84 fixes to build on linux 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