Fix Black Ops II menus, mode switching, local networking and DLC #1093

Closed
github-bot wants to merge 6 commits from gh-pr/1093/head into gh-pr/1093/base
Owner

@⁠thenotsoquietninja44-collab on GitHub · 2026-10-06 00:59 UTC · original
thenotsoquietninja44-collab:bo2-local-modes-fixes → main · +429 −12 · 18 files · 6 commits · closed without merging

This PR adds Black Ops II fixes for menu rendering, switching between Campaign/Zombies/Multiplayer, the “content still downloading” message when PlayGo metadata is missing, local lobby networking, bundled DLC detection, and offline DLC camo visibility. The changes are split into six focused commits.

These changes were developed with substantial AI assistance from Codex, including implementation and automated checks. I tested the BO2 functionality on the combined local 7415feb build and confirmed it works, including DLC camos and Zombies gameplay. Gameplay still stutters, and there are minor graphical glitches in the main menu.

My system: AMD Ryzen 7 9800X3D, 48 GB DDR5 RAM, NVIDIA GeForce RTX 5090, Windows. Game: PPSA34502, version 01.010.000.

The combined local build passed Windows compilation and filesystem/network regression tests. The BO2-only submission matches those BO2 changes and merges cleanly with current upstream, but has not been separately built or gameplay-tested. Linux and macOS have not been tested. DLC detection uses file-presence heuristics, not full asset-integrity validation.

This submission contains only BO2-related emulator changes and tests. It includes no game files. The screenshots show DLC/DLC2 camo menus, Zombies map selection, and Zombies gameplay.

DLC camo menu

DLC2 camo menu

Zombies map selection

Zombies gameplay

**@⁠thenotsoquietninja44-collab** on GitHub · 2026-10-06 00:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093) `thenotsoquietninja44-collab:bo2-local-modes-fixes` → `main` · +429 −12 · 18 files · 6 commits · closed without merging This PR adds Black Ops II fixes for menu rendering, switching between Campaign/Zombies/Multiplayer, the “content still downloading” message when PlayGo metadata is missing, local lobby networking, bundled DLC detection, and offline DLC camo visibility. The changes are split into six focused commits. These changes were developed with substantial AI assistance from Codex, including implementation and automated checks. I tested the BO2 functionality on the combined local 7415feb build and confirmed it works, including DLC camos and Zombies gameplay. Gameplay still stutters, and there are minor graphical glitches in the main menu. My system: AMD Ryzen 7 9800X3D, 48 GB DDR5 RAM, NVIDIA GeForce RTX 5090, Windows. Game: PPSA34502, version 01.010.000. The combined local build passed Windows compilation and filesystem/network regression tests. The BO2-only submission matches those BO2 changes and merges cleanly with current upstream, but has not been separately built or gameplay-tested. Linux and macOS have not been tested. DLC detection uses file-presence heuristics, not full asset-integrity validation. This submission contains only BO2-related emulator changes and tests. It includes no game files. The screenshots show DLC/DLC2 camo menus, Zombies map selection, and Zombies gameplay. ![DLC camo menu](https://raw.githubusercontent.com/thenotsoquietninja44-collab/KytyPS5/3fc903b2811aa160dc705744dc13d4f93c0fbff9/bo2/bo2-dlc-camos.png) ![DLC2 camo menu](https://raw.githubusercontent.com/thenotsoquietninja44-collab/KytyPS5/3fc903b2811aa160dc705744dc13d4f93c0fbff9/bo2/bo2-dlc2-camos.png) ![Zombies map selection](https://raw.githubusercontent.com/thenotsoquietninja44-collab/KytyPS5/3fc903b2811aa160dc705744dc13d4f93c0fbff9/bo2/bo2-zombies-map-selection.png) ![Zombies gameplay](https://raw.githubusercontent.com/thenotsoquietninja44-collab/KytyPS5/3fc903b2811aa160dc705744dc13d4f93c0fbff9/bo2/bo2-zombies-gameplay.png)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:42:46 +00:00
github-bot closed this pull request 2026-11-26 09:42:46 +00:00
Author
Owner

@⁠defektu on GitHub · 2026-10-06 17:38 UTC · original

For this being a draft, I suggest you to split this up into commits with proper parts like depth, network stubs, network implementations etc. This will make it easier to take in part by part.

**@⁠defektu** on GitHub · 2026-10-06 17:38 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#issuecomment-6021939664) For this being a draft, I suggest you to split this up into commits with proper parts like depth, network stubs, network implementations etc. This will make it easier to take in part by part.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 00:47 UTC · original · edited 2026-10-07 00:50 UTC

Review in Change Stack →

📝 Walkthrough

Walkthrough

The change adds guest argument parsing and runtime forwarding, a system-service load request that can relaunch the emulator, and optional process waiting. It adds depth-to-color copy handling to the renderer. For title PPSA34502, it adds asset-based entitlement and startup checks. It also adds guest socket-option handling and UDP coverage.

Suggested reviewers: nmzik

Priority: ➖ Normal

Change: Bug fix

Merge Risk: 🟡 Moderate · up to 4657f

Fix the cross-platform test failure and the relaunch and argument-boundary issues before merging. Depth-copy logging can also produce repeated output when logging is enabled.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 40 functions across 17 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title summarizes the main Black Ops II fixes, including menu behavior, mode switching, local networking, and DLC.
Description check ✅ Passed The description covers the Black Ops II changes, test results, platform limitations, and DLC detection approach described in the changeset.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#issuecomment-6028374031) · edited 2026-10-07 00:50 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1093?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The change adds guest argument parsing and runtime forwarding, a system-service load request that can relaunch the emulator, and optional process waiting. It adds depth-to-color copy handling to the renderer. For title PPSA34502, it adds asset-based entitlement and startup checks. It also adds guest socket-option handling and UDP coverage. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ➖ Normal <!-- change_assessment_commit:"4657fe7b0e436ffaf592825eadb3a3976dff2813" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _🟡 Moderate_ · up to `4657f` <!-- final_review_risk_coverage:{"sourceCommitId":"4657fe7b0e436ffaf592825eadb3a3976dff2813","coveredCommitId":"4657fe7b0e436ffaf592825eadb3a3976dff2813","kind":"reviewed"} --> Fix the cross-platform test failure and the relaunch and argument-boundary issues before merging. Depth-copy logging can also produce repeated output when logging is enabled. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 40 functions across 17 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :------------------------------------------------------------------------------------------------------------------------------------------ | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Title check | ✅ Passed | The title summarizes the main Black Ops II fixes, including menu behavior, mode switching, local networking, and DLC. | | Description check | ✅ Passed | The description covers the Black Ops II changes, test results, platform limitations, and DLC detection approach described in the changeset. | </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autopilot</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1093)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
@ -184,0 +291,4 @@
const auto waited = WaitForSingleObject(previous, 30000);
CloseHandle(previous);
if (waited != WAIT_OBJECT_0) return;
}
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 00:47 UTC · original

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '80,145p' src/emulator.cpp
sed -n '278,345p' src/emulator.cpp
sed -n '455,500p' src/main.cpp

Repository: KytyPS5/KytyPS5

Length of output: 5704


🏁 Script executed:

rg -n -F -- '#define EXIT' src include || test "$?" -eq 1
rg -n -F -- '#define LOGF' src include || test "$?" -eq 1
rg -n -F -- 'void Run(const RunOptions& options)' src/emulator.cpp
rg -n -F -- 'CreateProcessW(executable, command.data()' src/emulator.cpp
sed -n '1,95p' src/emulator.cpp
sed -n '278,310p' src/emulator.cpp
sed -n '430,490p' src/main.cpp

Repository: KytyPS5/KytyPS5

Length of output: 6819


🏁 Script executed:

sed -n '25,65p' src/common/assert.h
sed -n '40,72p' src/common/logging/log.h
sed -n '485,545p' src/main.cpp
rg -n -F -- 'WriteToConsoleAndLog' src/common/logging src
rg -n -F -- 'void Init(' src/common/logging

Repository: KytyPS5/KytyPS5

Length of output: 6525


🏁 Script executed:

