Unknown W. Brackets
9403947b67
UI: Decouple new chat display and tracking logic.
2021-09-14 18:08:16 -07:00
Unknown W. Brackets
be0b0cd88d
UI: Track chat log changes more clearly.
...
This also makes it easier to have multiple views or etc. reading from it.
We want data flowing a single direction, chat system -> UI.
2021-09-14 18:08:16 -07:00
iota97
4205ce7c42
Trim username on join as well
2021-07-26 21:11:21 +02:00
ANR2ME
7a06103cc6
Create GameMode's socket after Master and all Replicas have been created so we will know the largest buffer size.
2021-05-31 04:37:09 +07:00
Henrik Rydgård
f4a6d291e1
Common: Capitalize setCurrentThreadName().
2021-04-30 23:02:36 -07:00
ANR2ME
206ab4345e
Attempts to reconnect to Adhoc Server only when Creating/Joining/Connecting to a group or Scanning for groups, instead of on 2 seconds interval.
2021-04-02 12:19:02 +07:00
ANR2ME
e508885cc4
Show the socket error code when failed to connect to adhoc server
2021-04-02 12:18:59 +07:00
ANR2ME
e3228ca1b5
Use a function to check for loopback address
2021-04-02 12:18:12 +07:00
M4xw
4cc322466a
Switch: Workaround several missing toolchain defs.
2021-03-04 21:24:57 -08:00
ANR2ME
36a9fb7645
Replacing the deprecated gethostbyname function with getaddrinfo function to prevent getting deprecated warnings
2021-03-01 01:45:28 +07:00
ANR2ME
758fb12fc3
Making sure there are no warnings related to deprecated inet_ntoa function
2021-03-01 01:45:27 +07:00
ANR2ME
cb61b34b53
Minor changes.
2021-02-21 20:05:50 +07:00
Unknown W. Brackets
9d22297a90
Windows: Use CommonWindows more consistently.
...
Also, make sure WinSock2.h is included beforehand where it's needed.
2021-02-14 10:30:10 -08:00
ANR2ME
0ce2c2c6e9
Windows recvfrom doesn't support MSG_TRUNC, so we're using dummy buffer with max size as alternative for peeking actual size of the next pending message.
2021-02-11 07:40:35 +07:00
ANR2ME
04434ea68e
Fix possible race condition issue.
2021-02-05 21:54:00 +07:00
ANR2ME
79c30ee716
We don't really need to allocate a buffer when using MSG_TRUNC on recvfrom
2021-02-05 21:53:59 +07:00
ANR2ME
849fe4ade1
Updated PdpStat to prevent rcv_sb_cc from exceeding the buffer size arg (since we use larger buffer size to prevent micro stutters or disconnection issue due to too many dropped packets with small buffer size).
...
TODO: May need to improve it to be able to calculate the correct size if there are multiple datagram messages
2021-02-04 10:31:01 +07:00
ANR2ME
d907906c74
Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players.
2021-01-30 15:20:24 +07:00
ANR2ME
dbce1a4c1d
Prevent access violation when running out of userMemory due to piling up AdhocMatching events.
2021-01-09 00:55:11 +07:00
ANR2ME
b10797db95
Fixed an issue where sometimes a player unable to join a host on Warriors Orochi 2 (should also fix similar issue on other games that use PDP/UDP on Windows)
2020-12-25 00:27:35 +07:00
ANR2ME
38d887ce88
Change socket's MSS based on PSP_ADHOC_PTP_MSS
2020-11-16 19:03:11 +07:00
ANR2ME
f30c61849b
Making use TCP_QUICKACK (or it's alternative) along with TCP_NODELAY
2020-11-16 19:03:09 +07:00
ANR2ME
4eca124710
Blocks current thread to synchronize initial GameMode data. Fixes desync issue when GameMode multiplayer mission is being started.
2020-10-29 06:08:51 +07:00
ANR2ME
399f56f73b
Implementing Adhocctl Busy state to prevent getting kicked out from Adhoc Server on games that tries to leave the group multiple times in a row.
...
Also Updated Adhocctl behavior.
2020-10-29 06:04:22 +07:00
ANR2ME
0157fe4988
Updated GameMode API (Fixed Pocket Pool)
2020-10-29 06:00:16 +07:00
ANR2ME
bff18c07d0
Fixed unable to see game room issue on Air Conflicts - Aces Of World War 2, should also fix other games with similar issue (due to invalid group mode)
2020-10-29 06:00:16 +07:00
ANR2ME
0363319f14
Prevent Scanning issue after reconnected to AdhocServer, also Updated logging to showing the error code on sceNetAdhocctlScan
2020-10-29 06:00:15 +07:00
ANR2ME
30b9f46aa5
Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled
2020-10-19 23:34:47 +07:00
ANR2ME
88ebed4c02
Prevent AdhocServer Pings from spamming Debug Log
2020-10-16 12:23:20 +07:00
Henrik Rydgård
b3deaab963
VS 2017 buildfix hack - these parameters are new to Windows.
...
Thanks autechre.
2020-10-14 23:15:49 +02:00
ANR2ME
00b11115bb
Fixed timeout issue due to the latest CoreTiming::GetGlobalTimeUsScaled() have a possibility to get smaller number than the previous one.
2020-10-11 13:34:30 +07:00
ANR2ME
8b2073cd7f
Prevent Dissidia 012 from opening too many ports when failed to connect continuously.
2020-10-10 01:00:32 +07:00
ANR2ME
d628eb2ebd
Fix Falcom games (ie. Ys vs. Sora no Kiseki, Vantage Master Portable)
2020-10-09 23:45:12 +07:00
ANR2ME
6d02e25318
Updated GameMode implementation to fix Bomberman, also improved performance on BattleZone. (+1 squashed commits)
...
Squashed commits:
[4a3168b2d] GameMode oops
2020-10-09 23:42:03 +07:00
ANR2ME
8a96112e1a
Fix Apctl and Adhocctl state change timings to works properly. Which fix the stuck MessageBox on Naruto Shippuden Ultimate Ninja Heroes 3 and .hack//Link properly.
2020-10-09 23:37:35 +07:00
Henrik Rydgård
ff8148dd92
Move native/util, native/data and native/i18 to Common/Data.
...
Also move colorutil.cpp/h
linking build fix experiment
Delete a bunch of unused CMakeLists.txt files
CMakeLists.txt linking fix
Don't include NativeApp.h from any headers.
Android.mk buildfix
Half of the UWP fix
Buildfix
Minor project file cleanup
Buildfixes
Guess what? More buildfixes!
2020-10-04 07:28:29 +02:00
Henrik Rydgård
15382d5f94
Move threading utils from native to Common
2020-10-01 09:27:25 +02:00
Henrik Rydgård
054acf768c
Don't cache time in a variable.
...
A little weirdness in the code that has stuck around for a long, long
time. It's really not necessary and mostly just confusing.
2020-09-24 23:52:43 +02:00
ANR2ME
4881f4f0bd
Fixed PdpStat and PtpStat info
2020-09-22 10:16:04 +07:00
ANR2ME
3439511e0c
Implementing Adhoc GameMode HLE
2020-09-20 11:55:16 +07:00
ANR2ME
e690dc62dc
Fix an issue of major performance drops when using accepted PTP Sockets.
2020-09-15 01:53:18 +07:00
ANR2ME
2808903663
Making sure the are no compiler warnings on adhoc code on android
2020-09-14 03:38:20 +07:00
ANR2ME
8d68e917b7
Prevent Client side from forever re-trying to connect to Exited Host on Shin Sangoku Musou Multi Raid 2
2020-09-14 03:38:20 +07:00
Henrik Rydgård
9753e317f3
Merge pull request #13415 from ANR2ME/adhocctl_fix
...
Avoid getting Fatal signal 6 (SIGABRT) on linux/android
2020-09-12 16:30:05 +02:00
ANR2ME
3b38062a47
Fix Failed to Bind already used port issue on Android (and probably linux too). This should fix Dynasty Warrior Strikeforce and Shin Sangoku Musou Multi Raid 2
2020-09-12 09:08:50 +07:00
ANR2ME
2b109f4640
Avoid getting Fatal signal 6 (SIGABRT) on linux/android when losing connectivity to the Adhoc Server.
2020-09-12 06:14:28 +07:00
Henrik Rydgård
8d72abb605
Merge pull request #13413 from ANR2ME/adhocmatching_fix
...
AdhocMatching - Clients shouldn't try to detects other clients disconnection by them self.
2020-09-11 13:06:02 +02:00
ANR2ME
3eeb48bb40
Clients shouldn't try to detects timeout of other clients, because most of the time the client side doesn't have timeout information given, better wait for the host to tells them if a client got disconnected.
2020-09-11 13:44:09 +07:00
ANR2ME
1e6593f791
Sleep a bit longer, especially when PPSSPP paused.
2020-09-11 13:24:45 +07:00
ANR2ME
82a064adcf
Resolve Adhoc Server DNS early and cache it so we don't need to resolve it again later.
2020-09-10 12:00:30 +07:00
ANR2ME
2affbb850c
Stop waiting for connection on Exit to Menu to prevent causing lags.
2020-09-10 12:00:30 +07:00
ANR2ME
97e5a1f447
Combining PDP and PTP socket's array into a union array. Fixes Hot Shots Tennis that doesn't works well with socketId > 255
2020-09-09 14:21:32 +07:00
ANR2ME
87965ca89b
Changing default Wlan Channel to 11 on Automatic to be the same with real PSP
2020-09-08 10:33:20 +07:00
ANR2ME
69b3c788eb
Ignore SIGPIPE error on certain system (ie. Linux)
2020-09-07 02:38:45 +07:00
ANR2ME
c2a4d56430
An attempt to implement AdhocSocketAlert
2020-09-06 11:12:04 +07:00
Henrik Rydgård
5f1e3b2950
Merge pull request #13383 from ANR2ME/adhocctl_fix
...
Adhocctl Fix - Valhalla Knights 2
2020-09-05 10:07:33 +02:00
ANR2ME
00d2b488dd
Reindexing PDP and PTP socket using const/var instead of using confusing raw numbers
2020-09-05 13:44:35 +07:00
ANR2ME
423a7b2391
Fix multiplayer on Valhalla Knights 2
2020-09-05 08:58:29 +07:00
ANR2ME
a05da1a8c5
Fix communication issue with Adhoc Server where ping to the Adhoc Server sometimes getting socket error 10053 and disconnected from Adhoc Server
2020-09-04 13:09:45 +07:00
ANR2ME
439171fc56
An attempt to reduce the lags/stutters during multiplayer caused by improper blocking behavior.
2020-09-04 13:09:44 +07:00
ANR2ME
6a9cf0f575
An attempt to differentiate adhoc connect, create, and join.
2020-09-04 13:09:44 +07:00
ANR2ME
804dd07c93
An attempt to sort AdhocMatching Member List in order to make a consistent list on all players (based on Host). Also fixed some disconnection issue on other players when a player is leaving the room on Gran Turismo and Patapon 3.
2020-09-04 01:32:15 +07:00
ANR2ME
ca059bc962
Making sure the 1st 2-bits on the 1st byte of MAC address' OUI are zero to prevent issue with some games (ie. Gran Turismo)
2020-09-03 05:17:42 +07:00
ANR2ME
9c5f02fbf5
Default to P2P/Parent's MAC address if the target MAC on sceNetAdhocMatchingSendData is 00:00:00:00:00:00 (need to confirm whether this is correct or an error should be returned instead)
2020-09-02 21:17:38 +07:00
ANR2ME
a76a5bdf56
Ignores the 1st byte of MAC address when comparing, since there might be games (ie. Gran Turismo) that tries to tamper/change the 1st byte during multiplayer upon use.
2020-09-02 21:17:38 +07:00
Henrik Rydgård
0752e7d158
Merge pull request #13302 from unknownbrackets/net-local
...
Net: Simplify local IP lookup and cleanup instance counter a bit
2020-08-18 21:29:29 +02:00
Unknown W. Brackets
a89840f309
Net: Cut down on local IP aliasing.
2020-08-17 23:08:35 -07:00
Henrik Rydgård
ccc0331279
Move timeutil to Common. (Experiment to see how much work it is to move these).
2020-08-15 20:53:08 +02:00
Unknown W. Brackets
b8342fb8ec
SaveState: Rename ChunkFile files to Serialize.
...
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets
4b4e3432cd
SaveState: Split Do() into a separate header.
2020-08-10 08:03:41 +00:00
ANR2ME
30ea1087dd
Attempt to fix an issue when the 3rd player joined causing problem to other players on Patapon 3 (this may also affects other games that use AdhocMatching)
2020-07-25 11:48:19 +07:00
ANR2ME
2f44495654
Added more info to AdhocMatching Logs to get a better insight
2020-07-25 11:48:18 +07:00
ANR2ME
87b712450f
Locking before changing peer linked list order, just to be safe.
2020-07-24 14:46:40 +07:00
ANR2ME
a6e3bed150
Just to be safe since SO_MAX_MSG_SIZE may not be available on all platform and forcing the definition to what windows use might be a bad idea.
2020-07-23 12:41:13 +02:00
ANR2ME
a3b21b04ea
Making mac2str function easier/cleaner/safer to use for logging purpose
2020-07-23 12:41:13 +02:00
ANR2ME
a0f0973462
Reconnect to Adhoc Server when disconnected while still having the AdhocCtl Inited (ie. due to timeout or network failure) so players doesn't need to reset the game to reconnect.
2020-07-23 12:09:28 +02:00
ANR2ME
df26845388
Minor fixes
2020-07-22 23:13:41 +02:00
ANR2ME
b9025b50bd
Added a UPnP option to use original port for external port instead of using the shifted port by port offset, to be compatible with real PSP or other PSP emulators
2020-07-22 23:13:41 +02:00
ANR2ME
2ca6a4f0d7
Fixed GvG Next Plus, Phantasy Star Portable 2, and some minor changes
2020-07-22 22:22:59 +02:00
ANR2ME
d12218e8da
Attempt to fix compilation error on Linux
2020-07-22 20:41:47 +02:00
ANR2ME
62c37a3481
Fix Blinking game room issue on NFS Most Wanted, this will also fix lobby issue on Ridge Racer 2, Naruto Kizuna Drive, etc.
2020-07-22 19:17:34 +02:00
Henrik Rydgård
cc96e9ad11
Backport Mac/iOS buildfix from a later commit
2020-07-22 18:41:32 +02:00
ANR2ME
8daf2ff66e
Added UI to change WLAN Channel.
...
Currently Ridge Racer 2 doesn't works with Auto channel (TODO: Making sure sceUtilityGetSystemParamInt doesn't returns channel 0 when connected to a network for Ridge Racer 2 to works with Auto channel)
2020-07-22 16:46:39 +02:00
ANR2ME
d0045947f1
An attempt to fix socket's behavior inconsistencies across platforms.
...
Added an option to override minimum socket's timeout to prevent getting timeouts on high latency networks.
2020-07-22 16:46:34 +02:00
ANR2ME
33d3ac28de
Added UPnP Support
...
Fix i18n type
2020-07-21 23:02:58 +02:00
Henrik Rydgård
ed98785831
Temporary buildfix
2020-07-20 23:05:00 +02:00
Henrik Rydgård
0cbcbaecf8
Backport a macOS buildfix from later
2020-07-20 22:52:07 +02:00
ANR2ME
6c267dff9e
Fix Local IP detection on non-Windows system
...
(Note: Had to delete a UPnP related line)
2020-07-20 19:23:37 +02:00
ANR2ME
b58f4a6e90
Enabling KeepAlive on sockets
2020-07-20 19:13:10 +02:00
ANR2ME
bcbfefc337
making sure there are no alignment warnings related to member of packed struct on android
2020-07-20 19:13:00 +02:00
ANR2ME
fa36c2edab
Improved multiplayer stability regardless of I/O Timing method
2020-07-20 19:12:55 +02:00
ANR2ME
fb7d50e5c2
Improved multiplayer compatibility on some games (ie. GTA VCS, Naruto Ultimate Ninja Heroes 3, DBZ Shin Budokai 2, Power Stone Collection, .hack//Link, etc)
2020-07-20 18:09:16 +02:00
Henrik Rydgård
af2ed00232
Merge pull request #13172 from hrydgard/generalized-multi-instance
...
Generalized multi-instance
2020-07-20 16:23:10 +02:00
ANR2ME
da5b54e630
Separate each AdhocMatching callback's buffer, since callback aren't immediately executed thus using shared memory address may corrupt previous data
2020-07-20 12:19:40 +02:00
Henrik Rydgård
fa0b9dc1bc
Make the instance counter global and initialized at startup.
...
Turn off config saving for secondary instances.
2020-07-20 11:40:54 +02:00
ANR2ME
46ebdebe05
Excluding Android from multiple-instance feature because i'm too lazy to learn ashmem :D
2020-07-20 10:03:09 +02:00
ANR2ME
834d086876
Support multiple instance of localhost Multiplayer on 1 PC
2020-07-20 10:03:09 +02:00
Henrik Rydgård
893d26b679
Add some paranoid checks in AfterMatchingMipsCall::run().
...
Might work around a crash in #13057
2020-07-06 21:24:48 +02:00
Henrik Rydgård
3e6050beac
Minor cleanups
2020-03-08 14:35:25 +01:00
ANR2ME
93b59afed5
Fix building errors
2020-03-03 00:23:12 +07:00