Showing the changes to interface/src/main.cpp (1 of 5 files). Show all
Unified · Split
| @@ -144,25 +144,33 @@ int main(int argc, const char* argv[]) { · 143 unmodified lines | ||
| 144 | 144 | #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 | 152 | // Check OpenGL version. |
| 148 | 153 | // This is done separately from the main Application so that start-up and shut-down logic within the main Application is |
| 149 | 154 | // not made more complicated than it already is. |
| 150 | − bool override = false; | |
| 155 | + bool overrideGLCheck = false; | |
| 156 | + | |
| 151 | 157 | QJsonObject glData; |
| 152 | 158 | { |
| 153 | 159 | OpenGLVersionChecker openGLVersionChecker(argc, const_cast<char**>(argv)); |
| 154 | 160 | bool valid = true; |
| 155 | − glData = openGLVersionChecker.checkVersion(valid, override); | |
| 161 | + glData = openGLVersionChecker.checkVersion(valid, overrideGLCheck); | |
| 156 | 162 | if (!valid) { |
| 157 | − if (override) { | |
| 163 | + if (overrideGLCheck) { | |
| 158 | 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 | 166 | } else { |
| 161 | − qCDebug(interfaceapp, "Early exit due to OpenGL version."); | |
| 167 | + qCWarning(interfaceapp, "Early exit due to OpenGL version."); | |
| 162 | 168 | return 0; |
| 163 | 169 | } |
| 164 | 170 | } |
| 165 | 171 | } |
| 172 | +#endif | |
| 173 | + | |
| 166 | 174 | |
| 167 | 175 | // Debug option to demonstrate that the client's local time does not |
| 168 | 176 | // 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 | 232 | Application app(argcExtended, const_cast<char**>(argvExtended.data()), startupTime, runningMarkerExisted); |
| 225 | 233 | |
| 234 | +#if 0 | |
| 226 | 235 | // If we failed the OpenGLVersion check, log it. |
| 227 | − if (override) { | |
| 236 | + if (overrideGLcheck) { | |
| 228 | 237 | auto accountManager = DependencyManager::get<AccountManager>(); |
| 229 | 238 | if (accountManager->isLoggedIn()) { |
| 230 | 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 | 253 | // Setup local server |
| 243 | 254 | QLocalServer server { &app }; |