This is helpful to know which backend the user is using, as well as version specific issues.
Details
- Run pyrogenesis.
- Inspect ~/.config/0ad/logs/userreport_hwdetect.txt
- It should contain two new fields, sdl2_version and sdl2_video_backend.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- hwdetect-sdl2
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 10369 Build 17689: Vulcan Build Jenkins Build 17688: Vulcan Build (Windows) Jenkins Build 17687: arc lint + arc unit
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/792/display/redirect
You need to update report version too.
source/ps/GameSetup/HWDetect.cpp | ||
---|---|---|
46 | It's not usual include, should be in the system "section". Why it's not included in libsdl.h? | |
373 | I think just SDL, as most of SDL API doesn't contain 2 in names. | |
376 | It returns compiled version: https://wiki.libsdl.org/SDL_version. | |
379 | We use the secure function instead sprintf_s. | |
383 | Early return instead and use the return value in-place. | |
385 | I'd like to use std::string here if possible, as we don't have frequent allocations here. | |
388 | case should have the same indentation as the switch: https://trac.wildfiregames.com/wiki/Coding_Conventions. | |
411 | We need to avoid default in switch to not miss a new value, also not all values are reported. |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1308/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/793/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1309/display/redirect
For the error maybe https://stackoverflow.com/questions/20139642/c2732-linkage-specification-error
source/ps/GameSetup/HWDetect.cpp | ||
---|---|---|
411 | What about LOGWARNING("")? It would be nice to actually have errors when they occur? :) |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1310/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/794/display/redirect
source/ps/GameSetup/HWDetect.cpp | ||
---|---|---|
46 | It isn’t included as part of libsdl.h because it includes a bunch of platform-specific headers we might not want on all platforms, which may pollute the global environment. |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1311/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/795/display/redirect
- Use ARRAY_SIZE() instead of hardcoding the array size.
- Use the correct first version for WinRT and OS/2.
- Increment the reportVersion.
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/885/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1401/display/redirect
It seems that it doesn't compile because SDL_syswm.h includes windows.h with extern "C", but previous ones include without. My suggestion is to move SDL2 information functions to libraries and include only SDL related things. It's also good because you won't have SDL2 internal logic in HWDetect.
source/ps/GameSetup/HWDetect.cpp | ||
---|---|---|
390 | I mean to print the real error, it's available from SDL_GetError(). |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/886/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1402/display/redirect
Won’t that be fixed once we don’t redefine the WGL types in wgl.h (that is, once that file gets nuked)?
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1604/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1086/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1087/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/lib/external_libraries/libsdl.h | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2015" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1605/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1088/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1089/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/lib/external_libraries/libsdl.h | 1| /*·Copyright·(C)·2015·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2015" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1606/display/redirect
source/lib/external_libraries/libsdl.cpp | ||
---|---|---|
19 ↗ | (On Diff #11098) | You need to include libsdl.h as well: #include "precompiled.h" #include "libsdl.h" #include <SDL_syswm.h> |
34 ↗ | (On Diff #11098) | Maybe to avoid possible warning and undefined function results use a variable. Like: const char* subsystem = "unknown"; switch (wminfo.subsystem) { case SDL_SYSWM_WAYLAND: subsystem = "Wayland"; break; case SDL_SYSWM_X11: } return subsystem; Or just add return "unknown"; to the end of function? |
source/ps/GameSetup/HWDetect.cpp | ||
380 | "sdl_*" here and below. |
source/lib/external_libraries/libsdl.cpp | ||
---|---|---|
34 ↗ | (On Diff #11098) | There shouldn’t have been any warning or undefined result, because of the default you made me make conditional on line 66. |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/182/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1607/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/183/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/184/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/185/display/redirect
- Rename the sdl2_* keys to sdl_*.
- Include used CLogger.h.
- Include useless libsdl.h but that’s part of the project guidelines.
- Attempt a workaround for MSVC2015.
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1090/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1608/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/186/display/redirect