18#ifndef INCLUDED_VIDEOMODE
19#define INCLUDED_VIDEOMODE
126 bool SetVideoMode(
int w,
int h,
int bpp,
bool fullscreen);
struct SDL_Window SDL_Window
Definition: VideoMode.h:26
CVideoMode g_VideoMode
Definition: VideoMode.cpp:118
Definition: VideoMode.cpp:121
Definition: VideoMode.h:37
void DowngradeBackendSettingAfterCreationFailure()
Definition: VideoMode.cpp:688
CVideoMode()
Definition: VideoMode.cpp:269
int m_WindowedY
Definition: VideoMode.h:166
bool IsInFullscreen() const
Returns true if window runs in fullscreen mode.
Definition: VideoMode.cpp:799
bool m_ConfigEnableHiDPI
Definition: VideoMode.h:154
bool InitSDL()
Initialise the video mode, for use in an SDL-using application.
Definition: VideoMode.cpp:538
int GetDesktopFreq() const
Definition: VideoMode.cpp:890
bool m_IsFullscreen
Definition: VideoMode.h:169
void Rescale(float scale)
Set scale and tell dependent compoenent to recompute sizes.
Definition: VideoMode.cpp:721
std::unique_ptr< Renderer::Backend::IDevice > m_BackendDevice
Definition: VideoMode.h:180
int m_PreferredW
Definition: VideoMode.h:142
bool InitNonSDL()
Initialise parts of the video mode, for use in Atlas (which uses wxWidgets instead of SDL for GL).
Definition: VideoMode.cpp:614
SDL_Window * GetWindow()
Definition: VideoMode.cpp:896
static void UpdateRenderer(int w, int h)
Update the graphics code to start drawing to the new size.
Definition: VideoMode.cpp:813
void Shutdown()
Shut down after InitSDL/InitNonSDL, so that they can be used again.
Definition: VideoMode.cpp:625
int m_ConfigBPP
Definition: VideoMode.h:152
bool CreateBackendDevice(const bool createSDLContext)
Creates a backend device.
Definition: VideoMode.cpp:641
void SetCursor(const CStrW &name)
Definition: VideoMode.cpp:938
int GetDesktopBPP() const
Definition: VideoMode.cpp:884
int GetBestBPP()
Definition: VideoMode.cpp:839
int m_ConfigDisplay
Definition: VideoMode.h:153
Renderer::Backend::Backend m_Backend
Definition: VideoMode.h:179
int m_ConfigH
Definition: VideoMode.h:151
bool SetFullscreen(bool fullscreen)
Switch to fullscreen or windowed mode.
Definition: VideoMode.cpp:733
void UpdatePosition(int x, int y)
Update window position, to restore later if necessary (SDL2 only).
Definition: VideoMode.cpp:804
int GetXRes() const
Definition: VideoMode.cpp:848
int m_CurrentH
Definition: VideoMode.h:173
int m_WindowedH
Definition: VideoMode.h:164
int m_PreferredBPP
Definition: VideoMode.h:144
bool IsVSyncEnabled() const
Definition: VideoMode.cpp:866
int GetBPP() const
Definition: VideoMode.cpp:860
Renderer::Backend::IDevice * GetBackendDevice()
Definition: VideoMode.h:121
int GetYRes() const
Definition: VideoMode.cpp:854
int m_WindowedW
Definition: VideoMode.h:163
int GetDesktopXRes() const
Definition: VideoMode.cpp:872
SDL_Window * m_Window
Definition: VideoMode.h:138
bool ToggleFullscreen()
Switch between fullscreen and windowed mode.
Definition: VideoMode.cpp:794
float GetScale() const
Definition: VideoMode.cpp:728
bool m_ConfigFullscreen
Definition: VideoMode.h:159
void ReadConfig()
Definition: VideoMode.cpp:276
int GetDesktopYRes() const
Definition: VideoMode.cpp:878
int m_WindowedX
Definition: VideoMode.h:165
int m_CurrentBPP
Definition: VideoMode.h:174
void SetWindowIcon()
Definition: VideoMode.cpp:902
float m_Scale
Definition: VideoMode.h:147
int m_PreferredFreq
Definition: VideoMode.h:145
void ResetCursor()
Definition: VideoMode.cpp:944
std::unique_ptr< CCursor > m_Cursor
Definition: VideoMode.h:177
int m_ConfigW
Definition: VideoMode.h:150
int m_CurrentW
Definition: VideoMode.h:172
bool TryCreateBackendDevice(SDL_Window *window)
Definition: VideoMode.cpp:655
bool m_IsInitialised
Remember whether Init has been called.
Definition: VideoMode.h:136
bool m_ConfigVSync
Definition: VideoMode.h:155
bool ResizeWindow(int w, int h)
Resize the SDL window and associated graphics stuff to the new size.
Definition: VideoMode.cpp:696
int m_PreferredH
Definition: VideoMode.h:143
bool SetVideoMode(int w, int h, int bpp, bool fullscreen)
Definition: VideoMode.cpp:308
Backend
Definition: Backend.h:28
Definition: VideoMode.h:29