diff --git a/engine.cmake b/engine.cmake index 3758ad7..6152e64 100644 --- a/engine.cmake +++ b/engine.cmake @@ -119,7 +119,7 @@ set(ENGINE_PLATFORM_UNIX_SRC # X11 source/Platform/Unix/Xlib.cpp - source/Platform/Unix/XRandR.cpp + source/Platform/Unix/Xrandr.cpp source/Platform/Unix/X11Window.cpp source/Platform/Unix/X11Input.cpp source/Platform/Unix/X11Keyboard.cpp diff --git a/source/Platform/Unix/X11Window.cpp b/source/Platform/Unix/X11Window.cpp index 7f9f87d..5f45d53 100644 --- a/source/Platform/Unix/X11Window.cpp +++ b/source/Platform/Unix/X11Window.cpp @@ -3,7 +3,7 @@ #include #include #include -#include "XRandR.h" +#include "Xrandr.h" #include "X11WindowEventHandler.h" #include "Xlib.h" #include "wm_hints.h" @@ -240,7 +240,7 @@ void X11Window::maximize() void X11Window::enterFullscreen(DisplayMode mode) { - if (!XRandR::FindMode(Xlib::getDisplay(), mode.width, mode.height, mode.bpp, &m_fullscreen_mode.size, &m_fullscreen_mode.rate)) { + if (!Xrandr::FindMode(Xlib::getDisplay(), mode.width, mode.height, mode.bpp, &m_fullscreen_mode.size, &m_fullscreen_mode.rate)) { Log::warn("X11: Failed to find a mode"); return; } @@ -253,7 +253,7 @@ void X11Window::toggleFullscreen(bool enable) ::Display* disp = Xlib::getDisplay(); ::Window root; ::XRRScreenConfiguration *conf; - XRandR::VideoMode *mode = &m_desktop_mode; + Xrandr::VideoMode *mode = &m_desktop_mode; root = RootWindow(disp, 0); conf = XRRGetScreenInfo(disp, root); diff --git a/source/Platform/Unix/X11Window.h b/source/Platform/Unix/X11Window.h index 7b8fcaf..944f1a8 100644 --- a/source/Platform/Unix/X11Window.h +++ b/source/Platform/Unix/X11Window.h @@ -78,9 +78,9 @@ protected : Vector2u m_size; - XRandR::VideoMode m_fullscreen_mode; + Xrandr::VideoMode m_fullscreen_mode; - XRandR::VideoMode m_desktop_mode; + Xrandr::VideoMode m_desktop_mode; }; } // namespace sp diff --git a/source/Platform/Unix/XRandR.cpp b/source/Platform/Unix/Xrandr.cpp similarity index 85% rename from source/Platform/Unix/XRandR.cpp rename to source/Platform/Unix/Xrandr.cpp index c934218..9f0b68e 100644 --- a/source/Platform/Unix/XRandR.cpp +++ b/source/Platform/Unix/Xrandr.cpp @@ -1,10 +1,10 @@ -#include "XRandR.h" +#include "Xrandr.h" #include #include namespace sp { -bool XRandR::FindMode(::Display* disp, unsigned int width, unsigned int height, unsigned int bpp, SizeID *id, short *rate) +bool Xrandr::FindMode(::Display* disp, unsigned int width, unsigned int height, unsigned int bpp, SizeID *id, short *rate) { ::XRRScreenSize *xrrs; int num_sizes; @@ -31,4 +31,4 @@ bool XRandR::FindMode(::Display* disp, unsigned int width, unsigned int height, return false; } -} // namespace sp \ No newline at end of file +} // namespace sp diff --git a/source/Platform/Unix/XRandR.h b/source/Platform/Unix/Xrandr.h similarity index 85% rename from source/Platform/Unix/XRandR.h rename to source/Platform/Unix/Xrandr.h index 6faac86..32c616a 100644 --- a/source/Platform/Unix/XRandR.h +++ b/source/Platform/Unix/Xrandr.h @@ -4,7 +4,7 @@ #include -namespace sp { namespace XRandR { +namespace sp { namespace Xrandr { struct VideoMode { SizeID size; @@ -13,6 +13,6 @@ struct VideoMode { bool FindMode(::Display* disp, unsigned int width, unsigned int height, unsigned int bpp, SizeID *id, short *rate); -} } // sp::XRandR +} } // sp::Xrandr #endif /* PLATFORM_UNIX_XRANDR_H */