source/Platform/Unix: Rename XRandR to Xrandr
This commit is contained in:
parent
ca46bd0ef7
commit
f71fdea463
5 changed files with 11 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <Spectre/System/Log.h>
|
||||
#include <Spectre/Graphics/Image.h>
|
||||
#include <X11/Xatom.h>
|
||||
#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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "XRandR.h"
|
||||
#include "Xrandr.h"
|
||||
#include <Spectre/System/Log.h>
|
||||
#include <algorithm>
|
||||
|
||||
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;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
|
||||
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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue