From f0a7d551bad15085c1f72df38b6a216c8bf3127d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 May 2012 21:34:11 +0300 Subject: Auto detect better video mode at first start. --- src/client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 383a40da1..e7083f943 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -508,6 +508,15 @@ void Client::gameInit() } #endif +#ifdef WIN32 + if (mOptions.test.empty() && !config.getBoolValue("videodetected")) + { + int val = graphicsManager.startDetection(); + if (val >= 0 && val <= 2) + config.setValue("opengl", val); + config.setValue("videodetected", true); + } +#endif graphicsManager.initGraphics(mOptions.noOpenGL); runCounters = config.getBoolValue("packetcounters"); -- cgit v1.2.3-70-g09d2