mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Only create OpenGL context on Linux
.. MacOS Qt crashes when destroying it, OpenGL is *that* broken by Apple. .. applied to Windows too, despite it not being an issue reported there is no value in doing it so removed. [publish binaries]
This commit is contained in:
@@ -257,7 +257,9 @@ QString GcCrashDialog::versionHTML()
|
||||
"<br>DB Schema: %5"
|
||||
"<br>Metrics: %7"
|
||||
"<br>OS: %6"
|
||||
#ifdef Q_OS_LINUX
|
||||
"<br>OpenGL: %8"
|
||||
#endif
|
||||
"<br>")
|
||||
.arg(__DATE__)
|
||||
.arg(__TIME__)
|
||||
@@ -270,7 +272,10 @@ QString GcCrashDialog::versionHTML()
|
||||
.arg(schemaVersion)
|
||||
.arg(os)
|
||||
.arg(factory.metricCount())
|
||||
.arg(gl_version);
|
||||
#ifdef Q_OS_LINUX
|
||||
.arg(gl_version)
|
||||
#endif
|
||||
;
|
||||
|
||||
QString lib_version = tr(
|
||||
"<table>"
|
||||
|
||||
@@ -372,8 +372,9 @@ MainWindow::MainWindow(const QDir &home)
|
||||
spacer->setFixedWidth(5 *dpiYFactor);
|
||||
head->addWidget(spacer);
|
||||
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
// check opengl is available with version 2 or higher
|
||||
// only do this on Linux since Windows and MacOS have opengl "issues"
|
||||
QOffscreenSurface surf;
|
||||
surf.create();
|
||||
|
||||
@@ -384,6 +385,7 @@ MainWindow::MainWindow(const QDir &home)
|
||||
// OpenGL version number
|
||||
gl_version = QString::fromUtf8((char *)(ctx.functions()->glGetString(GL_VERSION)));
|
||||
gl_major = Utils::number(gl_version);
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* Central Widget
|
||||
|
||||
Reference in New Issue
Block a user