From da2880be47bf614d3c30bf91bb915843bb249158 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 8 Dec 2010 01:35:54 +0000 Subject: OPENGL: Disable OSD support for now. I added an comment explaining why OSD is broken currently. The basic problem is that OpenGL is not thread safe, thus in case we try to display any message on the OSD from the sound thread for example it will result in crashes. svn-id: r54829 --- backends/graphics/opengl/opengl-graphics.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index e2f8dd4d30..1eb90a2217 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -596,7 +596,26 @@ void OpenGLGraphicsManager::disableCursorPalette(bool disable) { // void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) { - assert (_transactionMode == kTransactionNone); + // TODO: Fix OSD support. + // + // Actually we have nice OSD support for the OpenGL backend, but + // since the OpenGL context/resources are not shared between threads we + // can not use this here. + // + // A possible way of making the code crash hard is to use the MT-32 emu. + // Whenever there is some message send to the OSD from the emulator's + // sound thread the glBindTexture call inside _osdTexture->updateBuffer + // will result in a crash. + // + // To try it out just uncomment the below code and start up any game which + // prints some info on the MT-32 display. Whenever the message should be + // displayed it will crash hard. + // + // We can not even use a GUI dialog here, since that would also result in + // an change of the overlay surface and thus result in the same problem + // just in another place. + warning("OpenGL: OSD messsage \"%s\" suppressed", msg); + /*assert(_transactionMode == kTransactionNone); assert(msg); // The font we are going to use: @@ -661,7 +680,7 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) { // Init the OSD display parameters, and the fade out _osdAlpha = kOSDInitialAlpha; - _osdFadeStartTime = g_system->getMillis() + kOSDFadeOutDelay; + _osdFadeStartTime = g_system->getMillis() + kOSDFadeOutDelay;*/ } // -- cgit v1.2.3