Subv
c1b5369f60
Filesystem: Return EntryType::Directory for the root directory.
...
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
2018-07-19 13:11:09 -05:00
Lioncash
ebefc0f080
loader: Amend Doxygen comments
...
These weren't adjusted when VFS was introduced
2018-07-19 14:04:33 -04:00
Lioncash
71dc75b71e
loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
...
We should always assume the filesystem is volatile and check each IO
operation. While we're at it reorganize checks so that early-out errors
are near one another.
2018-07-19 12:43:21 -04:00
Lioncash
e664bf00ed
hle/service: Make constructors explicit where applicable
...
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
2018-07-19 12:25:02 -04:00
Lioncash
f31b335a27
nvflinger: Emplace Display instances directly
...
We can use emplace_back to construct the Display instances directly,
instead of constructing them separately and copying them, avoiding the
need to copy std::string and std::vector instances that are part of the
Display struct.
2018-07-19 11:50:12 -04:00
bunnei
280f1100b6
Merge pull request #703 from lioncash/const
...
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
2018-07-19 08:46:15 -07:00
bunnei
bdf9a9c044
Merge pull request #702 from lioncash/initialize
...
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
2018-07-19 08:45:54 -07:00
bunnei
a0c32fc161
Merge pull request #701 from lioncash/moving
...
content_archive: Minor changes
2018-07-19 08:41:42 -07:00
Lioncash
6b1043fab4
nvdrv: Take std::string by const reference in GetDevice()
...
This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
2018-07-19 11:40:36 -04:00
Lioncash
a52cb33af2
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
...
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.
Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
2018-07-19 11:10:16 -04:00
Lioncash
6fff93da5f
fsp_srv: Remove unnecessary vector construction in IFile's Write() function
...
We can avoid constructing a std::vector here by simply passing a pointer
to the original data and the size of the copy we wish to perform to the
backend's Write() function instead, avoiding copying the data where it's
otherwise not needed.
2018-07-19 11:01:07 -04:00
Lioncash
45e747beaa
fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function
...
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.
We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
2018-07-19 10:46:54 -04:00
bunnei
f15104730f
Merge pull request #699 from lioncash/vfs
...
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
2018-07-19 07:38:45 -07:00
Lioncash
043ab179b5
filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
...
Avoids unnecessary atomic reference count incrementing and decrementing
2018-07-19 10:34:11 -04:00
Lioncash
7ab5eb948c
filesystem: Use std::string's empty() function instead of comparing against a literal
...
This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
2018-07-19 10:32:23 -04:00
Lioncash
9dccecb6b0
filesystem: Remove pragma disabling global optimizations
...
This was just an artifact missed during PR review.
2018-07-19 10:30:53 -04:00
Lioncash
b9758eeb2f
fsp_srv: Make IStorage constructor explicit
...
Prevents implicit conversions.
2018-07-19 10:04:16 -04:00
Lioncash
c835e6f941
fsp_srv: Add missing includes
...
Gets rid of relying on indirect inclusions.
2018-07-19 10:03:17 -04:00
Lioncash
b4efdeb80b
fsp_srv: Resolve sign-mismatch warnings in assertion comparisons
2018-07-19 09:58:32 -04:00
Lioncash
106207e2ca
fsp_srv: Respect write length in Write()
...
Previously we were just copying the data whole-sale, even if the length
was less than the total data size. This effectively makes the
actual_data vector useless, which is likely not intended.
Instead, amend this to only copy the given length amount of data.
At the same time, we can avoid zeroing out the data before using it by
passing iterators to the constructor instead of a size.
2018-07-19 09:57:48 -04:00
bunnei
25c34badfa
Merge pull request #692 from lioncash/assign
...
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18 20:56:28 -07:00
bunnei
90042f35a5
Merge pull request #690 from lioncash/move
...
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18 20:55:55 -07:00
Lioncash
f92bb43138
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
...
This function doesn't alter class state.
2018-07-18 23:50:07 -04:00
Lioncash
a9b596c444
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
...
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.
While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
2018-07-18 23:45:22 -04:00
Lioncash
9eb43dc910
content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference
...
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
2018-07-18 23:19:28 -04:00
Lioncash
701bdfd753
content_archive: Add missing standard includes
2018-07-18 23:18:59 -04:00
Lioncash
bff53f234d
content_archive: std::move VirtualFile in NCA's constructor
...
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
2018-07-18 23:13:25 -04:00
Lioncash
47858aed98
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
...
We can just use a generic lambda to avoid writing the same thing twice.
2018-07-18 23:03:27 -04:00
bunnei
f6f77b403e
Merge pull request #691 from lioncash/guard
...
service/prepo: Add missing header guard
2018-07-18 19:46:14 -07:00
Lioncash
d0f53d27e0
loader/nro: Resolve sign mismatch warnings
2018-07-18 22:27:22 -04:00
Lioncash
b20bac710d
loader/nso: Remove unnecessary vector resizes
...
We can just initialize these vectors directly via their constructor.
2018-07-18 22:26:41 -04:00
Lioncash
0a48b45954
loader/nso: Resolve sign mismatch warnings
2018-07-18 22:26:37 -04:00
bunnei
6f120be510
Merge pull request #688 from lioncash/comma
...
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18 18:59:09 -07:00
bunnei
8387313266
Merge pull request #693 from lioncash/unused
...
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
2018-07-18 18:57:13 -07:00
bunnei
5ab4dc3e1e
Merge pull request #687 from lioncash/instance
...
core: Don't construct instance of Core::System, just to access its live instance
2018-07-18 18:55:58 -07:00
Zach Hilman
82150bd5c1
Virtual Filesystem 2: Electric Boogaloo ( #676 )
...
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
2018-07-18 18:07:11 -07:00
Lioncash
b7e7ddbdfc
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
2018-07-18 19:55:46 -04:00
Lioncash
76a9fc2f85
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
...
This was introduced within d12af72c8f
, and
considering there's no comment indicating that this is intentional, this
is very likely a bug.
2018-07-18 19:46:46 -04:00
Lioncash
26e188d074
service/prepo: Add missing header guard
2018-07-18 19:43:28 -04:00
Lioncash
81bf614695
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
...
Without these, this would perform concatenation, which is definitely not
what we want here.
2018-07-18 19:37:19 -04:00
Lioncash
b1b1c60009
core/memory, core/hle/kernel: Use std::move where applicable
...
Avoids pointless copies
2018-07-18 19:34:31 -04:00
Lioncash
74185c108e
core: Make System's default constructor private
...
This makes it a compilation error to construct additional instances of
the System class directly, preventing accidental wasteful constructions
over and over.
2018-07-18 18:18:27 -04:00
Lioncash
e72928762f
core: Don't construct instance of Core::System, just to access its live instance
...
This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.
These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
2018-07-18 18:18:27 -04:00
Zach Hilman
03480ff436
Fill in more fields in TouchScreenEntryTouch
2018-07-18 16:33:11 -04:00
Zach Hilman
25becb080e
Single touch support
2018-07-18 14:06:33 -04:00
bunnei
ad40c27409
vi: Change TransactionId::CancelBuffer to LOG_CRITICAL.
2018-07-17 22:47:35 -04:00
bunnei
3ff59a95d5
vi: Fix size for ListDisplays default display.
2018-07-17 22:18:14 -04:00
bunnei
42b866afc5
vi: Partially implement buffer crop parameters.
2018-07-17 20:13:17 -04:00
Zach Hilman
753d85fb0c
General Filesystem and Save Data Fixes ( #670 )
2018-07-17 12:42:15 -07:00
bunnei
5dde645197
Merge pull request #671 from MerryMage/clear-exclusive-state
...
scheduler: Clear exclusive state when switching contexts
2018-07-17 07:33:32 -07:00