Commit graph

9 commits

Author SHA1 Message Date
archshift
3c48697ea3 Convert a few C stdlib asserts to Citra's own asserts 2015-02-18 21:52:36 -08:00
archshift
ef24e72b26 Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Subv
ca1a87ef7d ResultVal: Fixed compilation when reassigning a ResultVal. 2015-02-10 13:43:44 -02:00
Yuri Kunde Schlesner
09ae6e1fa3 Remove result.h InvalidHandle
It was only being used in two places, where it was replaced by a local
constant.
2015-01-30 11:49:45 -02:00
Yuri Kunde Schlesner
afc416c607 Additions to ResultVal to make it more convenient to use. 2015-01-30 11:47:02 -02:00
archshift
228843c43e Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance. 2015-01-10 14:32:10 -08:00
purpasmart96
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
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
2014-12-17 19:21:38 -05:00
Yuri Kunde Schlesner
c2588403c0 HLE: Revamp error handling throrough the HLE code
All service calls in the CTR OS return result codes indicating the
success or failure of the call. Previous to this commit, Citra's HLE
emulation of services and the kernel universally either ignored errors
or returned dummy -1 error codes.

This commit makes an initial effort to provide an infrastructure for
error reporting and propagation which can be use going forward to make
HLE calls accurately return errors as the original system. A few parts
of the code have been updated to use the new system where applicable.

One part of this effort is the definition of the `ResultCode` type,
which provides facilities for constructing and parsing error codes in
the structured format used by the CTR.

The `ResultVal` type builds on `ResultCode` by providing a container for
values returned by function that can report errors. It enforces that
correct error checking will be done on function returns by preventing
the use of the return value if the function returned an error code.

Currently this change is mostly internal since errors are still
suppressed on the ARM<->HLE border, as a temporary compatibility hack.
As functionality is implemented and tested this hack can be eventually
removed.
2014-11-24 17:08:36 -02:00