rg -n -F -- 'DbgExitHandler' src/common
rg -n -F -- 'void Write(' src/common/logging
rg -n -F -- 'bool IsSilent' src/common/logging
sed -n '1,175p' src/common/logging/log.cpp
rg -n -F -- 'EmergencyShutdownActive' src/common
rg -n -F -- 'LoadExec:' src/emulator.cpp
sed -n '108,138p' src/emulator.cpp

Repository: KytyPS5/KytyPS5

Length of output: 7741


🏁 Script executed:

nl -ba src/common/assert.cpp | sed -n '1,60p'
nl -ba src/common/subsystems.cpp | sed -n '25,55p'
nl -ba src/common/logging/log.cpp | sed -n '80,145p'
nl -ba src/common/logging/log.cpp | sed -n '175,205p'
nl -ba src/emulator.cpp | sed -n '108,136p'
nl -ba src/emulator.cpp | sed -n '286,305p'
nl -ba src/emulator.cpp | sed -n '325,345p'
nl -ba src/main.cpp | sed -n '460,510p'

Repository: KytyPS5/KytyPS5

Length of output: 8998


🏁 Script executed:

rg -n -F -- 'Log::Initialize' src
rg -n -F -- 'Initialize();' src/emulator.cpp src/main.cpp src/common/subsystems.cpp
nl -ba src/emulator.cpp | sed -n '255,310p'

Repository: KytyPS5/KytyPS5

Length of output: 2330


🏁 Script executed:

rg -n -F -- 'Log::initialize' src
rg -n -F -- 'InitializeThreads' src/common src/main.cpp
rg -n -F -- 'static void Init(' src/emulator.cpp
nl -ba src/emulator.cpp | sed -n '180,255p'

Repository: KytyPS5/KytyPS5

Length of output: 3356


🏁 Script executed:

nl -ba src/common/threads.cpp | sed -n '180,215p'
rg -n -F -- 'Log::Lifecycle' src
rg -n -F -- 'Log::Initialize' src

Repository: KytyPS5/KytyPS5

Length of output: 1381


Report parent-wait timeouts and fail the replacement process.

