Skip to content

Merge branch 'main' into sdl3

0d4b467
Select commit
Loading
Failed to load commit list.
Open

Migration to SDL3. #2017

Merge branch 'main' into sdl3
0d4b467
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed May 25, 2026 in 41s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (2 files improve in Code Health)

Gates Failed
Prevent hotspot decline (1 hotspot with Complex Method)
New code is healthy (1 new file with code health below 9.00)
Enforce critical code health rules (2 files with Bumpy Road Ahead)
Enforce advisory code health rules (3 files with Complex Method, Overall Code Complexity)

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
pad.cc 1 rule in this hotspot 3.51 → 3.65 Suppress
New code is healthy Violations Code Health Impact
sdlaudio.cc 3 rules 7.87 Suppress
Enforce critical code health rules Violations Code Health Impact
sdlaudio.cc 1 critical rule 7.87 Suppress
ram-viewer.cc 1 critical rule 5.90 → 6.00 Suppress
Enforce advisory code health rules Violations Code Health Impact
sdlaudio.cc 2 advisory rules 7.87 Suppress
ram-viewer.cc 1 advisory rule 5.90 → 6.00 Suppress
pad.cc 1 advisory rule 3.51 → 3.65 Suppress
View Improvements
File Code Health Impact Categories Improved
pad.cc 3.51 → 3.65 Lines of Code in a Single File, Complex Method
ram-viewer.cc 5.90 → 6.00 Large Method, Deep, Nested Complexity

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method pad.cc: SdlScancodeToImGuiKey 🔥
  • Complex Method pad.cc: PadsImpl::Pad::getButtons 🔥
  • Complex Method pad.cc: PadsImpl::Pad::configure 🔥
  • Complex Method sdlaudio.cc: PCSX::SPU::SDLAudio::init
  • Overall Code Complexity sdlaudio.cc
  • Bumpy Road Ahead sdlaudio.cc: PCSX::SPU::SDLAudio::init
  • Complex Method pad.cc: sdlScancodeToString 🔥
  • Complex Method sdlaudio.cc: PCSX::SPU::SDLAudio::streamCallback
  • Complex Method ram-viewer.cc: PCSX::Widgets::RAMViewer::drawRAM
  • Bumpy Road Ahead sdlaudio.cc: PCSX::SPU::SDLAudio::streamCallback
  • Bumpy Road Ahead ram-viewer.cc: PCSX::Widgets::RAMViewer::drawRAM

✅ Improving Code Health:

  • Complex Method pad.cc: GlfwKeyToImGuiKey 🔥
  • Complex Method pad.cc: glfwKeyToString 🔥
  • Primitive Obsession gui.cc 🔥
  • Deep, Nested Complexity ram-viewer.cc: PCSX::Widgets::RAMViewer::imguiCB
  • Excess Number of Function Arguments gui.cc: PCSX::GUI::glfwKeyCallback 🔥
  • Lines of Code in a Single File pad.cc 🔥
  • Large Method ram-viewer.cc: PCSX::Widgets::RAMViewer::imguiCB

Annotations

Check warning on line 169 in src/spu/sdlaudio.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Complex Method

PCSX::SPU::SDLAudio::init has a cyclomatic complexity of 24, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 252 in src/spu/sdlaudio.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Complex Method

PCSX::SPU::SDLAudio::streamCallback has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 169 in src/spu/sdlaudio.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Bumpy Road Ahead

PCSX::SPU::SDLAudio::init has 5 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 252 in src/spu/sdlaudio.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Bumpy Road Ahead

PCSX::SPU::SDLAudio::streamCallback has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 1 in src/spu/sdlaudio.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 7.00 across 9 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check notice on line 1 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Lines of Code in a Single File

The lines of code in this module is no longer above the threshold

Check warning on line 621 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

PadsImpl::Pad::getButtons increases in cyclomatic complexity from 29 to 32, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 1094 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

PadsImpl::Pad::configure increases in cyclomatic complexity from 28 to 30, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 329 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Complex Method

GlfwKeyToImGuiKey is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 916 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Complex Method

glfwKeyToString is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 329 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Complex Method

SdlScancodeToImGuiKey has a cyclomatic complexity of 107, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 916 in src/core/pad.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Complex Method

sdlScancodeToString has a cyclomatic complexity of 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/gui/gui.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 37.93% to 32.00%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check notice on line 942 in src/gui/gui.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Excess Number of Function Arguments

PCSX::GUI::glfwKeyCallback is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 423 in src/gui/widgets/ram-viewer.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

PCSX::Widgets::RAMViewer::drawRAM increases in cyclomatic complexity from 9 to 15, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 380 in src/gui/widgets/ram-viewer.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Large Method

PCSX::Widgets::RAMViewer::imguiCB is no longer above the threshold for lines of code

Check warning on line 423 in src/gui/widgets/ram-viewer.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Bumpy Road Ahead

PCSX::Widgets::RAMViewer::drawRAM has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 380 in src/gui/widgets/ram-viewer.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

✅ No longer an issue: Deep, Nested Complexity

PCSX::Widgets::RAMViewer::imguiCB is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.