Commit Graph

14042 Commits (9f6892271f3903baa2680eef9c5497f878a69de5)

Author SHA1 Message Date
bunnei 5cc2f99fab
Merge pull request #4490 from lioncash/arbiter
address_arbiter/scheduler: Resolve sign conversion warnings
5 years ago
Lioncash 61cd7eb47d freezer: Move entry finding to its own function
Cleans up the callsites in other functions.
5 years ago
Lioncash 06ab28263b freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial
primitive alias by reference.
5 years ago
Lioncash 253a17451b freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
5 years ago
Lioncash 5b89291308 cheat_engine: Resolve implicit bool->u64 conversion
We can just return zero here.
5 years ago
Lioncash df96a214ae cheat_engine: Make use of designated initializers
Same behavior, but makes the member being assigned obvious.
5 years ago
Lioncash 4f2acc54f5 partition_data_manager: Update master key hashes
Fills in some hashes that were previously unhandled.
5 years ago
Lioncash 7f0f37fca7 partition_data_manager: Make data arrays constexpr
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().

This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.

To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
5 years ago
Lioncash 04bb47f57f partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is
coming from.
5 years ago
Lioncash 09f884b7bd aes_util: Make use of non-template variant of Transcode
Same behavior, less template instantiations.
5 years ago
comex d37f0b29e2 Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
5 years ago
bunnei 1cc0e4b4d8
Merge pull request #4489 from lioncash/typesafe
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
5 years ago
bunnei 35c1607f23
Merge pull request #4484 from lioncash/aesutil
aes_util: Allow SetIV() to be non-allocating
5 years ago
bunnei d888ac7d20
Merge pull request #4477 from lioncash/log-desig
logging/backend: Make use of designated initializers
5 years ago
Jan Beich 238208ee30 common/virtual_buffer: drop unused includes
On DragonFly and NetBSD build fails with

src/common/virtual_buffer.cpp
src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
5 years ago
bunnei 61678c4e9f
Merge pull request #4475 from lioncash/bqueue
buffer_queue: Make use of designated initializers/std::nullopt where applicable
5 years ago
bunnei e8868c2ed1
Merge pull request #4479 from lioncash/concepts
CMakeLists: Resolve #4478
5 years ago
Lioncash 87c64c41d2 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.
5 years ago
Lioncash a10d64ea79 kernel: Remove unused variables
Resolves a few compiler warnings.
5 years ago
Lioncash 9893da8e2c scheduler: Resolve sign conversion warning 5 years ago
Lioncash 1a45b15a8c address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
5 years ago
bunnei 4a2d9c6454
Merge pull request #4444 from lioncash/volatile
common/atomic_ops: Don't cast away volatile from pointers
5 years ago
Lioncash a77ee63f65 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.
5 years ago
Lioncash 0a5456feb9 vfs_vector: Make creation of array vfs files less verbose
We can add a helper function to make creation of these files nicer.
While we're at it, we can eliminate an unnecessary std::array copy in
the constructor. This makes the overhead on some of these functions way
less intensive, given some arrays were quite large.

