| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
These types are within the common library, so they should be within the
Common namespace.
|
|
|
|
| |
Amends it to add the 7.0.0+ CreateStrayLayer function.
|
|
|
|
|
|
|
| |
The NVFlinger service is already passed into services that need to
guarantee its lifetime, so the BufferQueue instances will already live
as long as they're needed. Making them std::shared_ptr instances in this
case is unnecessary.
|
|
|
|
|
|
|
| |
Converts many of the Find* functions to return a std::optional<T> as
opposed to returning the raw return values directly. This allows
removing a few assertions and handles error cases like the service
itself does.
|
|
|
|
|
| |
This was missed within #2075. Renames the member function to make it
consistent with the rest of the Find* functions.
|
|
|
|
|
| |
This more accurately describes what the function is actually attempting
to do (it's not a simple trivial getter).
|
|
|
|
|
|
|
|
|
|
| |
This appears to be a vestigial API function that's only kept around for
compatibility's sake, given the function only returns a success error
code and exits.
Since that's the case, we can remove the stubbed notification from the
log, since doing nothing is technically the correct behavior in this
case.
|
|\
| |
| | |
service/vi: Unstub IApplicationDisplayService's SetLayerScalingMode
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These values are not equivalent, based off RE. The internal value is put
into a lookup table with the following values:
[3, 0, 1, 2, 4]
So the values absolutely do not map 1:1 like the comment was indicating.
|
| |
| |
| |
| |
| |
| | |
Avoids entangling the IPC buffer appending with the actual operation of
converting the scaling values over. This also inserts the proper error
handling for invalid scaling values.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This appears to only check if the scaling mode can actually be
handled, rather than actually setting the scaling mode for the layer.
This implements the same error handling performed on the passed in
values.
|
|/
|
|
|
|
| |
Within the actual service, it makes no distinguishing between docked and
undocked modes. This will always return the constants values reporting
1280x720 as the dimensions.
|
|\
| |
| | |
service/vi: Minor updates and corrections to the DisplayInfo struct
|
| |
| |
| |
| |
| | |
Based off RE, it appears that almost all display types seem to use
1920x1080 except for a few (null display, edid display).
|
| |
| |
| |
| |
| |
| | |
It appears that the two members indicate whether a display has a bounded
number of layers (and if set, the second member indicates the total
number of layers).
|
|\ \
| | |
| | | |
service/vi: Implement OpenDefaultDisplay in terms of OpenDisplay
|
| |/
| |
| |
| |
| |
| | |
Internally within the vi services, this is essentially all that
OpenDefaultDisplay does, so it's trivial to just do the same, and
forward the default display string into the function.
|
| |
| |
| |
| |
| |
| |
| | |
This IPC command is simply a stub inside the actual service itself, and
just returns a successful error code regardless of input. This is likely
only retained in the service interface to not break older code that relied
upon it succeeding in some way.
|
|\ \
| | |
| | | |
service/vi: Log more information where applicable
|
| |/
| |
| |
| |
| |
| | |
In many cases, we didn't bother to log out any of the popped data
members. This logs them out to the console within the logging call to
provide more contextual information.
|
|/
|
|
| |
Gets rid of a few unnecessary header dependencies in some source files.
|
|\
| |
| | |
kernel: Divide Event into ReadableEvent and WritableEvent
|
| | |
|
| | |
|
|/
|
|
| |
Assert that it is not empty before using it in the DequeueBuffer wait callback.
|
| |
|
|\
| |
| | |
Report resolution scaling support for vi and am
|
| | |
|
| |
| |
| |
| | |
Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
|
|/
|
|
| |
Used by homebrew on exit. According to switchbrew, returns an empty response parcel with one zero in it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* get rid of boost::optional
* Remove optional references
* Use std::reference_wrapper for optional references
* Fix clang format
* Fix clang format part 2
* Adressed feedback
* Fix clang format and MacOS build
|
|
|
|
|
|
|
|
| |
* Implement VI ConvertScalingMode
* Fixed push enum
* Scale mode now uses Nintendo scale mode as an enum as well
|
|\
| |
| | |
Implement ISystemDisplayService::GetDisplayMode
|
| | |
|
| |
| |
| |
| | |
Due to keeping the code style consistent in the yuzu codebase. `rb = rp.MakeBuilder(...)` was replaced with `rb{ctx, ...}`
|
|\ \
| | |
| | | |
service/vi: Replace includes with forward declarations where applicable
|
| | | |
|
| |/
|/| |
|
|/
|
|
|
|
| |
Previously, these were sitting outside of the Kernel namespace, which
doesn't really make sense, given they're related to the Thread class
which is within the Kernel namespace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a destructor isn't defaulted into a cpp file, it can cause the use
of forward declarations to seemingly fail to compile for non-obvious
reasons. It also allows inlining of the construction/destruction logic
all over the place where a constructor or destructor is invoked, which
can lead to code bloat. This isn't so much a worry here, given the
services won't be created and destroyed frequently.
The cause of the above mentioned non-obvious errors can be demonstrated
as follows:
------- Demonstrative example, if you know how the described error happens, skip forwards -------
Assume we have the following in the header, which we'll call "thing.h":
\#include <memory>
// Forward declaration. For example purposes, assume the definition
// of Object is in some header named "object.h"
class Object;
class Thing {
public:
// assume no constructors or destructors are specified here,
// or the constructors/destructors are defined as:
//
// Thing() = default;
// ~Thing() = default;
//
// ... Some interface member functions would be defined here
private:
std::shared_ptr<Object> obj;
};
If this header is included in a cpp file, (which we'll call "main.cpp"),
this will result in a compilation error, because even though no
destructor is specified, the destructor will still need to be generated by
the compiler because std::shared_ptr's destructor is *not* trivial (in
other words, it does something other than nothing), as std::shared_ptr's
destructor needs to do two things:
1. Decrement the shared reference count of the object being pointed to,
and if the reference count decrements to zero,
2. Free the Object instance's memory (aka deallocate the memory it's
pointing to).
And so the compiler generates the code for the destructor doing this inside main.cpp.
Now, keep in mind, the Object forward declaration is not a complete type. All it
does is tell the compiler "a type named Object exists" and allows us to
use the name in certain situations to avoid a header dependency. So the
compiler needs to generate destruction code for Object, but the compiler
doesn't know *how* to destruct it. A forward declaration doesn't tell
the compiler anything about Object's constructor or destructor. So, the
compiler will issue an error in this case because it's undefined
behavior to try and deallocate (or construct) an incomplete type and
std::shared_ptr and std::unique_ptr make sure this isn't the case
internally.
Now, if we had defaulted the destructor in "thing.cpp", where we also
include "object.h", this would never be an issue, as the destructor
would only have its code generated in one place, and it would be in a
place where the full class definition of Object would be visible to the
compiler.
---------------------- End example ----------------------------
Given these service classes are more than certainly going to change in
the future, this defaults the constructors and destructors into the
relevant cpp files to make the construction and destruction of all of
the services consistent and unlikely to run into cases where forward
declarations are indirectly causing compilation errors. It also has the
plus of avoiding the need to rebuild several services if destruction
logic changes, since it would only be necessary to recompile the single
cpp file.
|
|
|
|
|
|
| |
It's undefined behavior to memcpy an object that isn't considered
trivially copyable, so put a compile-time check in to make sure this
doesn't occur.
|
|
|
|
|
|
|
| |
Allows avoiding unnecessary copies of the vector depending on the
calling code.
While we're at it, remove a redundant no-parameter base constructor call
|
|
|
|
|
| |
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
|
| |
|
|\
| |
| | |
Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
|
| |
| |
| |
| |
| | |
both SetLayerVisibility() functions used in Lego games, GetDisplayResolution()
fixed according switchbrew.org
|
|\ \
| | |
| | | |
service: Use nested namespace specifiers where applicable
|
| |/
| |
| |
| | |
Tidies up namespace declarations
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated ACC with more service names
* Updated SVC with more service names
* Updated set with more service names
* Updated sockets with more service names
* Updated SPL with more service names
* Updated time with more service names
* Updated vi with more service names
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This may break libnx homebrew due to a bug in libnx but is required by official games since they always assume that the buffer will be there.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- Another fix for libnx.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
vi::CreateStrayLayer : add padding to request
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
It is now created during Service initialization and passed to all the services that need it.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Fixes some cast warnings, partially fixes citra #3064
* Converted casts to uint32_t to u32
* Ran clang-format
|
| |
|
|\
| |
| | |
vi: Minor clean up/correctness changes
|
| |
| |
| |
| | |
Prevents implicit conversions.
|
| | |
|
|/
|
|
|
| |
Previously this would unnecessarily zero-initialize the vector before
copying the actual data into the vector instance.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This prevents missing frames if the vblank fires between the DequeueBuffer and Wait(vsync) calls
|
|
|
|
|
|
| |
NVFlinger will call into the nvdisp_disp0 device to perform screen flips, bypassing the ioctl interface.
We now have the address of the framebuffer to draw, we just need to actually put it on the screen.
|
|
|
|
|
|
| |
Don't try to draw buffers that the guest application is using, only queued buffers are eligible for drawing.
Drawing actual pixels is still not implemented.
|
| |
|
| |
|
| |
|
|
The homebrew display test application now properly writes graphics data to the graphics buffer but we still don't have a way to compose the display layers.
|