Lioncash
910dff8816
software_keyboard: Resolve a pessimizing move warning
A std::vector created in place like this is already an rvalue and
doesn't need to be moved.
6 years ago
Lioncash
0c78ed16df
core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
6 years ago
Lioncash
8d7e58562f
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
6 years ago
Lioncash
78ddcbe3ba
General: Tidy up clang-format warnings part 2
6 years ago
Lioncash
80d04c0daa
common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.
While we're at it, we can also make the template match the requirements
of the standardized variant as well.
6 years ago
Lioncash
9e72b1df7d
system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
6 years ago
Lioncash
3ea31a9922
kernel: Remove unused variables
Resolves a few compiler warnings.
6 years ago
Lioncash
353cd8dc24
scheduler: Resolve sign conversion warning
6 years ago
Lioncash
792c1666f7
address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
6 years ago
Lioncash
43ef4a7305
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
6 years ago
Lioncash
08e30e0240
yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
6 years ago
Lioncash
78ff298d6d
service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
6 years ago
Lioncash
a1aab876e6
buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
6 years ago
Lioncash
9b1ab372a7
buffer_queue: Make use of designated initializers
6 years ago
Lioncash
5430961f0d
profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
6 years ago
Lioncash
1f909d614c
profile_manager: Make use of designated initializers
More compact code.
6 years ago
David Marcec
4d0ba04c73
sm: Make use of IsBaseOf for GetService
6 years ago
David
ecaac59acd
ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer ( #4465 )
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer
With the support of C++20, we can use concepts to deduce if a type is an STL container or not.
* More agressive concept for stl containers
* Add -fconcepts
* Move to common namespace
* Add Common::IsBaseOf
6 years ago
Morph
f6fa311cf9
minor nits
6 years ago
David Marcec
542ea8c6e8
am: Unstub SetScreenShotPermission
6 years ago
Morph
488cacca52
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
6 years ago
Morph
06adef078c
fs: Rename SaveDataDescriptor to SaveDataAttribute
6 years ago
ReinUsesLisp
87e6485855
service/bsd: Handle Poll with no entries accurately
Testing shows that Poll called with zero entries returns -1 and signals
an errno of zero.
6 years ago
ReinUsesLisp
853ee47a15
services/bsd: Implement most of bsd:s
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName,
GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom,
Send, SendTo, Write, and Close
The implementation was done referencing: SwIPC, switchbrew, testing
with libnx and inspecting its code, general information about bsd
sockets online, and analysing official software.
Not everything from these service calls is implemented, but everything
that is not implemented will be logged in some way.
6 years ago
ReinUsesLisp
20ac4ae8b7
service/sockets: Add worker pool abstraction
Manage worker threads with an easy to use abstraction.
We can expand this to support thread deletion in the future.
6 years ago
ReinUsesLisp
3cd68cade4
service/sockets: Add worker abstraction to execute blocking calls asynchronously
This abstraction allows executing blocking functions (like recvfrom on a
socket configured for blocking) without blocking the service thread.
It is intended to be used with SleepClientThread.
6 years ago
ReinUsesLisp
8a8f687fd2
service/sockets: Add translate functions
These functions translate from Network enumerations/structures to guest
enumerations/structures and viceversa.
6 years ago
ReinUsesLisp
c2a607014a
service/sockets: Add enumerations and structures
Add guest enumerations and structures used in socket services
6 years ago
ReinUsesLisp
bd466d12be
services/nifm: Implement GetCurrentIpAddress
This is trivially implemented using the Network abstraction
- Used by ftpd
6 years ago
bunnei
1bd1d08fc4
Update src/core/hle/service/nvdrv/devices/nvmap.cpp
Co-authored-by: LC <mathew1800@gmail.com>
6 years ago
Lioncash
7decda6bc2
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
6 years ago
CrazyMax
ac316a25a1
remove unused variable;
6 years ago
bunnei
991aca142e
hle: nvdrv: Rewrite of GPU memory management.
6 years ago
Lioncash
f35d0d8f83
nvflinger: Mark interface functions with return values as [[nodiscard]]
Not using the return value of these functions are undeniably the source
of a bug. This way we allow compilers to loudly make any future misuses
evident.
6 years ago
Lioncash
94ae1a0bf1
nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return
value of Lock() which is correct.
6 years ago
David Marcec
81b2b4fbe9
audio_core: Apollo Part 1, AudioRenderer refactor
6 years ago
David Marcec
56c3c62a45
vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
Needed for dark souls and monster hunter
6 years ago
David Marcec
87a838304b
Address issues
6 years ago
David Marcec
7ca5dcb7df
swkbd: Return result for Calc request for inlined swkbd
Fixes random swkbd popups in monster hunter
6 years ago
Lioncash
214247f203
mii/manager: Resolve sign mismatch warnings
Previously the loop termination condition was testing variables of
different signedness.
6 years ago
Lioncash
29a5f65f31
mii/manager: Make use of designated initializers
Allows returning the structure in a more concise manner.
6 years ago
Lioncash
e05eec5d51
kernel/thread: Remove unimplemented function prototype
This isn't used, so it can be removed.
6 years ago
Lioncash
3fe863c8f2
kernel: Remove unused variables
Resolves some compiler warnings in the Linux build.
6 years ago
Lioncash
0a5524a15b
kernel: Add missing include
6 years ago
Lioncash
02ff5e8d81
cpu_manager: Mark function getters as static
All these do are return std::function instances of static functions, so
these can be used without an instance of the CPU manager.
6 years ago
David Marcec
255847b16d
hid: Only update keyboard & debug pad inputs if enabled
Previously we would ignore this setting and would update the states regardless of the user setting
6 years ago
Morph
6bba209bba
Add comment to clarify the nullptr check
6 years ago
Morph
7f908ceb00
filesystem: Create subdirectories prior to creating a file
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within.
This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
6 years ago
Lioncash
56054fe86d
core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
6 years ago
Lioncash
9e113a2b67
core_timing: Make use of std::chrono with ScheduleEvent
6 years ago