mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 04:28:37 +00:00
COMMON: Add getHiDPIScreenFactor to OSystem
This commit is contained in:
parent
f20c9ab958
commit
6d8462674f
@ -101,6 +101,7 @@ public:
|
||||
virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) = 0;
|
||||
virtual int16 getOverlayHeight() const = 0;
|
||||
virtual int16 getOverlayWidth() const = 0;
|
||||
virtual float getHiDPIScreenFactor() const { return 1.0f; }
|
||||
|
||||
virtual bool showMouse(bool visible) = 0;
|
||||
virtual void warpMouse(int x, int y) = 0;
|
||||
|
@ -243,6 +243,10 @@ int16 ModularGraphicsBackend::getOverlayWidth() {
|
||||
return _graphicsManager->getOverlayWidth();
|
||||
}
|
||||
|
||||
float ModularGraphicsBackend::getHiDPIScreenFactor() const {
|
||||
return _graphicsManager->getHiDPIScreenFactor();
|
||||
}
|
||||
|
||||
bool ModularGraphicsBackend::showMouse(bool visible) {
|
||||
return _graphicsManager->showMouse(visible);
|
||||
}
|
||||
|
@ -114,6 +114,8 @@ public:
|
||||
virtual int16 getOverlayHeight() override final;
|
||||
virtual int16 getOverlayWidth() override final;
|
||||
|
||||
virtual float getHiDPIScreenFactor() const override final;
|
||||
|
||||
virtual bool showMouse(bool visible) override final;
|
||||
virtual void warpMouse(int x, int y) override final;
|
||||
virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override final;
|
||||
|
@ -1052,6 +1052,12 @@ public:
|
||||
*/
|
||||
virtual PaletteManager *getPaletteManager() = 0;
|
||||
|
||||
/**
|
||||
* Return the scale factor for HiDPI screens.
|
||||
* Returns 1 for non-HiDPI screens, or if HiDPI display is not supported by the backend.
|
||||
*/
|
||||
virtual float getHiDPIScreenFactor() const { return 1.0f; }
|
||||
|
||||
/**
|
||||
* Blit a bitmap to the virtual screen.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user