History

Various Mac fixes

Bradley Austin Davis committed 9 years ago

Commit eb8b8921 parent 37b184d5 files · +41 −19Browse files

Showing the changes to interface/src/main.cpp (1 of 5 files). Show all

Unified · Split

interface/src/main.cpp+17−6
@@ -144,25 +144,33 @@ int main(int argc, const char* argv[]) { · 143 unmodified lines
144144 #endif
145145 }
146146
147+
148+ // FIXME this method of checking the OpenGL version screws up the `QOpenGLContext::globalShareContext()` value, which in turn
149+ // leads to crashes when creating the real OpenGL instance. Disabling for now until we come up with a better way of checking
150+ // the GL version on the system without resorting to creating a full Qt application
151+#if 0
147152 // Check OpenGL version.
148153 // This is done separately from the main Application so that start-up and shut-down logic within the main Application is
149154 // not made more complicated than it already is.
150− bool override = false;
155+ bool overrideGLCheck = false;
156+
151157 QJsonObject glData;
152158 {
153159 OpenGLVersionChecker openGLVersionChecker(argc, const_cast<char**>(argv));
154160 bool valid = true;
155− glData = openGLVersionChecker.checkVersion(valid, override);
161+ glData = openGLVersionChecker.checkVersion(valid, overrideGLCheck);
156162 if (!valid) {
157− if (override) {
163+ if (overrideGLCheck) {
158164 auto glVersion = glData["version"].toString();
159− qCDebug(interfaceapp, "Running on insufficient OpenGL version: %s.", glVersion.toStdString().c_str());
165+ qCWarning(interfaceapp, "Running on insufficient OpenGL version: %s.", glVersion.toStdString().c_str());
160166 } else {
161− qCDebug(interfaceapp, "Early exit due to OpenGL version.");
167+ qCWarning(interfaceapp, "Early exit due to OpenGL version.");
162168 return 0;
163169 }
164170 }
165171 }
172+#endif
173+
166174
167175 // Debug option to demonstrate that the client's local time does not
168176 // need to be in sync with any other network node. This forces clock
@@ -223,8 +231,9 @@ int main(int argc, const char* argv[]) { · 54 unmodified lines
223231
224232 Application app(argcExtended, const_cast<char**>(argvExtended.data()), startupTime, runningMarkerExisted);
225233
234+#if 0
226235 // If we failed the OpenGLVersion check, log it.
227− if (override) {
236+ if (overrideGLcheck) {
228237 auto accountManager = DependencyManager::get<AccountManager>();
229238 if (accountManager->isLoggedIn()) {
230239 UserActivityLogger::getInstance().insufficientGLVersion(glData);
@@ -238,6 +247,8 @@ int main(int argc, const char* argv[]) { · 7 unmodified lines
238247 });
239248 }
240249 }
250+#endif
251+
241252
242253 // Setup local server
243254 QLocalServer server { &app };