e.g. The timezone location names are 9633 bytes in size.
5 years ago
bunnei 07691f994a
Merge pull request #4466 from ogniK5377/loader-type-safe
loader: Make IdentifyFile typesafe
5 years ago
Morph cf946312ca main: Fallback to loader if no control nca is found with patch manager
In some rare instances, the patch manager is not able to find a control nca, fallback to the previous method of parsing a control nca through the loader if this occurs.
5 years ago
Morph 1146049de0 main: Fix Open Save/Mod Locations for installed titles
Previously NAND/SDMC installed titles would open device saves when they are supposed to be user saves. This is due to the control nca not being read and thus returns 0 for both GetDefaultNormalSaveSize() and GetDeviceSaveDataSize(). Fix this by utilizing the patch manager to read the control nca.
5 years ago
Morph 123024cea2 game_list_worker: Do not clear entries when > 1 gamedir is present
Previously the map of entries was being cleared while looping through each game directory, this resulted into all game directories except the last game dir to lose content metadata information. Fix this by clearing the entries only once.
5 years ago
bunnei 142930e609
Merge pull request #4476 from lioncash/tz
time_zone_binary: Make use of designated initializers
5 years ago
bunnei ba9ed7b1fe
Merge pull request #4401 from ogniK5377/GetIndirectLayerImageRequiredMemoryInfo
vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
5 years ago
bunnei f11628b9b7
Merge pull request #4430 from bunnei/new-gpu-vmm
hle: nvdrv: Rewrite of GPU memory management.
5 years ago
bunnei efd1b57d03
Merge pull request #4445 from Morph1984/async-threads
renderer_opengl: Use 1/4 of all threads for async shader compilation
5 years ago
bunnei c71d05de84
Merge pull request #4450 from Morph1984/fix-gamelist-scanning
game_list_worker: Fix game list subdirectory scanning
5 years ago
bunnei ecbee11829
Merge pull request #4472 from lioncash/const-get
perf_stats: Mark GetMeanFrametime() as const
5 years ago
bunnei 0ae267bf77
Merge pull request #4469 from lioncash/missing
vk_texture_cache: Silence -Wmissing-field-initializer warnings
5 years ago
David 741cbbdc0e
Merge pull request #4470 from lioncash/qualifier
patch_manager: Resolve -Wignored-qualifier warnings
5 years ago
David 723314b682
Merge pull request #4481 from lioncash/cpp-dep
yuzu: Resolve C++20 deprecation warnings related to lambda captures
5 years ago
David 25fb7cd16d
Merge pull request #4474 from lioncash/hle-profile
profile_manager: Make use of designated initializers
5 years ago
bunnei c6e5a36452
Merge pull request #4473 from lioncash/cheat-desig
dmnt_cheat_vm: Make use of designated initializers
5 years ago
bunnei 0dbb95c42d
Merge pull request #4456 from Morph1984/stub-really-long-fs-func
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
5 years ago
Lioncash 15660bd857 aes_util: Allow SetIV to be non-allocating
In a few places, the data to be set as the IV is already within an array.
We shouldn't require this data to be heap-allocated if it doesn't need
to be. This allows certain callers to reduce heap churn.
5 years ago
bunnei b2911421ec
Merge pull request #4480 from lioncash/optimize
tests/core_timing: Remove pragma optimize(off)
5 years ago
bunnei 9808f244cc
Merge pull request #4482 from lioncash/ldr-sign
service/ldr: Resolve sign mismatch warnings
5 years ago
bunnei a971667d1f
Merge pull request #4468 from lioncash/regcache
registered_cache: Resolve -Wmaybe_uninitialized warnings
5 years ago
bunnei 94c1689ef3
Merge pull request #4471 from ogniK5377/sm-getservice-concept
sm: Make use of IsBaseOf for GetService
5 years ago
Lioncash 570150bc86 perf_stats: Make use of designated initializers
Same behavior, but allows us to avoid a now-unnecessary zero
initialization.
5 years ago
Lioncash d767be65be perf_stats: Mark GetMeanFrametime() as const
The general pattern is to mark mutexes as mutable when it comes to
matters of constness, given the mutex acts as a transient member of a
data structure.
5 years ago
Lioncash 06809ad7bc vulkan: Silence more -Wmissing-field-initializer warnings 5 years ago
Lioncash b249e4e0ce 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.
5 years ago
Lioncash f525da56e5 service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
5 years ago
Lioncash dd2ff23621 CMakeLists: Resolve #4478
This switch is enabled by default in all recent versions of GCC and
Clang.
5 years ago
Lioncash e1ab72a0ea tests/core_timing: Remove pragma optimize(off)
I made a review comment about this in the PR that this was introduced
in (#3955, commit 71c4779211), but it
seems to have been missed.

We shouldn't be using this pragma here because it's MSVC specific. This
causes warnings on other compilers.

The test it's surrounding is *extremely* dubious, but for the sake of
silencing warnings on other compilers, we can mark "placebo" as volatile
and be on with it.
5 years ago
bunnei 3697fc8d14
Merge pull request #4467 from lioncash/mode
file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
5 years ago
Lioncash 04ca1ed2bd time_zone_binary: Make use of designated initializers 5 years ago
Lioncash 8725b37a35 logging/backend: Make use of designated initializers
Same behavior, less code.
5 years ago
Lioncash 9b837c6069 buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
5 years ago
Lioncash 24bd068a08 buffer_queue: Make use of designated initializers 5 years ago
Lioncash b9831fd80a profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
5 years ago
Lioncash 3fcaf937d2 profile_manager: Make use of designated initializers
More compact code.
5 years ago
Lioncash c883666045 dmnt_cheat_vm: Make use of designated initializers
Allows for more compact code.
5 years ago
Lioncash 2b8ae009a0 file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
Same behavior, minus a hand-rolled operator.
5 years ago
David Marcec 6a0b77996b sm: Make use of IsBaseOf for GetService 5 years ago
Lioncash 1c6d3ba397 patch_manager: Resolve -Wignored-qualifier warnings
Top level const will always be ignored in this case, so it can be
removed.
5 years ago
Lioncash 4ca0014479 registered_cache: Resolve -Wmaybe_uninitialized warnings
While we're at it, we can avoid a redundant map lookup.
5 years ago
David Marcec a5af1161c9 Place in anonymous namespace 5 years ago
David Marcec 6cfff2c3f6 loader: Make IdentifyFile typesafe
Relies on #4465 for concept.h Common::IsBaseOf
5 years ago
David 9b75481755
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
5 years ago
David 6c7292de33
Merge pull request #4263 from lat9nq/fix-screencaps-2
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
5 years ago
David 0ca42c806f
Merge pull request #4439 from lioncash/cpu
cpu_manager: Remove redundant std::function declarations
5 years ago
David 50d8264833
Merge pull request #4438 from lioncash/localizing
yuzu/main: Remove redundant usages of QStringLiteral("")
5 years ago
Morph fc86cb4ca2 minor nits 5 years ago
David Marcec e586921c28 am: Unstub SetScreenShotPermission 5 years ago
Morph 1241020093 fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
5 years ago
Morph 45fd67c109 fs: Rename SaveDataDescriptor to SaveDataAttribute 5 years ago
David 0c262f8ac2
Merge pull request #4392 from lioncash/guard
compatible_formats: Add missing header guard
5 years ago
bunnei 4c0f6f1bc8
Merge pull request #4396 from lioncash/comma
surface_params: Replace questionable usages of the comma operator with semicolons
5 years ago
Morph e0d02d032b game_list_worker: Fix game list subdirectory scanning
Oddly enough the scan that feeds the manual content provider is hardcoded to scan 2 nested directories deep.
This effectively rendered the scan subdirectories setting useless as the manual content provider cannot find any games located more than 2 nested directories deep.
Furthermore, this behavior causes game files to be picked up by the manual content provider even if scan subdirectories is disabled.

FIx this by utilizing the behavior described when populating the game list for populating the content provider.
5 years ago
Morph e59d17167d main: Add support for removing SDMC installed titles 5 years ago
Morph ed46f3c62a xts_archive: Check if the file is nullptr prior to parsing
Fixes an access violation where the file no longer exists at the specified path while being parsed.
5 years ago
Morph 2ec852dd9f registered_cache: Add support for removing folder ncas 5 years ago
Morph b317942131 game_list: Limit context menu options for homebrew
Hides the following options when the title id is 0:
- Open Save Location
- Open Mod Data Location
- Open Transferable Shader Cache
- All removal options except Remove Custom Configuration
5 years ago
Morph cd814bfdfe main: Remove assert for opening savedata when program_id = 0 5 years ago
Morph f78e44762a main: Silence [[fallthrough]] warning 5 years ago
Morph ef02370816 main: Split removal cases into their individual functions and address feedback 5 years ago
Morph 85e1facfe6 main: Connect game list remove signals to removal functions 5 years ago
Morph de6b852dc2 game_list: Add "Remove" context menu
Adds the following actions:
- Remove Installed Update
- Remove All Installed DLC
- Remove Shader Cache
- Remove Custom Configuration
- Remove All Installed Contents
5 years ago
bunnei b205b12e75
Merge pull request #4442 from lioncash/devicemem
device_memory: Remove unused system member
5 years ago
Morph 8d42456dc2 configure_graphics: Remove Force 30 FPS mode
The introduction of multicore rendered this setting non-functional as timing code was changed.

This removes the setting entirely.
5 years ago
Morph e8f22730d1 renderer_opengl: Use 1/4 of all threads for async shader compilation 5 years ago
Lioncash e3f0c93230 common/atomic_ops: Don't cast away volatile from pointers
Preserves the volatility of the pointers being casted.
5 years ago
ReinUsesLisp bc699ace15 service/bsd: Handle Poll with no entries accurately
Testing shows that Poll called with zero entries returns -1 and signals
an errno of zero.
5 years ago
ReinUsesLisp f7d59f3e0e 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.
5 years ago
ReinUsesLisp 2c67bbf609 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.
5 years ago
ReinUsesLisp 5692c48ab7 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.
5 years ago
ReinUsesLisp 80b4bd3583 service/sockets: Add translate functions
These functions translate from Network enumerations/structures to guest
enumerations/structures and viceversa.
5 years ago
ReinUsesLisp 22263ccaa4 service/sockets: Add enumerations and structures
Add guest enumerations and structures used in socket services
5 years ago
ReinUsesLisp ef8acc9c3d services/nifm: Implement GetCurrentIpAddress
This is trivially implemented using the Network abstraction

- Used by ftpd
5 years ago
Lioncash 2258f33ee4 device_memory: Remove unused system member
This isn't used by anything in particular, so it can be removed.
5 years ago
Lioncash 989ad52dc1 cpu_manager: Remove redundant std::function declarations
We can just return the function directly. Making for less reading.
5 years ago
bunnei db94457205
Update src/core/hle/service/nvdrv/devices/nvmap.cpp
Co-authored-by: LC <mathew1800@gmail.com>
5 years ago
Lioncash a7af349dae 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.
5 years ago
Lioncash 2e303095d5 yuzu/main: Remove redundant usages of QStringLiteral("")
An empty QStringLiteral can more efficiently be replaced with an empty
QString.
5 years ago
bunnei 6b35317ff3
Merge pull request #4419 from lioncash/initializer
vulkan: Resolve -Wmissing-field-initializer warnings
5 years ago
bunnei f97c2cdd0b
Merge pull request #4434 from CrazyMax/lang_unused_var
AM: GetDesiredLanguage: remove unused variable
5 years ago
Rodrigo Locatti d51afc4efb
Merge pull request #4432 from bylaws/patch-1
video_core/gpu: Correct the size of the puller registers
5 years ago
CrazyMax 1ffff4dab2 remove unused variable; 5 years ago
bunnei 99d191d80d
Merge pull request #4431 from kelnos/fix-exit-crash
GCAdapter: only join worker thread if running & joinable
5 years ago
Brian J. Tarricone d840ed90e1 GCAdapter: only join worker thread if running & joinable 5 years ago
Billy Laws f490b4545d
video_core/gpu: Correct the size of the puller registers
The puller register array is made up of u32s however the `NUM_REGS` value is the size in bytes, so switch it to avoid making the struct unnecessary large. Also fix a small typo in a comment.
5 years ago
lat9nq 156bf5b297 config: Make the save-as identifier more consistent
Solves an issue with restoring the value upon reloading program.
5 years ago
bunnei 08f02836d8
Merge pull request #4426 from lioncash/lock
nvflinger: Use return value of Lock()
5 years ago
bunnei 4524e1bd54
Merge pull request #4418 from lioncash/udp-warn
udp/client: Remove unused boost include
5 years ago
bunnei 05def61398 hle: nvdrv: Rewrite of GPU memory management. 5 years ago
bunnei 45cf48bd0a
Merge pull request #4415 from lioncash/maybe
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
5 years ago
bunnei b69f902b18
Merge pull request #4417 from lioncash/poll
gc_adapter/gc_poller: Resolve compiler warnings
5 years ago
FearlessTobi 35b96a28d7 yuzu/configure_debug: Remove duplicated checkboxes
Those are already found in the Filesystem tab.
They were added back to the Debug tab by mistake in the Vulkan PR.
5 years ago
Lioncash 7b070bbf62 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.
5 years ago
Lioncash 5dab23e017 nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return
value of Lock() which is correct.
5 years ago
bunnei a2e1810287
Merge pull request #4350 from ogniK5377/hid-update-connected
hid: Only update keyboard & debug pad inputs if enabled
5 years ago
LC e3503de588
common/string_util: Remove unimplemented function prototype (#4414)
This function was relocated to log.h as a constexpr function, so this
can be removed.
5 years ago
Lioncash 80eedff9e1 vulkan: Resolve -Wmissing-field-initializer warnings 5 years ago
Lioncash 1a7cf26884 udp/client: Remove unused boost include
Also silences a deprecation warning from boost on Clang/GCC.
5 years ago
Lioncash ac7e4e2cab gc_adapter: Resolve C++20 deprecation warning 5 years ago
Lioncash 04699c366b gc_poller: Resolve -Wsign-compare warning 5 years ago
Lioncash e19972dfc4 gc_poller: Resolve -Wredundant-move warning 5 years ago
Lioncash 2e511246fa lz4_compression: Make use of std::span in interfaces
Allows compressing the data and size parameters into one.
5 years ago
Lioncash c5bdccfecb zstd_compression: Make use of std::span in interfaces
Allows condensing the data and size parameters into a single argument.
5 years ago
Lioncash ca6ff01333 virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
This isn't used on Windows, but is used on non-Windows operating
systems.
5 years ago
bunnei d046e9b458
Merge pull request #4380 from ogniK5377/swkbd-inline-1
swkbd: Return result for Calc request for inlined swkbd
5 years ago
bunnei dc2d31b1b2
Merge pull request #4393 from lioncash/unused5
vk_rasterizer: Remove unused variable in Clear()
5 years ago
bunnei c73701edea
Merge pull request #4377 from Morph1984/dark-themes
qt-themes: Add Midnight Blue qdarkstyle theme (2.8.1)
5 years ago
bunnei 2ed8f3f549
Merge pull request #4334 from lat9nq/clear-per-game-settings
configure_per_game: Clearer per-game settings
5 years ago
bunnei d488cb843e
Merge pull request #4388 from lioncash/written
buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()
5 years ago
bunnei f650cf8a9a
Merge pull request #4391 from lioncash/nrvo
video_core: Allow copy elision to take place where applicable
5 years ago
bunnei 1d7de0a8ee
Merge pull request #4394 from lioncash/unused6
video_core: Remove unused variables
5 years ago
bunnei 5ac91a6c7a
Merge pull request #4353 from ameerj/gc-refactor
gc_adapter: Refactor code
5 years ago
Jan Beich f99be1c923 network: add missing include for BSDs
src/core/network/network.cpp:112:28: error: use of undeclared identifier 'SHUT_RD'
constexpr int SD_RECEIVE = SHUT_RD;
                           ^
src/core/network/network.cpp:113:25: error: use of undeclared identifier 'SHUT_WR'
constexpr int SD_SEND = SHUT_WR;
                        ^
src/core/network/network.cpp:114:25: error: use of undeclared identifier 'SHUT_RDWR'
constexpr int SD_BOTH = SHUT_RDWR;
                        ^
src/core/network/network.cpp:120:37: error: unknown type name 'in_addr'; did you mean 'in_addr_t'?
constexpr IPv4Address TranslateIPv4(in_addr addr) {
                                    ^~~~~~~
                                    in_addr_t
/usr/include/netdb.h:66:20: note: 'in_addr_t' declared here
typedef __uint32_t      in_addr_t;
                        ^
src/core/network/network.cpp:121:27: error: member reference base type 'in_addr_t' (aka 'unsigned int') is not a structure or union
    const u32 bytes = addr.s_addr;
                      ~~~~^~~~~~~
src/core/network/network.cpp:121:15: error: variables defined in a constexpr function must be initialized
    const u32 bytes = addr.s_addr;
              ^
src/core/network/network.cpp:126:10: error: incomplete result type 'sockaddr' in function definition
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
         ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:127:5: error: unknown type name 'sockaddr_in'; did you mean 'sockaddr'?
    sockaddr_in result;
    ^~~~~~~~~~~
    sockaddr
/usr/include/netdb.h:142:9: note: 'sockaddr' declared here
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:127:17: error: variable has incomplete type 'sockaddr'
    sockaddr_in result;
                ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:131:29: error: use of undeclared identifier 'AF_INET'
        result.sin_family = AF_INET;
                            ^
src/core/network/network.cpp:135:29: error: use of undeclared identifier 'AF_INET'
        result.sin_family = AF_INET;
                            ^
src/core/network/network.cpp:139:23: error: use of undeclared identifier 'htons'
    result.sin_port = htons(input.portno);
                      ^
src/core/network/network.cpp:143:14: error: variable has incomplete type 'sockaddr'
    sockaddr addr;
             ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:156:1: error: unknown type name 'linger'
linger MakeLinger(bool enable, u32 linger_value) {
^
src/core/network/network.cpp:157:5: error: unknown type name 'linger'
    linger value;
    ^
src/core/network/network.cpp:185:16: error: use of undeclared identifier 'AF_INET'
        return AF_INET;
               ^
src/core/network/network.cpp:195:16: error: use of undeclared identifier 'SOCK_STREAM'
        return SOCK_STREAM;
               ^
src/core/network/network.cpp:197:16: error: use of undeclared identifier 'SOCK_DGRAM'
        return SOCK_DGRAM;
               ^
src/core/network/network.cpp:207:16: error: use of undeclared identifier 'IPPROTO_TCP'
        return IPPROTO_TCP;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 years ago
David Marcec 8abb31a19d vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
Needed for dark souls and monster hunter
5 years ago
Rodrigo Locatti 7278c59d70
Merge pull request #4359 from ReinUsesLisp/clamp-shared
renderer_{opengl,vulkan}: Clamp shared memory to host's limit
5 years ago
Rodrigo Locatti 721e6015a8
Merge pull request #4360 from ReinUsesLisp/glasm-bar
gl_arb_decompiler: Execute BAR even when inside control flow
5 years ago
Rodrigo Locatti 9ea9a60e17
Merge pull request #4361 from ReinUsesLisp/lane-id
decode/other: Implement S2R.LaneId
5 years ago
Lioncash 82b7e5c8ee surface_params: Make use of designated initializers where applicable
Provides a convenient way to avoid unnecessary zero initializing.
5 years ago
Lioncash bd9545a3a8 surface_params: Remove redundant assignment
This is a redundant assignment that can be removed.
5 years ago
Lioncash c705a1db96 surface_params: Replace questionable usages of the comma operator with semicolons
These are bugs waiting to happen.
5 years ago
David e9bfe05e04
Merge pull request #4306 from ReinUsesLisp/bsd-network
core/network: Add network abstraction
5 years ago
Lioncash e17fb5ee97 video_core: Remove unused variables
Silences several compiler warnings about unused variables.
5 years ago
Lioncash 4b369126c4 vk_rasterizer: Remove unused variable in Clear()
The relevant values are already assigned further down in the lambda, so
this can be removed entirely.
5 years ago
Lioncash 059305a6bf compatible_formats: Add missing header guard
Prevents potential inclusion issues from occurring.
5 years ago
Lioncash 6adc824d9d video_core: Allow copy elision to take place where applicable
Removes const from some variables that are returned from functions, as
this allows the move assignment/constructors to execute for them.
5 years ago
bunnei 3d13d7f48f
Merge pull request #4324 from ReinUsesLisp/formats
video_core: Fix, add and rename pixel formats
5 years ago
lat9nq e35239b861 configure_ui: Ensure a separator follows the returned path 5 years ago
lat9nq 19250aadee configure_ui: don't use an empty string
If the user had cancelled, it would clear the text box. That behavior was sanitized underneath, but may anyways cause inconveniences.
5 years ago
lat9nq 599b7c26a9 main: Don't use as many string copies
Co-Authored-By: LC <lioncash@users.noreply.github.com>
5 years ago
lat9nq a723ed31fd main: rewrite (save as) screenshot saving
This picks a default directory and file name. If on Windows and save-as screenshot saving is enabled, it asks the user, first defaulting to the default screenshot path, and with a default filename in the format `[title_id]_[year-mt-dy_hr-mn-sc-msc].png`. Otherwise, or on Linux for now, it simply saves a file in that directory with that file name.
5 years ago
lat9nq 71b902cf62 configuration: Setup UI to config screenshot path and saving
This adds two options to the General -> UI tab. The first disables picking a place to save the file. The second chooses a default directory for saving screenshots.
5 years ago
lat9nq 3848155c42 common: Add a screenshots directory
Adds a screenshots directory as a path managed by FileUtil.
5 years ago
David Marcec dd4a02d15c video_core: Remove redundant pixel format type
We already get the format type before converting shadow formats and during shadow formats.
5 years ago
bunnei 61e4c0f83d
Merge pull request #4168 from ReinUsesLisp/global-memory
gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
5 years ago
Lioncash 26c6c71837 buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()
We can make use of emplace()'s return value to determine whether or not
we need to perform an increment.

emplace() performs no insertion if an element already exist, so this can
eliminate a find() call.
5 years ago
Morph d942472cce wait_tree: Include Midnight Blue dark themes 5 years ago
James Rowe 7e01311061 qt-themes: Add Midnight Blue qdarkstyle theme (2.8.1)
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
5 years ago
David Marcec 8248d76964 Address issues 5 years ago
lat9nq 2120740ee6 configure_graphics_advnaced: clang-format mk ii 5 years ago
lat9nq 23347b8869 configure_graphics_advanced: Fix oversight from rebase 5 years ago
lat9nq 520b4c7829 configuration_shared: Remove unused functions
These were only kept for compatibility with old code during testing.
5 years ago
lat9nq 3ef4769f31 configuration: Use forward declares and remove extraneous structs 5 years ago
lat9nq 335aef78c4 configuration_shared: Make CheckState strongly typed
Also gets rid of unnecessary explicit namespace usage.
5 years ago
lat9nq 55ac28769a clang-format 5 years ago
lat9nq 0d462f5608 configuration_shared: Break up tracker structs to respective classes
One less global variable.
5 years ago
lat9nq e483ed21eb configure_system: break instead of semicolon
Makes the code more readable

Co-Authored-By: LC <lioncash@users.noreply.github.com>
5 years ago
lat9nq d5fdbd88c8 clang-format 5 years ago
lat9nq 33a9218f35 configure_system: Highlight labels on startup
whoops
5 years ago
lat9nq 90a0fb1e0e configure_graphics: Fix layout in global config
Fixes a regression where the global config takes up a lot of extra space.
5 years ago
lat9nq c94a8a3a43 configure_per_game: Improve style consistency
The way the configurations are set up, it is not trivial to do this. I'll leave it as is, but the API selection, and the background color and volume slider selectors are kind of not following the style.
5 years ago
lat9nq a350ae6be6 configure_system: Implement highlighted overrides 5 years ago
lat9nq 6316a3d8d9 configuration_shared: Add default combobox setup function
Not a catch-all, but helps clean up the code for when I do this a lot. Also fixes some bugs caught in configure_graphics.
5 years ago
lat9nq 2627241541 configuration_shared: Use an int instead of a QString
I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics
5 years ago
lat9nq 38152ab0b9 configure_graphics_advanced: Implement highlighted overrides 5 years ago
lat9nq b79a6ebf9c configuration_shared: Switch back to background colors
Let's see if I make up my mind.
5 years ago
lat9nq 44b3183ec8 configuration_shared: Better use global text
Also adds trackers for graphics and advanced graphics
5 years ago
lat9nq c9f93c05f7 configure_audio: fix UI margins 5 years ago
lat9nq c4246b80f8 configure_graphics: Implement highlighted overrides 5 years ago
lat9nq bf25d583c6 configure_audio: Implement highlighted overrides 5 years ago
lat9nq da65b92f9e configuration_shared: Require name of the widget for highlighting
Prevents mass-coloring of elements later on
5 years ago
lat9nq 5a9dc8f002 configuration_shared: Use a highlight instead of background color
Fixes visibility in the built-in dark theme
5 years ago
lat9nq 58672cc7b6 configure_general: Implement manual tristate buttons 5 years ago
lat9nq e26e82d8d5 configuration_shared: Initial functions and data for manual tristate
Sets up initial support for implementing colored tristate functions. These functions color a QWidget blue when it's overriding a global setting, and discolor it when not. The lack of color indicates it uses the global state, replacing the Qt::CheckState::PartiallyChecked state with the global state.
5 years ago
ameerj 68d6d3e173 Fix axis thresholding while polling
axes were very sensitive when mapping controls.
5 years ago
David Marcec d7d2c27b48 swkbd: Return result for Calc request for inlined swkbd
Fixes random swkbd popups in monster hunter
5 years ago
ReinUsesLisp 51817f6e59 core/network: Add network abstraction
This commit adds a network abstraction designed to implement bsd:s but
at the same time work as a generic abstraction to implement any
networking code we have to use from core.

This is implemented on top of BSD sockets on Unix systems and winsock on
Windows. The code is designed around winsocks having compatibility
definitions to support both BSD and Windows sockets.
5 years ago
Rodrigo Locatti ad0b295125
Merge pull request #4376 from ogniK5377/dark-wait-tree
frontend: Improve wait tree readability for dark themes
5 years ago
Jan Beich db43b37e15 alignment: explicitly include <new> after 723edb4c06
In file included from src/core/hle/kernel/memory/page_table.cpp:5:
src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std'
        return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align}));
                                                              ~~~~~^
src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std'
        ::operator delete (p, n * sizeof(T), std::align_val_t{Align});
                                             ~~~~~^
5 years ago
David Marcec 617eeb09e0 Address issues 5 years ago
FearlessTobi 4450a2688a Address trivial review comments. 5 years ago
FearlessTobi 0072003a14 configure_ui: Address some review comments from the previous PR 5 years ago
FearlessTobi 347b50ad43 yuzu: Port translation support from Citra
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
5 years ago
David Marcec db4502b7b7 frontend: Improve wait tree readability for dark themes 5 years ago
bunnei 4a8cb9a706
Merge pull request #4348 from lioncash/nano
core_timing: Make usage of nanoseconds more consistent in the interface
5 years ago
bunnei bbeea7502c
Merge pull request #4373 from lioncash/allocator
alignment: Simplify AlignmentAllocator implementation
5 years ago
ReinUsesLisp a8a2526128 gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications
to use what in Vulkan is known as physical pointers, this is basically C
pointers. On GLASM these is exposed through the LOAD/STORE/ATOM
instructions.

Up until now, assembly shaders were using NV_shader_storage_buffer_object.
These work fine, but have a (probably unintended) limitation that forces
us to have the limit of a single stage for all shader stages. In contrast,
with NV_shader_buffer_{load,store} we can pass GPU addresses to the
shader through local parameters (GLASM equivalent uniform constants, or
push constants on Vulkan). Local parameters have the advantage of being
per stage, allowing us to generate code without worrying about binding
overlaps.
5 years ago
bunnei c700079e08
Merge pull request #4345 from Morph1984/fix-createfile
filesystem: Create subdirectories prior to creating a file
5 years ago
bunnei 90cbcaa44a
Merge pull request #4273 from ogniK5377/async-shaders-prod
video_core: Add asynchronous shader decompilation and compilation
5 years ago
David Marcec 967307d3be Fix style issues 5 years ago
bunnei 821d295f24
Merge pull request #4364 from lioncash/desig5
vulkan: Make use of designated initializers where applicable
5 years ago
bunnei af1151b1b0
Merge pull request #4365 from lioncash/mii
mii/manager: Make use of designated initializers
5 years ago
bunnei 0b733903f0
Merge pull request #4374 from ReinUsesLisp/fix-err
vk_device: Fix build error on old MSVC versions
5 years ago
bunnei 47b305387a
Merge pull request #4366 from lioncash/mii-sign
mii/manager: Resolve sign mismatch warnings
5 years ago
ReinUsesLisp 81c8f92f2e vk_device: Fix build error on old MSVC versions
Designated initializers on old MSVC versions fail to build when they
take the address of a constant.
5 years ago
bunnei 5d95e62443
Merge pull request #4344 from VolcaEM/c3
dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)
5 years ago
bunnei 0f0b756775
Merge pull request #4309 from Morph1984/fix-romfs-bug
fs: Fix RomFS building when zero byte files are present
5 years ago
ameerj 1e7bed0a45 std::size_t where appropriate, make error message more clear if can't read 5 years ago
bunnei 19c6bf72db
Merge pull request #4322 from ReinUsesLisp/fix-dynstate
vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_state
5 years ago
Lioncash 723edb4c06 alignment: Simplify AlignmentAllocator implementation
With C++20, much of the allocator interface has been simplified, so we
can make the same adjustments.
5 years ago
LC 47956a3bbc
Merge pull request #4369 from lioncash/hle-macro
macro_hle: Remove unnecessary std::make_pair calls
5 years ago
LC 9d3cbf6a90
Merge pull request #4340 from lioncash/remove
shader_cache: Make use of std::erase_if
5 years ago
David Marcec 4f473cda64 Drop settings namespace 5 years ago
David Marcec 85b591f6f0 Remove duplicate config 5 years ago
David Marcec f48187449e Use conditional var 5 years ago
David Marcec 2ba195aa0d Drop max workers from 8->2 for testing 5 years ago
David Marcec 85d7a8f466 Rebase for per game settings 5 years ago
David Marcec 468bd9c1b0 async shaders 5 years ago
David c783cf443e
Merge pull request #4347 from lioncash/logging
settings: Make use of std::string_view over std::string for logging
5 years ago
David 92f37a229e
Merge pull request #4371 from lioncash/cmake2
core/CMakeLists: Add missing physical_memory.h header file
5 years ago
David adbf5ca50b
Merge pull request #4357 from lioncash/unused4
kernel: Remove unused variables
5 years ago
David 69f8b6a53e
Merge pull request #4358 from lioncash/unused5
kernel/thread: Remove unimplemented function prototype
5 years ago
Lioncash c0650cd82c macro_hle: Remove unnecessary static keywords
These functions are already in an anonymous namespace which makes the
functions internally linked.
5 years ago
David 0d10c863a5
Merge pull request #4367 from lioncash/inc2
constants: Add missing <array> include
5 years ago
David 9cca0c2f83
Merge pull request #4368 from lioncash/macro
macro: Resolve missing parameter in doxygen comment
5 years ago
David 3ce4edba64
Merge pull request #4370 from lioncash/simplify
macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
5 years ago
Lioncash 311f500753 core/CMakeLists: Add missing physical_memory.h header file
Allows this header file to show up in IDE CMake generators.
5 years ago
Lioncash be6b7591d9 macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
Given the expression involves a 32-bit value, this simplifies down to
just: 0x3ffffff. This is likely a remnant from testing that was never
cleaned up.

