From 063638103b64b67c9de3b3fda598a1e4d7da6d84 Mon Sep 17 00:00:00 2001 From: t-moe Date: Sat, 4 Apr 2015 00:10:43 +0200 Subject: [PATCH] Improved tff_draw_bitmap_unscaled in emulator. --- emulator/qt/mainwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emulator/qt/mainwindow.cpp b/emulator/qt/mainwindow.cpp index 6894375..2dc85ce 100644 --- a/emulator/qt/mainwindow.cpp +++ b/emulator/qt/mainwindow.cpp @@ -4,7 +4,6 @@ #include #include - #define DISPLAY_WIDTH 320 #define DISPLAY_HEIGHT 240 #define DISPLAY_X 10 @@ -83,14 +82,19 @@ void MainWindow::fill_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t void MainWindow::draw_bitmap_unscaled(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint16_t *dat) { - //render_mutex.lock(); + //Creating a new image and access it directly is faster than setPixel + QImage img(width,height,QImage::Format_RGB32); for(int yi=0; yi