Commit Graph

140 Commits

Author SHA1 Message Date
Steveice10 cca8c08a9a
build: Fix non-PCH build on Linux and add non-PCH verification to CI. (#7351) 2024-01-13 19:58:09 -08:00
PabloMK7 19d5695aa3
Implement some missing/wrong AC functionality. (#7171)
* Implement some missing/wrong AC functionality.

* Schedule NDM connect event into the future

* Disable NDM connect for now as it's causing issues

* Apply latest changes and suggestions.

* Workaround to fake wifi connection.

* Add missing command to ac:i

* Fix compilation

* Fix error codes for CamcelConnectAsync

* Fix missing global state.
2024-01-12 09:15:47 -08:00
GPUCode 5a7f615da1
kernel: Update to use atmosphere macros and correct Result (#7242)
* kernel: Switch to atmosphere style macros

* code: Rename ResultCode to Result

* code: Result constants are lower case

* Address review comments

* core: Remove CASCADE_CODE

* R_TRY replaces completely

* core: Run clang format
2023-12-31 09:01:40 -08:00
GPUCode 6ec079ede8
core: De-globalize HLE lock (#7212) 2023-11-28 14:15:27 -08:00
Steveice10 e043caac27
hle: Eliminate need to specify command headers for IPC. (#6678) 2023-07-14 17:32:59 -07:00
GPUCode cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
GPUCode 2126c240cd
core: backport some ResultCode updates (#6645)
Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2023-07-03 02:23:53 +02:00
SachinVin 8eb89c260d core: fix warnings 2023-06-17 21:23:58 +05:30
SachinVin 41f13456c0
Chore: Enable warnings as errors on MSVC (#6456)
* tests: add Sanity test for SplitFilename83

fix test

fix test

* disable `C4715:not all control paths return a value` for nihstro includes

nihstro: no warn

* Chore: Enable warnings as errors on msvc + fix warnings

fixes

some more warnings

clang-format

* more fixes

* Externals: Add target_compile_options `/W0` nihstro-headers and ...

Revert "disable `C4715:not all control paths return a value` for nihstro includes"
This reverts commit 606d79b55d3044b744fb835025b8eb0f4ea5b757.

* src\citra\config.cpp: ReadSetting: simplify type casting

* settings.cpp: Get*Name: remove superflous logs
2023-05-01 22:38:58 +03:00
PabloMK7 63bc0b59bb
Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)
* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.

* Use u32 instead of unsigned int in MakeHeader function

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>

* Fix clang format

---------

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
2023-04-27 22:31:03 -07:00
Pengfei Zhu 9d5ae8e1c2
service/nwm_uds: Add NetworkStatusChangeReason (#5377)
fixes https://github.com/citra-emu/citra/issues/3975
2022-12-17 16:03:59 +01:00
Tobias 3201943423
Port yuzu-emu/yuzu#4437: "core_timing: Make use of uintptr_t to represent user_data" (#5499)
Co-authored-by: LC <lioncash@users.noreply.github.com>
2022-11-06 02:24:45 +01:00
Tobias 1ddea27ac8
code: Cleanup and warning fixes from the Vulkan PR (#6163)
Co-authored-by: emufan4568 <geoster3d@gmail.com>
Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
2022-11-04 23:32:57 +01:00
tywald a2daef2985
service/nwm_uds: log instead of assert to prevent crashes during multiplayer in Monster Hunter games (#6161) 2022-10-23 23:10:41 +05:30
Pengfei Zhu 5241032fc5
Merge pull request #5382 from zhaowenlan1779/uds-2
service/nwm_uds: Various improvements/corrections
2021-06-22 20:40:18 +08:00
Ben 7325f58763
NWM_UDS: implement disconnect_reason and EjectClient (#5331)
* NWM_UDS: Stub disconnect_reason and EjectClient

* addressed review comments

* fix additional semicolon

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2021-05-16 10:41:54 +02:00
mnml 6f45b402e7
UDS: implement GetApplicationData (#5533) 2020-12-05 22:27:57 +01:00
Lioncash f8ab6e9247 nwm: Eliminate signed conversion warnings
While we're at it, we can also improve some of the allocations and
copying that would be going on in one case by preallocating and then
emplacing before modifying.
2020-06-05 20:52:28 -04:00
zhupengfei b34ceb89c5
nwm_uds: Change ASSERT to LOG_ERROR
This might be caused by some packet/status delay within the enet protocol, or may be caused by our not properly handling disconnection. Anyway, this situation *can* happen, and we should not crash Citra for a non-critical error.
2020-06-04 23:06:10 +08:00
zhupengfei 9965ce6938
nwm_uds: Make sure client node information match host's
This change is not HW tested as I do not have 3 3DSes, but this should make sure that all the members of the network hold the same `node_info`, `nodes` and the bitmasks, etc.
2020-06-04 22:18:39 +08:00
zhupengfei 4918f86622
service/nwm_uds: Ensure consistency regarding node IDs
Previously, when connecting, the host was using the incorrect node_id to update `node_info`.

This is an attempt to fix tywald's problem with MH, reported on Discord a while ago. I'm not sure if this would actually fix that though.
2020-06-04 22:18:21 +08:00
Mat M e9819b61a6
service: Mark variables as [[maybe_unused]] where applicable (#5318)
Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.

We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
2020-05-04 12:22:33 +02:00
Sebastian Valle 3597921ec5
Merge pull request #5235 from lioncash/move
ipc_helpers: Make PushStaticBuffer take std::vector by value
2020-04-19 21:51:52 -05:00
Mat M e54b640e0b
nwm/nwm_uds: Avoid copying all elements in channel_data map where applicable (#5236)
By using a reference here, we avoid copying every single element in the
map, each of which contains a std::share_ptr and std::deque containing
std::vectors.
2020-04-19 07:57:57 +02:00
Lioncash a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Hamish Milne d6c84227d8 Fixed NWM not responding 2020-04-16 20:44:25 +01:00
Hamish Milne 34af0d3452 Attempt to fix network bug 2020-04-11 20:33:38 +01:00
Hamish Milne 6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne e4f05884c3 Fixed serialization runtime exceptions 2020-02-13 17:42:08 +08:00
Hamish Milne 9525d81344 More base-derived fixes 2020-02-13 17:42:07 +08:00
Hamish Milne 996aba39fe Correct exports; add some file serialization; fix service base object serialization 2020-02-13 17:42:07 +08:00
Hamish Milne 116d22d562 Refactor out the wakeup_callback function pointer 2020-02-13 17:42:05 +08:00
Hamish Milne 7019561fd5 Bind NWM_UDS service in the constructor 2020-02-13 17:42:05 +08:00
Hamish Milne f5e2f873b0 Serialize NWM service 2020-02-13 17:41:24 +08:00
Weiyi Wang 11754778bb
Merge pull request #4716 from wwylele/client-is-known
HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
2019-04-15 09:08:07 -04:00
Lioncash 21c71d21ae general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
Weiyi Wang f565ea80f0 HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-04-02 13:23:39 -04:00
Weiyi Wang 05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang 5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang 4696b13170
UDS: I was drunk 2019-03-15 00:35:39 -04:00
Weiyi Wang a986e35795 UDS: Change reply command ID for two versions of ConnectToNetwork 2019-03-14 10:10:18 -04:00
Weiyi Wang aaa599a849 UDS: duplicate DecryptBeaconData implementation for deprecated version
They are really identical in the NWM module code
2019-03-13 00:21:10 -04:00
Weiyi Wang 16fb6a2c8d UDS: implement ConnectToNetworkDeprecated and forward params to ConnectToNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang fc0fe5c3c0 UDS: devide IPC and impl for ConnectToNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang e121c59583 UDS: implement BeginHostingNetworkDeprecated and forward params to BeginHostingNetwork 2019-03-13 00:03:51 -04:00
Weiyi Wang 5353d539ce UDS: divide IPC and impl for BeginHostingNetwork 2019-03-12 23:00:18 -04:00
Weiyi Wang 1076864935 UDS: implement InitializeDeprecated and forward params to Initialize 2019-03-12 21:53:07 -04:00
Weiyi Wang 021c77bc9f UDS: divide IPC and impl for InitializeWithVersion 2019-03-12 21:50:14 -04:00
Weiyi Wang 6382d9bfc3 NWM_UDS: move states into the class 2019-01-31 15:42:45 -05:00
zhupengfei 9d062d63da
network, citra_qt: Give moderation permission to community mods
Based on the `roles` payload in the JWT, the rooms will now give mod permission to Citra Community Moderators. To notify the client of its permissions, a new response, IdJoinSuccessAsMod is added, and there's now a new RoomMember::State called Moderator.
2018-12-15 20:28:03 +08:00