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
144#endif144#endif
145 }145 }
146 146
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
147 // Check OpenGL version.152 // Check OpenGL version.
148 // This is done separately from the main Application so that start-up and shut-down logic within the main Application is153 // This is done separately from the main Application so that start-up and shut-down logic within the main Application is
149 // not made more complicated than it already is.154 // not made more complicated than it already is.
150 bool override = false;155 bool overrideGLCheck = false;
156
151 QJsonObject glData;157 QJsonObject glData;
152 {158 {
153 OpenGLVersionChecker openGLVersionChecker(argc, const_cast<char**>(argv));159 OpenGLVersionChecker openGLVersionChecker(argc, const_cast<char**>(argv));
154 bool valid = true;160 bool valid = true;
155 glData = openGLVersionChecker.checkVersion(valid, override);161 glData = openGLVersionChecker.checkVersion(valid, overrideGLCheck);
156 if (!valid) {162 if (!valid) {
157 if (override) {163 if (overrideGLCheck) {
158 auto glVersion = glData["version"].toString();164 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());
160 } else {166 } else {
161 qCDebug(interfaceapp, "Early exit due to OpenGL version.");167 qCWarning(interfaceapp, "Early exit due to OpenGL version.");
162 return 0;168 return 0;
163 }169 }
164 }170 }
165 }171 }
172#endif
173
166 174
167 // Debug option to demonstrate that the client's local time does not175 // Debug option to demonstrate that the client's local time does not
168 // need to be in sync with any other network node. This forces clock176 // 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
223 231
224 Application app(argcExtended, const_cast<char**>(argvExtended.data()), startupTime, runningMarkerExisted);232 Application app(argcExtended, const_cast<char**>(argvExtended.data()), startupTime, runningMarkerExisted);
225 233
234#if 0
226 // If we failed the OpenGLVersion check, log it.235 // If we failed the OpenGLVersion check, log it.
227 if (override) {236 if (overrideGLcheck) {
228 auto accountManager = DependencyManager::get<AccountManager>();237 auto accountManager = DependencyManager::get<AccountManager>();
229 if (accountManager->isLoggedIn()) {238 if (accountManager->isLoggedIn()) {
230 UserActivityLogger::getInstance().insufficientGLVersion(glData);239 UserActivityLogger::getInstance().insufficientGLVersion(glData);
@@ -238,6 +247,8 @@ int main(int argc, const char* argv[]) { · 7 unmodified lines
238 });247 });
239 }248 }
240 }249 }
250#endif
251
241 252
242 // Setup local server253 // Setup local server
243 QLocalServer server { &app };254 QLocalServer server { &app };