summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/blackberry
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/blackberry')
-rw-r--r--src/plugins/platforms/blackberry/qbbwindow.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/platforms/blackberry/qbbwindow.cpp b/src/plugins/platforms/blackberry/qbbwindow.cpp
index 284aabf..e87febb 100644
--- a/src/plugins/platforms/blackberry/qbbwindow.cpp
+++ b/src/plugins/platforms/blackberry/qbbwindow.cpp
@@ -319,6 +319,18 @@ void QBBWindow::setBufferSize(const QSize &size)
if (result != 0) {
qFatal("QBBWindow: failed to create window buffers, errno=%d", errno);
}
+
+ // check if there are any buffers available
+ int bufferCount = 0;
+ result = screen_get_window_property_iv(mWindow, SCREEN_PROPERTY_RENDER_BUFFER_COUNT, &bufferCount);
+
+ if (result != 0) {
+ qFatal("QBBWindow: failed to query window buffer count, errno=%d", errno);
+ }
+
+ if (bufferCount != MAX_BUFFER_COUNT) {
+ qFatal("QBBWindow: invalid buffer count. Expected = %d, got = %d", MAX_BUFFER_COUNT, bufferCount);
+ }
}
// cache new buffer size
@@ -356,22 +368,10 @@ QBBBuffer &QBBWindow::buffer(QBBWindow::Buffer bufferIndex)
// check if render buffer is invalid
if (mCurrentBufferIndex == -1) {
- // check if there are any buffers available
- int bufferCount = 0;
- int result = screen_get_window_property_iv(mWindow, SCREEN_PROPERTY_RENDER_BUFFER_COUNT, &bufferCount);
-
- if (result != 0) {
- qFatal("QBBWindow: failed to query window buffer count, errno=%d", errno);
- }
-
- if (bufferCount != MAX_BUFFER_COUNT) {
- qFatal("QBBWindow: invalid buffer count. Expected = %d, got = %d", MAX_BUFFER_COUNT, bufferCount);
- }
-
// get all buffers available for rendering
errno = 0;
screen_buffer_t buffers[MAX_BUFFER_COUNT];
- result = screen_get_window_property_pv(mWindow, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)buffers);
+ const int result = screen_get_window_property_pv(mWindow, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)buffers);
if (result != 0) {
qFatal("QBBWindow: failed to query window buffers, errno=%d", errno);
}