diff options
author | vanfanel | 2015-07-24 11:48:21 +0200 |
---|---|---|
committer | vanfanel | 2015-07-24 11:48:21 +0200 |
commit | 8382e87baad83d0a9c4201f2fa3851f653f3bbb5 (patch) | |
tree | 07eb68ead90897d0d58f261fbc6e7f0b49b8973f /backends/graphics/dispmanxsdl | |
parent | 8cf5f96b9e497803f2fb79b771c3f1c05ee1c554 (diff) | |
download | scummvm-rg350-8382e87baad83d0a9c4201f2fa3851f653f3bbb5.tar.gz scummvm-rg350-8382e87baad83d0a9c4201f2fa3851f653f3bbb5.tar.bz2 scummvm-rg350-8382e87baad83d0a9c4201f2fa3851f653f3bbb5.zip |
SDL/DISPMANX: Made minor corrections sugested by fingolfin.
Diffstat (limited to 'backends/graphics/dispmanxsdl')
-rw-r--r-- | backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp b/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp index e3336844ee..7760005d1f 100644 --- a/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp +++ b/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp @@ -175,7 +175,7 @@ void DispmanXSdlGraphicsManager::dispmanXSetup(int srcWidth, int srcHeight) { vc_dispmanx_update_submit_sync(_dispvars->update); } -void dispmanXVSyncCallback (DISPMANX_UPDATE_HANDLE_T u, void *arg) { +void dispmanXVSyncCallback(DISPMANX_UPDATE_HANDLE_T u, void *arg) { struct dispmanxPage *page = (struct dispmanxPage*)arg; struct dispvarsStruct *dispvars = page->dispvars; @@ -237,12 +237,10 @@ void DispmanXSdlGraphicsManager::dispmanXUpdate() { struct dispmanxPage *DispmanXSdlGraphicsManager::dispmanXGetFreePage(void) { struct dispmanxPage *page = NULL; - while (!page) - { + while (!page) { // Try to find a free page for (int i = 0; i < _dispvars->numpages; ++i) { - if (!_dispvars->pages[i].used) - { + if (!_dispvars->pages[i].used) { page = (_dispvars->pages) + i; break; } @@ -328,8 +326,9 @@ bool DispmanXSdlGraphicsManager::loadGFXMode() { ((1 << _screenFormat.gBits()) - 1) << _screenFormat.gShift , ((1 << _screenFormat.bBits()) - 1) << _screenFormat.bShift , ((1 << _screenFormat.aBits()) - 1) << _screenFormat.aShift ); - if (_screen == NULL) - error("allocating _screen failed"); + if (_screen == NULL) + error("allocating _screen failed"); + // Avoid having SDL_SRCALPHA set even if we supplied an alpha-channel in the format. SDL_SetAlpha(_screen, 0, 255); |