mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Run clang-tidy on OpenGL ES codepaths
This commit is contained in:
parent
e45628e2eb
commit
0512748fce
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@ -222,12 +222,13 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- { name: Windows, os: windows-2022, flags: -GNinja }
|
- { name: Windows, os: windows-2022, flags: -GNinja }
|
||||||
- { name: Linux, os: ubuntu-22.04 }
|
- { name: Linux, os: ubuntu-22.04 }
|
||||||
- { name: Linux DRM, os: ubuntu-22.04, flags: -DSFML_USE_DRM=TRUE }
|
- { name: Linux DRM, os: ubuntu-22.04, flags: -DSFML_USE_DRM=TRUE }
|
||||||
- { name: macOS, os: macos-12 }
|
- { name: Linux OpenGL ES, os: ubuntu-22.04, flags: -DSFML_OPENGL_ES=ON }
|
||||||
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }
|
- { name: macOS, os: macos-12 }
|
||||||
- { name: Android, os: ubuntu-22.04, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r23b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
|
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }
|
||||||
|
- { name: Android, os: ubuntu-22.04, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r23b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
|
@ -399,7 +399,7 @@ void EglContext::updateSettings()
|
|||||||
|
|
||||||
#if defined(SFML_SYSTEM_LINUX) && !defined(SFML_USE_DRM)
|
#if defined(SFML_SYSTEM_LINUX) && !defined(SFML_USE_DRM)
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsPerPixel, const ContextSettings& settings)
|
XVisualInfo EglContext::selectBestVisual(::Display* xDisplay, unsigned int bitsPerPixel, const ContextSettings& settings)
|
||||||
{
|
{
|
||||||
EglContextImpl::ensureInit();
|
EglContextImpl::ensureInit();
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
|
|||||||
// Should never happen...
|
// Should never happen...
|
||||||
err() << "No EGL visual found. You should check your graphics driver" << std::endl;
|
err() << "No EGL visual found. You should check your graphics driver" << std::endl;
|
||||||
|
|
||||||
return XVisualInfo();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
XVisualInfo vTemplate;
|
XVisualInfo vTemplate;
|
||||||
@ -427,14 +427,14 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
|
|||||||
|
|
||||||
// Get X11 visuals compatible with this EGL config
|
// Get X11 visuals compatible with this EGL config
|
||||||
int visualCount = 0;
|
int visualCount = 0;
|
||||||
auto availableVisuals = X11Ptr<XVisualInfo[]>(XGetVisualInfo(XDisplay, VisualIDMask, &vTemplate, &visualCount));
|
auto availableVisuals = X11Ptr<XVisualInfo[]>(XGetVisualInfo(xDisplay, VisualIDMask, &vTemplate, &visualCount));
|
||||||
|
|
||||||
if (visualCount == 0)
|
if (visualCount == 0)
|
||||||
{
|
{
|
||||||
// Can't happen...
|
// Can't happen...
|
||||||
err() << "No X11 visual found. Bug in your EGL implementation ?" << std::endl;
|
err() << "No X11 visual found. Bug in your EGL implementation ?" << std::endl;
|
||||||
|
|
||||||
return XVisualInfo();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick up the best one
|
// Pick up the best one
|
||||||
|
Loading…
Reference in New Issue
Block a user