If the parent has not exited within 30 seconds, Run returns before Init initializes Log::Lifecycle, and Main then returns 0. The replacement exits without loading the game. Because LoadExec starts it with CREATE_NO_WINDOW, the proposed EXIT report has no console or initialized file logger to receive it. Persist the timeout through a sink available before Init, and propagate a nonzero status from Run through Main.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#discussion_r4201897240) **🩺 Stability & Availability** | **🟡 Minor** | **⚡ Quick win** <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash sed -n '80,145p' src/emulator.cpp sed -n '278,345p' src/emulator.cpp sed -n '455,500p' src/main.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 5704 --- 🏁 Script executed: ```bash rg -n -F -- '#define EXIT' src include || test "$?" -eq 1 rg -n -F -- '#define LOGF' src include || test "$?" -eq 1 rg -n -F -- 'void Run(const RunOptions& options)' src/emulator.cpp rg -n -F -- 'CreateProcessW(executable, command.data()' src/emulator.cpp sed -n '1,95p' src/emulator.cpp sed -n '278,310p' src/emulator.cpp sed -n '430,490p' src/main.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 6819 --- 🏁 Script executed: ```bash sed -n '25,65p' src/common/assert.h sed -n '40,72p' src/common/logging/log.h sed -n '485,545p' src/main.cpp rg -n -F -- 'WriteToConsoleAndLog' src/common/logging src rg -n -F -- 'void Init(' src/common/logging ``` Repository: KytyPS5/KytyPS5 Length of output: 6525 --- 🏁 Script executed: ```bash rg -n -F -- 'DbgExitHandler' src/common rg -n -F -- 'void Write(' src/common/logging rg -n -F -- 'bool IsSilent' src/common/logging sed -n '1,175p' src/common/logging/log.cpp rg -n -F -- 'EmergencyShutdownActive' src/common rg -n -F -- 'LoadExec:' src/emulator.cpp sed -n '108,138p' src/emulator.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 7741 --- 🏁 Script executed: ```bash nl -ba src/common/assert.cpp | sed -n '1,60p' nl -ba src/common/subsystems.cpp | sed -n '25,55p' nl -ba src/common/logging/log.cpp | sed -n '80,145p' nl -ba src/common/logging/log.cpp | sed -n '175,205p' nl -ba src/emulator.cpp | sed -n '108,136p' nl -ba src/emulator.cpp | sed -n '286,305p' nl -ba src/emulator.cpp | sed -n '325,345p' nl -ba src/main.cpp | sed -n '460,510p' ``` Repository: KytyPS5/KytyPS5 Length of output: 8998 --- 🏁 Script executed: ```bash rg -n -F -- 'Log::Initialize' src rg -n -F -- 'Initialize();' src/emulator.cpp src/main.cpp src/common/subsystems.cpp nl -ba src/emulator.cpp | sed -n '255,310p' ``` Repository: KytyPS5/KytyPS5 Length of output: 2330 --- 🏁 Script executed: ```bash rg -n -F -- 'Log::initialize' src rg -n -F -- 'InitializeThreads' src/common src/main.cpp rg -n -F -- 'static void Init(' src/emulator.cpp nl -ba src/emulator.cpp | sed -n '180,255p' ``` Repository: KytyPS5/KytyPS5 Length of output: 3356 --- 🏁 Script executed: ```bash nl -ba src/common/threads.cpp | sed -n '180,215p' rg -n -F -- 'Log::Lifecycle' src rg -n -F -- 'Log::Initialize' src ``` Repository: KytyPS5/KytyPS5 Length of output: 1381 --- </details> **Report parent-wait timeouts and fail the replacement process.** If the parent has not exited within 30 seconds, `Run` returns before `Init` initializes `Log::Lifecycle`, and `Main` then returns `0`. The replacement exits without loading the game. Because `LoadExec` starts it with `CREATE_NO_WINDOW`, the proposed `EXIT` report has no console or initialized file logger to receive it. Persist the timeout through a sink available before `Init`, and propagate a nonzero status from `Run` through `Main`. <!-- fingerprinting:phantom:medusa:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:21ae79cec03f342e975ac79b --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -58,3 +58,3 @@
int argc;
uint32_t pad;
const char* argv[3];
const char* argv[35];
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 00:47 UTC · original

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Reserve one more slot so envp stays inside the parameter block.

init_env sets g_envp = argv + argc + 1. Execute can produce argc == 34: the program name, the BO2 default setting, and 32 configured arguments. In that case the terminator is argv[34] and envp points to argv[35]. That slot is outside both 35-entry arrays, and the memset in Execute does not clear it. If the guest walks envp, it reads stack memory that was never initialized.

Make room for an empty environment terminator. Increase the size in both InitEnvParams and EntryParams in src/loader/runtimeLinker.cpp Line 97.

🐛 Proposed fix
-	const char* argv[35];
+	const char* argv[36]; // program, default, 32 args, argv NULL, envp NULL
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

	const char* argv[36]; // program, default, 32 args, argv NULL, envp NULL
**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#discussion_r4201897249) **🩺 Stability & Availability** | **🟡 Minor** | **⚡ Quick win** **Reserve one more slot so `envp` stays inside the parameter block.** `init_env` sets `g_envp = argv + argc + 1`. `Execute` can produce `argc == 34`: the program name, the BO2 default setting, and 32 configured arguments. In that case the terminator is `argv[34]` and `envp` points to `argv[35]`. That slot is outside both 35-entry arrays, and the `memset` in `Execute` does not clear it. If the guest walks `envp`, it reads stack memory that was never initialized. Make room for an empty environment terminator. Increase the size in both `InitEnvParams` and `EntryParams` in `src/loader/runtimeLinker.cpp` Line 97. <details> <summary>🐛 Proposed fix</summary> ```diff - const char* argv[35]; + const char* argv[36]; // program, default, 32 args, argv NULL, envp NULL ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion const char* argv[36]; // program, default, 32 args, argv NULL, envp NULL ``` </details> <!-- suggestion_end --> <!-- fingerprinting:phantom:medusa:pangolin --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:d9b137fb5bd90600cc75f45f --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -1356,6 +1426,7 @@ int main(int, char**) {
CheckSaveRename(temporary.Path(), "replacement-save");
FileSystem::Shutdown();
CheckSocketWakeup();
CheckGuestUdpLobbySocket();
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 00:47 UTC · original

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Guard CheckGuestUdpLobbySocket for Windows, or add non-Windows support.

