Lioncash
ed7f23ef32
partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
8 years ago
Lioncash
24fc1a425a
partition_filesystem, vfs_real: Use std::distance() instead of subtraction
This is a little bit more self-documenting on what is being done here.
8 years ago
Lioncash
785d86d181
vfs_offset: Simplify TrimToFit()
We can simply use std::clamp() here, instead of using an equivalent
with std::max() and std::min().
8 years ago
Lioncash
25510961ea
vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const reference
Given the data is intended to be directly written, there's no need to
take the std::vector by value and copy the data.
8 years ago
Lioncash
e523ab8b03
vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
8 years ago
Lioncash
556aaf9627
vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualified
These functions don't modify the data being pointed to, so these can be
pointers to const data
8 years ago
Subv
c1cc141fb0
Loader: Only print the module names and addresses if they actually exist.
8 years ago
Subv
196a689d20
CPU: Save and restore the TPIDR_EL0 system register on every context switch.
Note that there's currently a dynarmic bug preventing this register from being written.
8 years ago
bunnei
8333b9afd0
Merge pull request #743 from lioncash/view
logging: Use std::string_view where applicable
8 years ago
bunnei
a140792144
Merge pull request #745 from lioncash/package
param_package: Minor changes
8 years ago
Lioncash
f4047ccd48
arm_interface: Remove unused tls_address member of ThreadContext
Currently, the TLS address is set within the scheduler, making this
member unused.
8 years ago
Lioncash
604f780c9d
gl_shader_manager: Replace unimplemented function prototype
This was just a linker error waiting to happen.
8 years ago
Lioncash
d923d8f50c
gpu: Rename Get3DEngine() to Maxwell3D()
This makes it match its const qualified equivalent.
8 years ago
Lioncash
bdfd46e192
video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
8 years ago
bunnei
2a56f71e58
Merge pull request #742 from bunnei/misc-apm
apm: Improve stub for GetPerformanceConfiguration.
8 years ago
bunnei
2ddad964a7
Merge pull request #741 from lioncash/enum
ipc_helpers: Add PushEnum() member function to ResponseBuilder
8 years ago
Lioncash
633cba2848
arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
8 years ago
Lioncash
193e23b12f
arm_test_common: Make file static variable a member variable of the testing environment
Gets rid of file-static behavior.
8 years ago
Lioncash
c45b86bbb4
arm_test_common: Add missing header guard
8 years ago
Lioncash
a2e090303f
param_package: Take std::string by value in string-based Set() function
Allows avoiding string copies by letting the strings be moved into the
function calls.
8 years ago
Lioncash
3c613decdf
param_package: Use std::unordered_map's insert_or_assign instead of map indexing
This avoids a redundant std::string construction if a key doesn't exist
in the map already.
e.g.
data[key] requires constructing a new default instance of the value in
the map (but this is wasteful, since we're already setting something
into the map over top of it).
8 years ago
Lioncash
48ea3bc5fb
param_package: Get rid of file-static std::string construction
Avoids potential dynamic allocation occuring during program launch
8 years ago
Lioncash
e107471e08
logging/filter: Use std::string_view in ParseFilterString()
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.
We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
8 years ago
Lioncash
aa199be9d0
logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
8 years ago
Lioncash
943584ff42
logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
8 years ago
bunnei
1c43ebbdec
apm: Improve stub for GetPerformanceConfiguration.
8 years ago
Lioncash
9e7e0ed9f0
ipc_helpers: Add PushEnum() member function to ResponseBuilder
Allows pushing strongly-typed enum members without the need to always
cast them at the call sites.
Note that we *only* allow strongly-typed enums in this case. The reason
for this is that strongly typed enums have a guaranteed defined size, so
the size of the data being pushed is always deterministic. With regular
enums this can be a little more error-prone, so we disallow them.
This function simply uses the underlying type of the enum to determine
the size of the data. For example, if an enum is defined as:
enum class SomeEnum : u16 {
SomeEntry
};
if PushEnum(SomeEnum::SomeEntry); is called, then it will push a
u16-size amount of data.
8 years ago
bunnei
b82c160eff
Merge pull request #740 from Subv/acc_crash
HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
8 years ago
bunnei
91ea7e1bdd
Merge pull request #739 from lioncash/glad
externals: Update glad to version 0.1.25
8 years ago
bunnei
16888f7cb9
Merge pull request #738 from lioncash/sign
gl_state: Get rid of mismatched sign conversions in Apply()
8 years ago
bunnei
083b638e85
Merge pull request #737 from lioncash/move
filesys/loader: std::move VirtualFile instances in constructors where applicable
8 years ago
bunnei
059fa4330e
Merge pull request #736 from lioncash/null
audout_u/audren_u: Ensure null terminators are written out in ListAudioOutsImpl(), ListAudioDeviceName(), and GetActiveAudioDeviceName()
8 years ago
bunnei
e85b4f8c75
Merge pull request #735 from lioncash/video-unused
maxwell_3d: Remove unused variable within GetStageTextures()
8 years ago
bunnei
8774a9b207
Merge pull request #734 from lioncash/thread
thread: Convert ThreadStatus into an enum class
8 years ago
bunnei
70cd34a4a8
Merge pull request #733 from lioncash/dirs
partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
8 years ago
bunnei
52fcd2e880
Merge pull request #732 from lioncash/unused
nso: Minor changes
8 years ago
bunnei
133c99fb4a
Merge pull request #731 from lioncash/shadow
gl_shader_decompiler: Eliminate variable and declaration shadowing
8 years ago
Subv
34d18dac20
HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
And make IManagerForApplication::CheckAvailability always return false.
Returning a bogus id from GetAccountId causes games to crash on boot.
We should investigate this with a hwtest and either stub it properly or implement it.
8 years ago
Lioncash
d1c793d468
externals: Update glad to version 0.1.25
Keeps the OpenGL loader library up to date. Previously we were at
version 0.1.16
8 years ago
Lioncash
f53a9138bb
gl_state: Make references const where applicable in Apply()
8 years ago
Lioncash
80a916dc0a
gl_state: Get rid of mismatched sign conversions
While we're at it, amend the loop variable type to be the same width as
that returned by the .size() call.
8 years ago
Lioncash
c9b1340d3d
loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
8 years ago
Lioncash
02e5e6fba3
vfs_offset: std::move file and name parameters of OffsetVfsFile
Avoids potentially unnecessary atomic reference count incrementing and
decrementing, as well as string copying.
8 years ago
bunnei
66808c8489
Merge pull request #730 from lioncash/string
gl_shader_decompiler: Remove unnecessary const from return values
8 years ago
bunnei
280dd6eb26
Merge pull request #729 from lioncash/simplify
pl_u: Simplify WriteBuffer() calls in GetSharedFontInOrderOfPriority()
8 years ago
Lioncash
2ce4fde1ef
audren_u: Use a std::array instead of std::string for holding the audio interface/device name
std::string doesn't include the null-terminator in its data() + size()
range. This ensures that the null-terminator will also be written to the buffer
8 years ago
Lioncash
516bc05b15
audout_u: Use a std::array instead of std::string for holding the audio interface name
Uses a type that doesn't potentially dynamically allocate, and ensures
that the name of the interface is properly null-terminated when writing
it to the buffer.
8 years ago
Lioncash
10a91d9b9a
maxwell_3d: Remove unused variable within GetStageTextures()
8 years ago
Lioncash
059d0017f1
thread: Convert ThreadStatus into an enum class
Makes the thread status strongly typed, so implicit conversions can't
happen. It also makes it easier to catch mistakes at compile time.
8 years ago
Lioncash
3fbde66789
partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
This should be returned here, otherwise pfs_dirs is effectively only
ever added to, but never read.
8 years ago