mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Remove unnecessary sf::
namespaces
This commit is contained in:
parent
9a75494c01
commit
a6b63de5ec
@ -696,7 +696,7 @@ Vector2i getTouchPosition(unsigned int finger, const WindowBase& /*relativeTo*/)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool checkEvent(sf::Event& event)
|
bool checkEvent(Event& event)
|
||||||
{
|
{
|
||||||
const std::lock_guard lock(inputMutex);
|
const std::lock_guard lock(inputMutex);
|
||||||
if (!eventQueue.empty())
|
if (!eventQueue.empty())
|
||||||
|
@ -38,7 +38,7 @@ std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
|||||||
{
|
{
|
||||||
std::vector<VideoMode> modes;
|
std::vector<VideoMode> modes;
|
||||||
|
|
||||||
const Drm& drm = sf::priv::DRMContext::getDRM();
|
const Drm& drm = DRMContext::getDRM();
|
||||||
drmModeConnectorPtr conn = drm.savedConnector;
|
drmModeConnectorPtr conn = drm.savedConnector;
|
||||||
|
|
||||||
if (conn)
|
if (conn)
|
||||||
@ -56,7 +56,7 @@ std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
VideoMode VideoModeImpl::getDesktopMode()
|
VideoMode VideoModeImpl::getDesktopMode()
|
||||||
{
|
{
|
||||||
const Drm& drm = sf::priv::DRMContext::getDRM();
|
const Drm& drm = DRMContext::getDRM();
|
||||||
drmModeModeInfoPtr ptr = drm.mode;
|
drmModeModeInfoPtr ptr = drm.mode;
|
||||||
if (ptr)
|
if (ptr)
|
||||||
return VideoMode({ptr->hdisplay, ptr->vdisplay});
|
return VideoMode({ptr->hdisplay, ptr->vdisplay});
|
||||||
|
@ -46,7 +46,7 @@ namespace InputImpl
|
|||||||
/// \return False if event queue is empty
|
/// \return False if event queue is empty
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool checkEvent(sf::Event& event);
|
bool checkEvent(Event& event);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Backup terminal configuration and disable console feedback
|
/// \brief Backup terminal configuration and disable console feedback
|
||||||
@ -65,7 +65,7 @@ void restoreTerminalConfig();
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
WindowImplDRM::WindowImplDRM(WindowHandle /*handle*/)
|
WindowImplDRM::WindowImplDRM(WindowHandle /*handle*/)
|
||||||
{
|
{
|
||||||
sf::priv::InputImpl::setTerminalConfig();
|
InputImpl::setTerminalConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,21 +73,21 @@ WindowImplDRM::WindowImplDRM(WindowHandle /*handle*/)
|
|||||||
WindowImplDRM::WindowImplDRM(VideoMode mode, const String& /*title*/, unsigned long /*style*/, const ContextSettings& /*settings*/) :
|
WindowImplDRM::WindowImplDRM(VideoMode mode, const String& /*title*/, unsigned long /*style*/, const ContextSettings& /*settings*/) :
|
||||||
m_size(mode.size)
|
m_size(mode.size)
|
||||||
{
|
{
|
||||||
sf::priv::InputImpl::setTerminalConfig();
|
InputImpl::setTerminalConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
WindowImplDRM::~WindowImplDRM()
|
WindowImplDRM::~WindowImplDRM()
|
||||||
{
|
{
|
||||||
sf::priv::InputImpl::restoreTerminalConfig();
|
InputImpl::restoreTerminalConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
WindowHandle WindowImplDRM::getNativeHandle() const
|
WindowHandle WindowImplDRM::getNativeHandle() const
|
||||||
{
|
{
|
||||||
const Drm& drm = sf::priv::DRMContext::getDRM();
|
const Drm& drm = DRMContext::getDRM();
|
||||||
return static_cast<WindowHandle>(drm.fileDescriptor);
|
return static_cast<WindowHandle>(drm.fileDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,8 +186,8 @@ bool WindowImplDRM::hasFocus() const
|
|||||||
|
|
||||||
void WindowImplDRM::processEvents()
|
void WindowImplDRM::processEvents()
|
||||||
{
|
{
|
||||||
sf::Event event;
|
Event event;
|
||||||
while (sf::priv::InputImpl::checkEvent(event))
|
while (InputImpl::checkEvent(event))
|
||||||
pushEvent(event);
|
pushEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user