main calls CheckGuestUdpLobbySocket on every platform. The function is not guarded by #if defined(_WIN32). It depends on behavior that only exists in the Windows branches of src/libs/network.cpp:

  • Net::Getsockopt(..., 0xffff, 0x10000, ...) fails on Linux and macOS. ConvertSocketOptionName now rejects option values above 0xffff, so the call returns ENOPROTOOPT.
  • Setsockopt with 0x1106 fails on Linux and macOS. The option is translated to -1.
  • On macOS, Setsockopt with 0x10000 also fails.

Check calls std::abort() on failure. The test binary therefore aborts on non-Windows hosts before it reaches TestNpWebApi2Memory. CheckSocketWakeup already uses #if defined(__linux__) and #if defined(_WIN32) guards for platform-specific behavior. Apply the same guards here, or implement the options on the other platforms.

Proposed fix
-  CheckGuestUdpLobbySocket();
+#if defined(_WIN32)
+  CheckGuestUdpLobbySocket();
+#endif
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

#if defined(_WIN32)
  CheckGuestUdpLobbySocket();
#endif
**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#discussion_r4201897266) **🎯 Functional Correctness** | **🟠 Major** | **⚡ Quick win** **Guard `CheckGuestUdpLobbySocket` for Windows, or add non-Windows support.** `main` calls `CheckGuestUdpLobbySocket` on every platform. The function is not guarded by `#if defined(_WIN32)`. It depends on behavior that only exists in the Windows branches of `src/libs/network.cpp`: - `Net::Getsockopt(..., 0xffff, 0x10000, ...)` fails on Linux and macOS. `ConvertSocketOptionName` now rejects option values above `0xffff`, so the call returns `ENOPROTOOPT`. - `Setsockopt` with `0x1106` fails on Linux and macOS. The option is translated to `-1`. - On macOS, `Setsockopt` with `0x10000` also fails. `Check` calls `std::abort()` on failure. The test binary therefore aborts on non-Windows hosts before it reaches `TestNpWebApi2Memory`. `CheckSocketWakeup` already uses `#if defined(__linux__)` and `#if defined(_WIN32)` guards for platform-specific behavior. Apply the same guards here, or implement the options on the other platforms. <details> <summary>Proposed fix</summary> ```diff - CheckGuestUdpLobbySocket(); +#if defined(_WIN32) + CheckGuestUdpLobbySocket(); +#endif ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion #if defined(_WIN32) CheckGuestUdpLobbySocket(); #endif ``` </details> <!-- suggestion_end --> <!-- fingerprinting:phantom:poseidon:beignet55 --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:fd9ee28a55013da7fdf6b9ba --> <!-- This is an auto-generated comment by CodeRabbit -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 00:47 UTC · original · reviewed

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/graphics/host_gpu/renderer/depthRenderTarget.cpp (1)

358-359: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Reduce per-draw logging in DepthToColorCopy.

Two unconditional LOGF calls run on every draw that sets a copy flag. A game can issue this copy many times per frame. The log output and formatting cost grow with draw count. Guard the calls with graphics_debug_dump_enabled(), as other draw paths in renderDraw.cpp do, or log only the first few occurrences.

Proposed fix
-	LOGF("DepthToColorCopy: depth=%u stencil=%u sample=%u centroid=%u\n",
-	     rc.copy_depth_to_color, rc.copy_stencil_to_color, rc.copy_sample, rc.copy_centroid);
+	if (graphics_debug_dump_enabled()) {
+		LOGF("DepthToColorCopy: depth=%u stencil=%u sample=%u centroid=%u\n",
+		     rc.copy_depth_to_color, rc.copy_stencil_to_color, rc.copy_sample, rc.copy_centroid);
+	}

Also applies to: 376-381


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae5e775c-da9a-47a7-930a-b69408544476
📥 Commits

