aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorJohannes Schickel2007-11-20 19:59:29 +0000
committerJohannes Schickel2007-11-20 19:59:29 +0000
commitc9a7cbf6ee74698a74be94f4522f427fc09a9c12 (patch)
treec381d71ca772d5aa4c92275fe3c558ce495203d9 /backends/platform
parent94a584c6876c9bf4183e1a8758ef0fd8c67caedf (diff)
downloadscummvm-rg350-c9a7cbf6ee74698a74be94f4522f427fc09a9c12.tar.gz
scummvm-rg350-c9a7cbf6ee74698a74be94f4522f427fc09a9c12.tar.bz2
scummvm-rg350-c9a7cbf6ee74698a74be94f4522f427fc09a9c12.zip
Cleanup.
svn-id: r29584
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/psp/osys_psp.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index ed615d7955..cc64c3b6d3 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -85,9 +85,9 @@ OSystem_PSP::OSystem_PSP() : _screenWidth(0), _screenHeight(0), _overlayWidth(0)
}
OSystem_PSP::~OSystem_PSP() {
- if (_offscreen) free(_offscreen);
- if (_overlayBuffer) free(_overlayBuffer);
- if (_mouseBuf) free(_mouseBuf);
+ free(_offscreen);
+ free(_overlayBuffer);
+ free(_mouseBuf);
}
@@ -138,13 +138,11 @@ void OSystem_PSP::initSize(uint width, uint height) {
_overlayWidth = _screenWidth = width;
_overlayHeight = _screenHeight = height;
- if (_offscreen)
- free(_offscreen);
+ free(_offscreen);
_offscreen = (byte *)malloc(width * height);
- if (_overlayBuffer)
- free(_overlayBuffer);
+ free(_overlayBuffer);
_overlayBuffer = (OverlayColor *)malloc(_overlayWidth * _overlayHeight * sizeof(OverlayColor));
bzero(_offscreen, width * height);
@@ -411,8 +409,7 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
_mouseKeyColour = keycolor;
- if (_mouseBuf)
- free(_mouseBuf);
+ free(_mouseBuf);
_mouseBuf = (byte *)malloc(w * h);
memcpy(_mouseBuf, buf, w * h);