aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/dispmanxsdl
diff options
context:
space:
mode:
authorvanfanel2015-03-14 05:06:03 +0100
committervanfanel2015-07-20 17:13:19 +0200
commiteeb9ec9af9c3b1e94d4cd5854e82ef5238f9f335 (patch)
treeb6d56f5852268bd61367d325a68ce2eae0bd789a /backends/graphics/dispmanxsdl
parent0855b41c0786cdb6bfb89cd2d90bfcc74f4d0c36 (diff)
downloadscummvm-rg350-eeb9ec9af9c3b1e94d4cd5854e82ef5238f9f335.tar.gz
scummvm-rg350-eeb9ec9af9c3b1e94d4cd5854e82ef5238f9f335.tar.bz2
scummvm-rg350-eeb9ec9af9c3b1e94d4cd5854e82ef5238f9f335.zip
RASPBERRYPI: Corrected redundant for loop on the dispmanx graphics driver code.
Diffstat (limited to 'backends/graphics/dispmanxsdl')
-rw-r--r--backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp b/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp
index d67cb90f65..08379d2a34 100644
--- a/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp
+++ b/backends/graphics/dispmanxsdl/dispmanxsdl-graphics.cpp
@@ -101,11 +101,8 @@ void DispmanXSdlGraphicsManager::DispmanXInit () {
_dispvars->pages[i].numpage = i;
_dispvars->pages[i].used = false;
_dispvars->pages[i].dispvars = _dispvars;
- }
-
- for (i = 0; i < numpages; i++) {
pthread_mutex_init(&_dispvars->pages[i].pageUseMutex, NULL);
- }
+ }
// Before we call any vc_* function, we need to call this one.
bcm_host_init();
@@ -216,9 +213,9 @@ void DispmanXVSyncCallback (DISPMANX_UPDATE_HANDLE_T u, void * arg){
// We mark as free the page that was visible until now
if (page->dispvars->currentPage != NULL) {
- pthread_mutex_lock(&page->pageUseMutex);
+ pthread_mutex_lock(&page->dispvars->currentPage->pageUseMutex);
page->dispvars->currentPage->used = false;
- pthread_mutex_unlock(&page->pageUseMutex);
+ pthread_mutex_unlock(&page->dispvars->currentPage->pageUseMutex);
}
// The page on which we just issued the flip that caused this callback becomes the visible one