From e2df209c18a29b9dd66a47ae29a14ca273abf512 Mon Sep 17 00:00:00 2001
From: Oliver Bock <oliver.bock@aei.mpg.de>
Date: Sat, 28 Mar 2009 18:03:43 +0100
Subject: [PATCH] Try fallback without multisampling

---
 src/framework/WindowManager.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/framework/WindowManager.cpp b/src/framework/WindowManager.cpp
index 7b67707..537a4ed 100644
--- a/src/framework/WindowManager.cpp
+++ b/src/framework/WindowManager.cpp
@@ -150,8 +150,7 @@ bool WindowManager::initialize(const int width, const int height, const int fram
 							m_VideoModeFlags);
 
 	if (m_DisplaySurface == NULL) {
-		cerr << "Could not acquire rendering surface: " << SDL_GetError() << endl;
-		return false;
+		cerr << "Could not acquire rendering surface (" << SDL_GetError() << "): will try fallback..." << endl;
 	}
 
 	// check if we got acceleration
@@ -160,8 +159,8 @@ bool WindowManager::initialize(const int width, const int height, const int fram
 		cerr << "Could not ensure accelerated rendering surface. Assuming no acceleration..." << endl;
 	}
 
-	if (!accelerated) {
-		cerr << "Hardware acceleration isn't available! Disabling high quality features..." << endl;
+	if (m_DisplaySurface == NULL || !accelerated) {
+		cerr << "Disabling high quality features..." << endl;
 
 		// disable features that demand acceleration
 //		SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 0);
@@ -179,7 +178,7 @@ bool WindowManager::initialize(const int width, const int height, const int fram
 								m_VideoModeFlags);
 
 		if (m_DisplaySurface == NULL) {
-			cerr << "Could not acquire rendering surface: " << SDL_GetError() << endl;
+			cerr << "Could not acquire rendering surface (" << SDL_GetError() << "): giving up!" << endl;
 			return false;
 		}
 	}
-- 
GitLab