commit 77672764ac7f13f813239e231a35f31d896ffa79
Author: jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Fri Apr 15 15:00:29 2022 -0600
Commit: jtothebell <j.to.the.bell@gmail.com>
CommitDate: Fri Apr 15 15:00:29 2022 -0600
Add square stretch option to bittboy
---
platform/bittboy/source/BittBoyHost.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/platform/bittboy/source/BittBoyHost.cpp b/platform/bittboy/source/BittBoyHost.cpp
index 4e11087..47bea39 100644
--- a/platform/bittboy/source/BittBoyHost.cpp
+++ b/platform/bittboy/source/BittBoyHost.cpp
@@ -137,12 +137,16 @@ void _changeStretch(StretchOption newStretch){
_screenWidth = PicoScreenWidth;
_screenHeight = PicoScreenHeight;
}
+ else if (newStretch == StretchToFit) {
+ _screenWidth = _windowHeight;
+ _screenHeight = _windowHeight;
+ }
else if (newStretch == StretchAndOverflow) {
yoffset = 4 / drawModeScaleY;
_screenWidth = PicoScreenWidth * 2;
_screenHeight = _windowHeight;
}
- //default to StretchToFill)
+ //default to StretchToFill
else {
_screenWidth = _windowWidth;
_screenHeight = _windowHeight;
@@ -247,6 +251,9 @@ void Host::changeStretch(){
newStretch = PixelPerfect;
}
else if (stretch == PixelPerfect) {
+ newStretch = StretchToFit;
+ }
+ else if (stretch == StretchToFit) {
newStretch = StretchToFill;
}
else{