Skip to content

Commit

Permalink
Applied format changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 30, 2024
1 parent 06d591d commit 4fbf744
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
48 changes: 26 additions & 22 deletions FastCG/src/Graphics/OpenGL/OpenGLGraphicsSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ namespace
FASTCG_THROW_EXCEPTION(FastCG::Exception, "GLX: GLX_ARB_create_context extension not supported");
}

const int contextAttribs[] = {GLX_CONTEXT_MAJOR_VERSION_ARB,
4,
GLX_CONTEXT_MINOR_VERSION_ARB,
3,
GLX_CONTEXT_PROFILE_MASK_ARB,
GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
GLX_CONTEXT_FLAGS_ARB,
GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
const int contextAttribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB,
4,
GLX_CONTEXT_MINOR_VERSION_ARB,
3,
GLX_CONTEXT_PROFILE_MASK_ARB,
GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
GLX_CONTEXT_FLAGS_ARB,
GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
#if _DEBUG
| GLX_CONTEXT_DEBUG_BIT_ARB
| GLX_CONTEXT_DEBUG_BIT_ARB
#endif
,
0};
,
0
};

auto *pOldErrorHandler = XSetErrorHandler(&GLXContextErrorHandler);
auto context = glXCreateContextAttribsARB(pDisplay, fbConfig, oldContext, True, contextAttribs);
Expand Down Expand Up @@ -137,19 +139,21 @@ namespace
FASTCG_THROW_EXCEPTION(FastCG::Exception, "WGL: WGL_ARB_create_context extension not supported");
}

const int contextAttribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB,
4,
WGL_CONTEXT_MINOR_VERSION_ARB,
3,
WGL_CONTEXT_PROFILE_MASK_ARB,
WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
WGL_CONTEXT_FLAGS_ARB,
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
const int contextAttribs[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB,
4,
WGL_CONTEXT_MINOR_VERSION_ARB,
3,
WGL_CONTEXT_PROFILE_MASK_ARB,
WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
WGL_CONTEXT_FLAGS_ARB,
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
#if _DEBUG
| WGL_CONTEXT_DEBUG_BIT_ARB
| WGL_CONTEXT_DEBUG_BIT_ARB
#endif
,
0};
,
0
};

auto context = wglCreateContextAttribsARB(deviceContext, parentContext, contextAttribs);
if (context == nullptr)
Expand Down
5 changes: 4 additions & 1 deletion FastCG/src/Platform/Linux/X11Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ namespace
#undef MAP_KEY
#endif

#define MAP_KEY(a, b) {(uint64_t)a, FastCG::Key::b}
#define MAP_KEY(a, b) \
{ \
(uint64_t) a, FastCG::Key::b \
}

std::unordered_map<uint64_t, FastCG::Key> KEY_LUT = {MAP_KEY(XK_BackSpace, BACKSPACE),
MAP_KEY(XK_Return, RETURN),
Expand Down

0 comments on commit 4fbf744

Please sign in to comment.