Add exclusive mode OSD messages.

This commit is contained in:
Jules Blok 2015-01-17 04:23:48 +01:00
parent b87fddb027
commit 8d69658a9d
2 changed files with 17 additions and 0 deletions

View File

@ -211,6 +211,11 @@ bool CRenderFrame::ShowFullScreen(bool show, long style)
{
// OpenGL requires the pop-up style to activate exclusive mode.
SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW);
// Some backends don't support exclusive fullscreen, so we
// can't tell exactly when exclusive mode is activated.
if (!g_Config.backend_info.bSupportsExclusiveFullscreen)
OSD::AddMessage("Enabled exclusive fullscreen.");
}
#endif

View File

@ -43,6 +43,7 @@ namespace DX11
static u32 s_last_multisample_mode = 0;
static bool s_last_stereo_mode = false;
static bool s_last_xfb_mode = false;
static bool s_last_fullscreen = false;
static Television s_television;
@ -230,6 +231,7 @@ Renderer::Renderer(void *&window_handle)
s_last_efb_scale = g_ActiveConfig.iEFBScale;
s_last_stereo_mode = g_ActiveConfig.iStereoMode > 0;
s_last_xfb_mode = g_ActiveConfig.bUseRealXFB;
s_last_fullscreen = g_ActiveConfig.bFullscreen;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
SetupDeviceObjects();
@ -885,6 +887,11 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
{
if (fullscreen && !exclusive_mode)
{
if (s_last_fullscreen)
OSD::AddMessage("Lost exclusive fullscreen.");
s_last_fullscreen = false;
// Exclusive fullscreen is enabled in the configuration, but we're
// not in exclusive mode. Either exclusive fullscreen was turned on
// or the render frame lost focus. When the render frame is in focus
@ -915,6 +922,11 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
// Apply fullscreen state
if (fullscreen_changed)
{
s_last_fullscreen = fullscreen;
if (fullscreen)
OSD::AddMessage("Entered exclusive fullscreen.");
D3D::SetFullscreenState(fullscreen);
// If fullscreen is disabled we can safely notify the UI to exit fullscreen.