aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2010-12-08 01:35:54 +0000
committerJohannes Schickel2010-12-08 01:35:54 +0000
commitda2880be47bf614d3c30bf91bb915843bb249158 (patch)
tree9ef783f6208400afc5b4bdcb8cb1e263f95b8f17 /backends/graphics
parente361b84d3baeeb683889e3131e3d05d564f08cc4 (diff)
downloadscummvm-rg350-da2880be47bf614d3c30bf91bb915843bb249158.tar.gz
scummvm-rg350-da2880be47bf614d3c30bf91bb915843bb249158.tar.bz2
scummvm-rg350-da2880be47bf614d3c30bf91bb915843bb249158.zip
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
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp23
1 files changed, 21 insertions, 2 deletions
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;*/
}
//