mirror of
https://github.com/SFML/SFML.git
synced 2025-02-19 06:39:59 +08:00
Fix several unused warnings
This commit is contained in:
parent
a759ccd5db
commit
761d9d81d0
@ -77,7 +77,7 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Callback that is called every time a context is destroyed
|
// Callback that is called every time a context is destroyed
|
||||||
void contextDestroyCallback(void* arg)
|
void contextDestroyCallback(void* /*arg*/)
|
||||||
{
|
{
|
||||||
sf::Lock lock(mutex);
|
sf::Lock lock(mutex);
|
||||||
|
|
||||||
|
@ -169,13 +169,15 @@ m_config (NULL)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
EglContext::EglContext(EglContext* shared, const ContextSettings& settings, unsigned int width, unsigned int height) :
|
EglContext::EglContext(EglContext* /*shared*/, const ContextSettings& /*settings*/, unsigned int /*width*/, unsigned int /*height*/) :
|
||||||
m_display (EGL_NO_DISPLAY),
|
m_display (EGL_NO_DISPLAY),
|
||||||
m_context (EGL_NO_CONTEXT),
|
m_context (EGL_NO_CONTEXT),
|
||||||
m_surface (EGL_NO_SURFACE),
|
m_surface (EGL_NO_SURFACE),
|
||||||
m_config (NULL)
|
m_config (NULL)
|
||||||
{
|
{
|
||||||
EglContextImpl::ensureInit();
|
EglContextImpl::ensureInit();
|
||||||
|
|
||||||
|
sf::err() << "Warning: context has not been initialized. The constructor EglContext(shared, settings, width, height) is currently not implemented." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ public:
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Create a new context that embeds its own rendering target
|
/// \brief Create a new context that embeds its own rendering target
|
||||||
|
/// \warning This constructor is currently not implemented; use a different overload.
|
||||||
///
|
///
|
||||||
/// \param shared Context to share the new one with
|
/// \param shared Context to share the new one with
|
||||||
/// \param settings Creation parameters
|
/// \param settings Creation parameters
|
||||||
|
@ -132,7 +132,7 @@ m_ownsWindow(false)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
GlxContext::GlxContext(GlxContext* shared, const ContextSettings& settings, const WindowImpl* owner, unsigned int bitsPerPixel) :
|
GlxContext::GlxContext(GlxContext* shared, const ContextSettings& settings, const WindowImpl* owner, unsigned int /*bitsPerPixel*/) :
|
||||||
m_display (NULL),
|
m_display (NULL),
|
||||||
m_window (0),
|
m_window (0),
|
||||||
m_context (NULL),
|
m_context (NULL),
|
||||||
@ -547,6 +547,9 @@ void GlxContext::createSurface(GlxContext* shared, unsigned int width, unsigned
|
|||||||
XSetWindowAttributes attributes;
|
XSetWindowAttributes attributes;
|
||||||
attributes.colormap = XCreateColormap(m_display, RootWindow(m_display, screen), visualInfo.visual, AllocNone);
|
attributes.colormap = XCreateColormap(m_display, RootWindow(m_display, screen), visualInfo.visual, AllocNone);
|
||||||
|
|
||||||
|
// Note: bitsPerPixel is explicitly ignored. Instead, DefaultDepth() is used in order to avoid window creation failure due to
|
||||||
|
// a depth not supported by the X window system. On Unix/Linux, the window's pixel format is not directly associated with the
|
||||||
|
// rendering surface (unlike on Windows, for example).
|
||||||
m_window = XCreateWindow(m_display,
|
m_window = XCreateWindow(m_display,
|
||||||
RootWindow(m_display, screen),
|
RootWindow(m_display, screen),
|
||||||
0, 0,
|
0, 0,
|
||||||
|
@ -1357,8 +1357,8 @@ void WindowImplX11::setVideoMode(const VideoMode& mode)
|
|||||||
std::swap(res->modes[i].height, res->modes[i].width);
|
std::swap(res->modes[i].height, res->modes[i].width);
|
||||||
|
|
||||||
// Check if screen size match
|
// Check if screen size match
|
||||||
if (res->modes[i].width == static_cast<int>(mode.width) &&
|
if ((res->modes[i].width == mode.width) &&
|
||||||
res->modes[i].height == static_cast<int>(mode.height))
|
(res->modes[i].height == mode.height))
|
||||||
{
|
{
|
||||||
xRandMode = res->modes[i].id;
|
xRandMode = res->modes[i].id;
|
||||||
modeFound = true;
|
modeFound = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user