Commit graph

38 commits

Author SHA1 Message Date
Henrik Rydgård
4dd3621fa0 Remove some unnecessary <algorithm> includes. 2024-12-18 17:04:27 +01:00
Henrik Rydgård
3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård
83af54950f Move more core-related stuff into Core.cpp/h 2024-12-08 11:54:58 +01:00
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
f690cb99a4 If upnp is disabled, poll the check less aggressively. TODO: should wait for a cond instead. 2024-10-31 23:15:08 +01:00
Henrik Rydgård
3cd0e18556 Apply miniupnp buildfix proposed in #19333
See #19333
2024-07-17 16:23:39 +02:00
Henrik Rydgård
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
Henrik Rydgård
ab257e335f Ugprade miniupnp submodule to latest
Maybe will help #19246, but no idea really.

Windows buildfix

UWP buildfix

miniupnpc path fixes

libretro buildfix attempt, android.mk
2024-06-05 00:18:00 +02:00
Henrik Rydgård
9decdd198e Address more feedback, minor cleanup 2023-07-21 10:30:06 +02:00
Henrik Rydgård
ab6e902fea Make naett work on Android, UWP, Mac. Exclude on Linux 2023-07-21 10:28:31 +02:00
Henrik Rydgård
b54d5ab8e6 Cleanup the g_PortManager shutdown process
Following up comment by @ANR2ME in #17744, to be merged before that one.
2023-07-20 23:55:35 +02: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
Henrik Rydgård
6945deec01 Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy 2023-04-28 21:04:05 +02: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
9e125eeba7 Remove NotifyUserMessage from Host 2023-03-25 10:32:09 +01:00
Unknown W. Brackets
9cfcbc46e6 Global: Cleanup initialization/pointer checks.
Cleaning up a lot of cases of uninitialized data, unchecked return values
for failures, and similar.
2022-12-10 21:13:36 -08: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
Unknown W. Brackets
63e623ecb2 Build: Fix some format truncation warnings.
Generally all should be safe already, but better to be sure.
2021-12-11 10:45:27 -08:00
Henrik Rydgård
f4a6d291e1 Common: Capitalize setCurrentThreadName(). 2021-04-30 23:02:36 -07:00
ANR2ME
36ba5e0ef0 Prevent flooding the logs with repeated attempts of Adding/Removing port mapping due to failure in the middle of UPnP initialization, as it needs to be reinitialized. 2021-04-02 13:03:07 +07:00
Paul Cercueil
08e60c27d7
Fix build with USE_MINIUPNPC=OFF
Instead of adding platform-specific dirty workarounds, why not try to
handle things *properly*?

With this commit, the PortManager will compile UPnP specific code only
if USE_MINIUPNPC is set.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-03-19 12:48:28 +00:00
M4xw
4cc322466a Switch: Workaround several missing toolchain defs. 2021-03-04 21:24:57 -08:00
Henrik Rydgård
1405e28166 More buildfixes 2020-10-16 00:24:12 +02:00
Henrik Rydgård
4f43cff5ca
Move fileutil, net, image loaders, ui to Common. (#13506)
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
2020-10-04 20:48:47 +02: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
Unknown W. Brackets
1371ef298b Net: Reduce PortManager log noise.
Shows up when running unit tests, etc.
2020-08-27 19:23:23 -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
667a8522cc Global: Cut down on file/string includes. 2020-08-10 08:03:44 +00:00
ANR2ME
bd36fdda0e Do UPnP stuff on it's own thread to prevent causing stutters/lags during multiplayer game due to blocking socket behavior on miniUPnP 2020-07-23 12:41:13 +02:00
ANR2ME
e21ea719e9 Fixed PortManager fallback Cleanup issue when exiting PPSSPP due to early WSACleanup 2020-07-22 23:13:41 +02:00
ANR2ME
68fa15784c Fixed UPnP port opened by PPSSPP detection, and Updated PortManager to be compliant to general purpose usage 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
d12218e8da Attempt to fix compilation error on Linux 2020-07-22 20:41:47 +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
088e489c91 Fix UPnP error detection
Fix Local IP detection on non-Windows system
2020-07-21 23:03:04 +02:00
ANR2ME
33d3ac28de Added UPnP Support
Fix i18n type
2020-07-21 23:02:58 +02:00