Resolves a -Wshift-overflow warning.
5 years ago
Lioncash cc935d997b macro_hle: Remove unnecessary std::make_pair calls
The purpose of make_pair is generally to deduce the types within the
pair without explicitly specifying the types, so these usages were
generally unnecessary, particularly when the type is enforced by the
array declaration.
5 years ago
Lioncash 502dbfb9eb macro: Resolve missing parameter in doxygen comment
Resolves a -Wdocumentation warning.
5 years ago
Lioncash e07eb5b223 constants: Add missing <array> include
Eliminates reliance on an indirect include.
5 years ago
Lioncash e54c940abf mii/manager: Resolve sign mismatch warnings
Previously the loop termination condition was testing variables of
different signedness.
5 years ago
Rodrigo Locatti 39ae2deb28
Merge pull request #4363 from lioncash/mismatch
vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer
5 years ago
Lioncash 7f989378c0 mii/manager: Make use of designated initializers
Allows returning the structure in a more concise manner.
5 years ago
bunnei 3bbf4462db
Merge pull request #4292 from bunnei/mii-rewrite
hle: service: mii: Rewrite service to properly support creation of random and default miis.
5 years ago
Lioncash 7785123b1c wrapper: Make use of designated initializers where applicable 5 years ago
Lioncash 01da386617 vk_texture_cache: Make use of designated initializers where applicable 5 years ago
Lioncash 169759e069 vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer
Discovered while converting relevant parts of the codebase over to
designated initializers.
5 years ago
Lioncash 08d36afd40 vk_swapchain: Make use of designated initializers where applicable 5 years ago
Lioncash 3c060503bc vk_stream_buffer: Make use of designated initializers where applicable 5 years ago
Lioncash 70147e913f vk_staging_buffer_pool: Make use of designated initializers where applicable 5 years ago
Lioncash 2025f847bb vk_shader_util: Make use of designated initializers where applicable 5 years ago
Lioncash 97e7663004 vk_scheduler: Make use of designated initializers where applicable 5 years ago
Lioncash fd7af52ec3 vk_sampler_cache: Make use of designated initializers where applicable 5 years ago
Lioncash 772b6e4d28 vk_resource_manager: Make use of designated initializers where applicable 5 years ago
Lioncash 8ebd6a21c5 vk_renderpass_cache: Make use of designated initializers where applicable 5 years ago
Lioncash 01f297f2e0 vk_rasterizer: Make use of designated initializers where applicable 5 years ago