Add xmessage-based GUI dialog box for debug messages on Linux (fixes #663).

Switch out of fullscreen before displaying dialog boxes.
Add Engine.DebugWarn for testing.

This was SVN commit r8661.
This commit is contained in:
Ykkrosh
2010-11-20 17:14:45 +00:00
parent e971c85da5
commit 74c19b5015
4 changed files with 148 additions and 7 deletions
+13 -5
View File
@@ -254,7 +254,10 @@ bool CVideoMode::ResizeWindow(int w, int h)
bool CVideoMode::SetFullscreen(bool fullscreen)
{
debug_assert(m_IsInitialised);
// This might get called before initialisation by psDisplayError;
// if so then silently fail
if (!m_IsInitialised)
return false;
// Check whether this is actually a change
if (fullscreen == m_IsFullscreen)
@@ -325,12 +328,17 @@ void CVideoMode::UpdateRenderer(int w, int h)
SViewPort vp = { 0, 0, w, h };
g_Renderer.SetViewport(vp);
g_Renderer.Resize(w, h);
if (CRenderer::IsInitialised())
{
g_Renderer.SetViewport(vp);
g_Renderer.Resize(w, h);
}
g_GUI->UpdateResolution();
if (g_GUI)
g_GUI->UpdateResolution();
g_Console->UpdateScreenSize(w, h);
if (g_Console)
g_Console->UpdateScreenSize(w, h);
if (g_Game)
g_Game->GetView()->SetViewport(vp);