Commit Graph
196 Commits
Author SHA1 Message Date
Henrik Rydgård 59a56d66c7 Add a "reason" argument to sleep_ms().
sleep_ms() should generally be avoided when possible. This can be used to try
to track down unnecessary sleeps by adding some logging.

This commit on its own doesn't actually add any logging.
2024-11-21 15:28:51 +01:00
Henrik Rydgård 9952c42426 Use message IDs to avoid some repetition of notifications.
Also fixes some awkward English.
2024-09-24 14:02:17 +02:00
AdamNandGitHub 73cf77940d Merge branch 'master' into adhoc_matching 2024-09-18 07:36:38 +07:00
Henrik Rydgård 5926886c0c Some include cleanup, delete some obsolete code 2024-07-25 14:52:41 +02:00
Henrik RydgårdandGitHub e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
AdamNandGitHub c389ede092 Update deleteAllAdhocSockets 2024-06-29 00:57:16 +07:00
Henrik Rydgård aa94867128 Warning fixes 2024-05-20 10:04:11 +02:00
Henrik Rydgård c5791764d8 Make the i18n T function use std::string_view
Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
2024-02-12 18:44:39 +01:00
Henrik Rydgård 20626ebfee When we enforce run-behind due to multiplayer, show "Network connected" on the pause screen 2024-01-21 12:02:30 +01:00
Henrik Rydgård 126d88ecfc Back out clearly inconsequential/useless .reserve() calls 2023-12-29 08:27:56 +01:00
Herman Semenov 2a31f8c6c0 [Common/Core/HLE] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:33:56 +03:00
Herman Semenov af41281761 [Core/Dialog/ELF/FileSystems/HLE/HW/Util] Added const reference for function params 2023-12-14 14:22:24 +03:00
ANR2ME 0188920f22 Allow TIMEOUT Event to intervene Joining process. 2023-10-13 00:21:49 +07:00
Henrik Rydgård eb21a2e6c9 Break out the OSD data holder from Common/System/System.h, into OSD.cpp/h 2023-06-30 17:15:49 +02:00
Henrik Rydgård 7cc8c6cea4 OSD: Add semantics, move the the OSD state to common (while keeping the renderer in the UI). 2023-06-20 14:40:46 +02:00
Brad Smith 3518abb47d Build fixes for OpenBSD 2023-05-19 22:04:36 -04:00
Henrik Rydgård ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård d586ec0d5e Don't create Host objects except in headless/unittest 2023-03-25 10:47:01 +01:00
Henrik Rydgård 9e125eeba7 Remove NotifyUserMessage from Host 2023-03-25 10:32:09 +01:00
Unknown W. Brackets dea9cac16c Core: Add range checks to some helpers and similar. 2023-01-09 16:56:18 -08:00
Unknown W. Brackets a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
lainon 3cdf72b68b Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back' 2022-09-30 12:35:28 +03:00
lainon c953bf7fc7 Fixed bug and memleaks 2022-09-30 12:32:49 +03:00
lainon b304551747 Code readability, vec reserve() and remove excess c_str() 2022-09-30 12:31:32 +03:00
Henrik Rydgård e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
ANR2ME ea6e5c8f74 Mask some part of public IP in the logs for security reason. 2022-06-23 00:41:41 +07:00
ANR2ME a10271dc1d Detects connection establishment to AdhocServer by combining select and getpeername to increase accuracy. 2022-05-18 06:18:16 +07:00
ANR2ME ff8b5d53f4 We might be missing this in the past. 2022-05-18 06:18:16 +07:00
ANR2ME 1aa56ec942 Added a note regarding SO_NOSIGPIPE 2022-05-18 01:14:01 +07:00
ANR2ME f3dd1d908b Avoid compilation warning 2022-05-18 01:13:49 +07:00
ANR2ME ee2a24b19a Avoid a possibility of fatal signal on non-Windows 2022-05-18 01:11:57 +07:00
ANR2ME 799c721fa6 Added a note regarding select on Linux. 2022-05-18 01:11:56 +07:00
Unknown W. Brackets 4ee9292d23 NetAdhoc: Fix warning. 2022-04-02 16:35:24 -07:00
ANR2ME 1a6c889906 Increase the timeout when the connection to the AdhocServer is already in progress, avoids cutting off the connection if it took longer than expected but almost completed. 2022-03-24 08:34:03 +07:00
ANR2ME d5152752d2 Added a function to get SO_ERROR on a socket. 2022-03-24 08:34:03 +07:00
ANR2ME 86315fed3d Updated getLocalIp function to detects local IP better. 2022-03-24 08:34:03 +07:00
ANR2ME 267757a5e4 Caches IP-specific Port Offset to avoid recalculating them. 2022-03-24 08:34:02 +07:00
ANR2ME 5e739f32b2 Use reference when possible to avoid copying. 2022-03-24 08:34:02 +07:00
ANR2ME 2b09f81ff8 Initialize some socket-related structs to avoid unexpected behavior. (May fix Unknown Source Port issue) 2022-03-24 08:34:02 +07:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
ANR2ME 0755dc0bbd Updated notifyMatchingHandler comments 2022-01-20 03:00:23 +07:00
ANR2ME 3b8eb6b04e Added a note regarding FIONREAD behavior on different platforms. 2021-12-08 08:49:35 +07:00
ANR2ME 5b010afff3 oops need to typecast metasocket 2021-09-28 20:44:03 +07:00
ANR2ME 9a714249a6 Changing most frequently used global vars to atomic to avoid possible multi-threading issue on friendFinder thread which communicates with AdhocServer in background.
PS: There are more global vars being used here (too many actually), so we should find a better approach in the future (ie. using PSPThread instead).
2021-09-28 20:44:03 +07:00
ANR2ME 15d3e69c4c Fix possible crash issue 2021-09-23 12:22:57 +07:00
Henrik RydgårdandGitHub b8ea95bec1 Merge pull request #14904 from ANR2ME/adhoc
[Adhoc] Do not resolve Pro Adhoc Server address when WLAN is turned off
2021-09-21 13:46:12 +02:00
ANR2ME 4e8a9fda63 Do not resolve Pro Adhoc Server address when WLAN is turned off 2021-09-21 17:12:01 +07:00
ANR2ME ee7383193b Fix race condition issue on AdhocMatching 2021-09-21 15:32:41 +07:00
ANR2ME 2bda9c1c84 Keep tracks of the sender/source port on GameMode for further communication, in case it was remapped by router or ISP for some reason. 2021-09-19 10:55:03 +07:00
Unknown W. Brackets c79bb6ba71 Net: Fix various chat threading hazards. 2021-09-14 18:08:17 -07:00