Repository navigation
Expose display mode bit depth in DisplayInfo (#2871) - #3076
adrian-andrzjewski wants to merge 1 commit into
Conversation
|
@riccardobl Could you review this change when you have a chance? It adds display mode bit depth to |
jaime-jmebot
left a comment
There was a problem hiding this comment.
Hi Adrian, thanks for putting this together. This adds the missing display-mode color depth in a way that fits the existing DisplayInfo model, and the legacy Displays.setInfo(...) overload remains compatible while clearly treating depth as unavailable.
I checked the SDL and AWT population paths, the DisplayInfo equality/hash updates, and the new tests. Using SDL’s pixel-format helper keeps the reported value tied to the display mode rather than the GL framebuffer configuration, while clamping AWT’s unavailable sentinel to 0 matches the API documentation. The tests cover both the new value and the compatibility default, and the reported validation gives good coverage for the affected modules.
Looks good to me—thanks for addressing this!
Closes #2871
What changed
DisplayInfo.getBitDepth()for the current display mode's pixel-format bits per pixel, excluding depth and stencil bits.0when a single value is unavailable.Displays.setInfo(...)signature through a delegating overload.Validation
.\gradlew.bat :jme3-core:test --tests com.jme3.system.DisplayInfoTest :jme3-lwjgl3:compileJava— passed..\gradlew.bat :jme3-core:test :jme3-lwjgl3:compileTestJava— passed; 1,217 core tests, 0 failures, 0 errors, 1 skipped..\gradlew.bat :jme3-core:checkstyleMain :jme3-core:checkstyleTest :jme3-lwjgl3:checkstyleMain— passed; no findings in changed files.git diff --check— passed.The SDL/AWT backend paths compile, but no live display window was opened for this validation.