diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-28 13:04:50 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-28 13:04:50 +0200 |
commit | 22bf928025e0b289cb18b3624081055f96e645c9 (patch) | |
tree | 2d591b52566dea91703d4ae1f92fc614ce141480 /qtmips_gui/lcddisplayview.h | |
parent | edabdffead6d33a4e6a0e5a84d9e15f25a6acf83 (diff) | |
download | qtmips-22bf928025e0b289cb18b3624081055f96e645c9.tar.gz qtmips-22bf928025e0b289cb18b3624081055f96e645c9.tar.bz2 qtmips-22bf928025e0b289cb18b3624081055f96e645c9.zip |
LCD display emulation updated to keep aspect ratio.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/lcddisplayview.h')
-rw-r--r-- | qtmips_gui/lcddisplayview.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qtmips_gui/lcddisplayview.h b/qtmips_gui/lcddisplayview.h index 010a106..461bffc 100644 --- a/qtmips_gui/lcddisplayview.h +++ b/qtmips_gui/lcddisplayview.h @@ -17,15 +17,21 @@ public: ~LcdDisplayView(); void setup(machine::LcdDisplay *lcd_display); + uint fb_width(); + uint fb_height(); public slots: void pixel_update(uint x, uint y, uint r, uint g, uint b); protected: virtual void paintEvent(QPaintEvent *event) override; + virtual void resizeEvent(QResizeEvent *event) override; private: - QImage *fb_pixels; + void update_scale(); + float scale_x; + float scale_y; + QImage *fb_pixels; }; #endif // LCDDISPLAYVIEW_H |