t
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos
Fork of DMSupport by
Diff: Display/BiosDisplay.cpp
- Revision:
- 39:e1cb4dd9bfeb
- Parent:
- 31:d47cffcb0a3e
diff -r 420cdc281467 -r e1cb4dd9bfeb Display/BiosDisplay.cpp --- a/Display/BiosDisplay.cpp Wed Apr 15 09:41:56 2015 +0200 +++ b/Display/BiosDisplay.cpp Tue Apr 28 11:47:20 2015 +0000 @@ -85,14 +85,14 @@ return err; } -BiosDisplay::DisplayError BiosDisplay::powerUp(void* framebuffer, Display::Resolution wanted) +BiosDisplay::DisplayError BiosDisplay::powerUp(void* framebuffer, Display::Resolution res, FrameRate_t rate) { DisplayError err = DisplayError_Ok; if (!_poweredOn) { err = init(); if (err == DisplayError_Ok) { do { - err = (DisplayError)_bios->displayPowerUp(_biosData, framebuffer, (Resolution_t)wanted); + err = (DisplayError)_bios->displayPowerUp(_biosData, framebuffer, (Resolution_t)res, rate); if (err != DisplayError_Ok) { break; @@ -159,7 +159,7 @@ void* BiosDisplay::allocateFramebuffer(Display::Resolution res) { if (_initialized) { - return malloc(fbSize()); + return malloc(_width*_height*bpp(res)); } return NULL; } @@ -167,7 +167,7 @@ void* BiosDisplay::allocateFramebuffers(uint32_t num, Display::Resolution res) { if (_initialized && num>0) { - return malloc(fbSize()*num); + return malloc(_width*_height*bpp(res)*num); } return NULL; } @@ -193,4 +193,3 @@ { return (Resolution)_activeRes; } -