Commit Graph

961 Commits

Author SHA1 Message Date
480d3aaf19 common: Port some changes from dolphin (#5127)
* IOFile: Make the move constructor and move assignment operator noexcept

Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.

* fix various instances of -1 being assigned to unsigned types

* do not assign in conditional statements

* File/IOFile: Check _tfopen_s properly

* common/file_util.cpp: address review comments

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-03-25 14:33:37 -05:00
016f8be0b8 core/dumping: Allow format/encoder selection+configuration
The ParamPackage got modified so that we can use range-based for on it
2020-02-27 16:55:10 +08:00
a487016cb4 core, citra_qt: Implement a save states file format and slot UI
10 slots are offered along with 'Save to Oldest Slot' and 'Load from Newest Slot'.

The savestate format is similar to the movie file format. It is called CST (Citra SavesTate), and is basically a 0x100 byte header (consisting of magic, revision, creation time and title ID) followed by Zstd compressed raw savestate data.

The savestate files are saved to the `states` folder in Citra's user folder. The files are named like `<Title ID>.<Slot ID>.cst`.
2020-02-18 13:19:52 +08:00
2217b3558d Fixed file services serialization 2020-02-13 17:42:10 +08:00
8abc5525be Added Signals; more runtime fixes 2020-02-13 17:42:09 +08:00
e4f05884c3 Fixed serialization runtime exceptions 2020-02-13 17:42:08 +08:00
996aba39fe Correct exports; add some file serialization; fix service base object serialization 2020-02-13 17:42:07 +08:00
f2de70c3fb Fix crash bugs 2020-02-13 17:42:06 +08:00
116d22d562 Refactor out the wakeup_callback function pointer 2020-02-13 17:42:05 +08:00
e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
65d96bf6c1 Changed u8* to MemoryRef 2020-02-13 17:42:00 +08:00
26e90a99cd Added basic UI; misc memory fixes 2020-02-13 17:41:27 +08:00
558e710e17 Finished archives; remove pod.h 2020-02-13 17:41:26 +08:00
2d2c7218ef Serialize CECD, CFG services 2020-02-13 17:41:25 +08:00
d041901a30 Some more CI fixes 2020-02-13 17:41:20 +08:00
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
6917eaf53b Use load_construct_data for kernel objects 2020-02-13 17:38:25 +08:00
5265c79056 APT service serialization 2020-02-13 17:38:21 +08:00
3fd5c431f1 Service serialization framework; done AC 2020-02-13 17:38:20 +08:00
ac0337d8df Started IPC services serialization 2020-02-13 17:38:19 +08:00
4f95575d41 Serialize some more kernel objects 2020-02-13 17:38:18 +08:00
8c81500dee Serialize kernel/hle/memory 2020-02-13 17:38:18 +08:00
f557d26b40 Added CPU, mutex, process, thread, timer 2020-02-13 17:38:16 +08:00
5035e68dad Added derived kernel objects 2020-02-13 17:38:15 +08:00
f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
45788b9c82 Added shader state serialization 2020-02-13 17:34:16 +08:00
6f00976ab5 video_core serialization 2020-02-13 17:34:16 +08:00
dc04774ece Added POD serialization 2020-02-13 17:27:51 +08:00
6940c99ed6 Added boost serialization 2020-02-13 17:27:50 +08:00
b53b4bfb17 Merge pull request #5062 from FearlessTobi/port-3173
Port yuzu-emu/yuzu#3173: "common: SPSCQueue: Notify after incrementing queue size."
2020-02-10 12:10:45 +08:00
e7a073e15f logging/backend: Change type of filename from string to const char*
This was suggested by degasus in https://github.com/yuzu-emu/yuzu/pull/3326 in order to avoid an unnecessary copy.
2020-01-28 14:29:26 +01:00
591c6a64d7 common: SPSCQueue: Notify after incrementing queue size. 2020-01-19 13:35:49 +01:00
e4285097f4 Merge pull request #5021 from ccawley2011/cpu_detect
common/cpu_detect: Remove unused functionality
2020-01-17 20:30:29 -07:00
43c9695bf9 Fix title bar 2020-01-15 23:52:41 -07:00
cf4125a6a5 Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
6945b6539f Address review and update zstd 2020-01-15 19:58:34 -07:00
be52d3a7d0 Add missing changes from yuzu file_util 2020-01-15 19:58:34 -07:00
b5b6ce5fdc Add shader cache version generation 2020-01-15 19:58:33 -07:00
8f67d6a444 Add ZSTD compression for precompiled cache 2020-01-15 19:58:33 -07:00
b3beff0f4c common/logging: don't use regex for path trimming 2019-12-24 14:19:18 -06:00
9a45d32a5f common/cpu_detect: Remove Common::CPUVendor
It's only used by telemetry, where the information it provides can be gained from the brand string.
2019-12-09 22:39:56 +00:00
bc5ad137c0 common/cpu_detect: Remove unused functionality 2019-12-09 22:36:32 +00:00
e6c7f84dc6 Merge pull request #4964 from citra-emu/wwylele-patch-1
unfold UNREACHABLE implementation for dumb compilers
2019-11-20 09:43:48 -07:00
30be149f87 common/logging: Silence no return value warnings 2019-11-19 16:47:35 +01:00
df99d98240 specify size of buffer and use openglstate in getteximageoes 2019-11-09 12:58:17 -07:00
a458155f99 texture dump hotkey (ctrl+d)
address more comments
2019-11-09 12:56:30 -07:00
ae4aaf2fc1 nested folder support + refuse to load incompatibly sized textures + general cleanups 2019-11-09 12:56:27 -07:00
5940361b81 new-line that clang-format didn't fix
address some comments
2019-11-09 12:56:17 -07:00
59b475a4b9 implement custom texture preload 2019-11-09 12:56:17 -07:00
6d90c42a79 fix crashes, add custom texture cache, load textures from load directory 2019-11-09 12:54:40 -07:00