Commit graph

171 commits

Author SHA1 Message Date
Megamouse
3a71da35a9 Fix redundant forward declaration warning 2025-03-12 01:08:49 +01:00
RipleyTom
157e73b67e Add missing NotFound error handling in LeaveRoom reply 2025-02-20 07:58:03 +02:00
RipleyTom
6074480ffb Reset presence when terminating NP 2025-02-19 11:14:55 +02:00
RipleyTom
0e5014788b Fix SignalingHelper notification 2025-02-17 07:42:33 +02:00
RipleyTom
1efca833a4 Fix missing NoError error checking in a few sceNpGUI functions 2025-02-13 07:04:08 +01:00
RipleyTom
159370446f RPCN v1.4 2025-02-12 15:00:50 +01:00
RipleyTom
cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
Megamouse
451e953d26 windows: move config.yml and games.yml to /config/ 2025-01-16 21:33:33 +01:00
Megamouse
15f29eedee
Fix atomic_ptr value constructing overloads (#16473)
* Fix idm remove

idm::remove calls shared_ptr::exchange with a null_ptr.
This calls the stored object's constructor with null args.

---------

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2024-12-29 14:53:04 +02:00
Elad
575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
oltolm
2b0f786b2d
Fix std::basic_string warnings (#16261) 2024-11-11 21:54:44 +02:00
Megamouse
2262ac1684 Qt: Replace QMap with std::map
This should reduce the amount of string conversions during list refreshes
2024-11-06 09:34:32 +01:00
RipleyTom
c68f42e0ee Fix sceNpScoreGetRankingByNpId when no score is registered 2024-11-05 20:48:05 +01:00
Megamouse
0a57c459b6 overlays: add friends list to home menu 2024-10-06 09:57:20 +02:00
Megamouse
73fe420d09 RPCN: add overlay messages on friend requests 2024-10-06 06:35:48 +02:00
RipleyTom
9dd0b055d0 Fake sceNpMatching2GetLobbyInfoList 2024-09-26 21:12:10 +02:00
RipleyTom
3d9c8a670e Implement old matching API 2024-09-19 20:34:56 +02:00
Ninetime
7d84d084a4
Enable user to change country code (#15884) 2024-08-10 22:33:38 +02:00
Silent
f3ceebabd9 sceNp: Improve SceNpCommunicationId logging 2024-07-18 21:42:07 +03:00
Silent
9e094fded6 Do not set the data size in sceNpBasicGetEvent for SCE_NP_BASIC_EVENT_OFFLINE
There is no data associated with this event,
size is not supposed to be set.
2024-07-18 21:42:07 +03:00
RipleyTom
dd9b3c651f Support old sceNpScoreRankData 2024-07-18 18:29:49 +02:00
Megamouse
1e5cd7f140 sceNp: fix print_get_roomdata_external_list_resp pointer checks 2024-06-12 00:18:37 +02:00
Megamouse
4d09ba5080 sceNp: add some more rpcn array pointer checks
These probably return an error on real firmware...
2024-06-12 00:18:37 +02:00
Megamouse
be863e763f sceNp: add array sanity checks to print functions 2024-06-12 00:18:37 +02:00
RipleyTom
e42ba05883 Improve match2 ctx context start 2024-05-19 20:06:49 +02:00
RipleyTom
b83f1e7694 Improve CB accuracy for Avc2 2024-05-19 19:16:30 +02:00
RipleyTom
3e7ff4059e Add matching2 option handling 2024-05-16 22:38:11 +02:00
RipleyTom
0a956906de fix size calculation in get_member_and_attrs 2024-05-15 17:57:12 +03:00
RipleyTom
a50683d6ca
sys_net improvements (#15584)
Also remove redundant ensures
2024-05-13 05:35:08 +03:00
RipleyTom
b7a882f42b Split normal sockets and p2p sockets handling v2 2024-05-08 20:04:23 +03:00
RipleyTom
b38ce9452d Revert "Split normal sockets and p2p sockets handling"
This reverts commit 08c3a38b67.
2024-04-27 10:45:14 +02:00
RipleyTom
08c3a38b67 Split normal sockets and p2p sockets handling 2024-04-24 14:15:17 +03:00
oltolm
59410b9d62 fix compiler warnings 2024-03-28 08:45:20 +01:00
Megamouse
59dc5dcd54 Update wolfssl to 5.7.0 2024-03-26 12:26:26 +01:00
RipleyTom
397c2698ae Fix sceNpScoreGetRankingByNpId 2024-03-12 09:36:31 +02:00
RipleyTom
573734fab8 Send initial presence for offline friends. 2024-02-28 17:41:25 +01:00
RipleyTom
2168511e5b Add check for score transactions being reused 2024-02-28 02:14:37 +01:00
RipleyTom
ac8e914a25
improves sig_ctx handling, sys_net logging and fixes udpp2p protocol (#15235) 2024-02-24 12:40:53 +01:00
RipleyTom
26d406fec3 RPCN 1.1 2024-02-05 09:44:29 +01:00
Megamouse
e5cfe710fa sceNp: correct type for data attachment 2024-02-03 17:59:19 +01:00
Megamouse
48f82c75c1 np: fix signed/unsigned warning
who the heck thought returning signed on a counter makes sense...
2024-02-03 17:59:19 +01:00
RipleyTom
319657e815 Review fixes 2024-02-03 08:45:29 +01:00
RipleyTom
c589001dff Add player history 2024-02-03 08:45:29 +01:00
Megamouse
cdfe3ee7c8 Name some threads 2024-01-31 16:33:29 +01:00
RipleyTom
af8d308a69 Terminate RPCN connection cleanly 2024-01-29 13:01:09 +01:00
Megamouse
3dbde04d18 sceNpCommerce: add init checks 2024-01-27 08:31:16 +01:00
RipleyTom
fe9a24a1b8
RPCN 1.0 (#15045) 2024-01-14 12:36:23 +01:00
RipleyTom
4c36b80300 Misc NP fixes 2024-01-13 15:44:28 +01:00
RipleyTom
61e130e68c Honk if you knew memset(nullptr, 0, 0) was UB 2024-01-09 23:06:23 +01:00
RipleyTom
236e32fb3d Fix weird cmp in np_handler.cpp 2024-01-09 23:06:23 +01:00