Reviewing files that changed from the base of the PR and between cc44a43ebc and 4657fe7b0e.

📒 Files selected for processing (18)
  • src/common/emulatorConfig.cpp
  • src/common/emulatorConfig.h
  • src/emulator.cpp
  • src/emulator.h
  • src/graphics/guest_gpu/command_processor/pm4Handlers.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • src/graphics/host_gpu/renderer/depthRenderTarget.cpp
  • src/graphics/host_gpu/renderer/render.h
  • src/graphics/host_gpu/renderer/renderDraw.cpp
  • src/libs/libC.cpp
  • src/libs/libNet.cpp
  • src/libs/libPlayGo.cpp
  • src/libs/libSystemService.cpp
  • src/libs/network.cpp
  • src/loader/runtimeLinker.cpp
  • src/main.cpp
  • tests/KernelFileSystemTests.cpp
💤 Files with no reviewable changes (1)
  • src/graphics/guest_gpu/command_processor/pm4Handlers.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#pullrequestreview-5436245664) · **reviewed** **Actionable comments posted: 3** <details> <summary>🧹 Nitpick comments (1)</summary><blockquote> <details> <summary>src/graphics/host_gpu/renderer/depthRenderTarget.cpp (1)</summary><blockquote> `358-359`: **🚀 Performance & Scalability** | **🔵 Trivial** | **⚡ Quick win** **Reduce per-draw logging in `DepthToColorCopy`.** Two unconditional `LOGF` calls run on every draw that sets a copy flag. A game can issue this copy many times per frame. The log output and formatting cost grow with draw count. Guard the calls with `graphics_debug_dump_enabled()`, as other draw paths in `renderDraw.cpp` do, or log only the first few occurrences. <details> <summary>Proposed fix</summary> ```diff - LOGF("DepthToColorCopy: depth=%u stencil=%u sample=%u centroid=%u\n", - rc.copy_depth_to_color, rc.copy_stencil_to_color, rc.copy_sample, rc.copy_centroid); + if (graphics_debug_dump_enabled()) { + LOGF("DepthToColorCopy: depth=%u stencil=%u sample=%u centroid=%u\n", + rc.copy_depth_to_color, rc.copy_stencil_to_color, rc.copy_sample, rc.copy_centroid); + } ``` </details> Also applies to: 376-381 <!-- cr-comment:v1:93a8f0dfcf4526fef847ae19 --> </blockquote></details> </blockquote></details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `ae5e775c-da9a-47a7-930a-b69408544476` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between cc44a43ebc53be6c8df1574c65787858d404b5dc and 4657fe7b0e436ffaf592825eadb3a3976dff2813. </details> <details> <summary>📒 Files selected for processing (18)</summary> * `src/common/emulatorConfig.cpp` * `src/common/emulatorConfig.h` * `src/emulator.cpp` * `src/emulator.h` * `src/graphics/guest_gpu/command_processor/pm4Handlers.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.h` * `src/graphics/host_gpu/renderer/depthRenderTarget.cpp` * `src/graphics/host_gpu/renderer/render.h` * `src/graphics/host_gpu/renderer/renderDraw.cpp` * `src/libs/libC.cpp` * `src/libs/libNet.cpp` * `src/libs/libPlayGo.cpp` * `src/libs/libSystemService.cpp` * `src/libs/network.cpp` * `src/loader/runtimeLinker.cpp` * `src/main.cpp` * `tests/KernelFileSystemTests.cpp` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * src/graphics/guest_gpu/command_processor/pm4Handlers.cpp </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=66440390-8496-47d1-879e-5840f45b97dc attempt=e205f202-1412-4130-a3bd-fbebd1f2b3ef batch=1/1 -->
Author
Owner

@⁠Nmzik on GitHub · 2026-10-11 08:26 UTC · original

@⁠thenotsoquietninja44-collab Credited. Thanks! No longer requires hacks with PlayGo

**@⁠Nmzik** on GitHub · 2026-10-11 08:26 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1093#issuecomment-6107118007) @⁠thenotsoquietninja44-collab Credited. Thanks! No longer requires hacks with PlayGo

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.