Skip to content

Commit

Permalink
rpi / rock. Disable auto screen scale by default. User has to manuall…
Browse files Browse the repository at this point in the history
…y scale up.
  • Loading branch information
Consti10 committed Dec 3, 2023
1 parent 7ad8cb4 commit 188f033
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,15 @@ int main(int argc, char *argv[]) {

QSettings settings;
qDebug()<<"Storing settings at ["<<settings.fileName()<<"]";
// RPI only - set a smaller default screen scale, for whatever reason thats needed
if(QOpenHD::instance().is_platform_rpi() || QOpenHD::instance().is_platform_rock()){
if(!settings.value("qopenhd_custom_default_screen_has_been_set",false).toBool()){
qDebug()<<"Setting initial rpi screen scale";
settings.setValue("qopenhd_custom_default_screen_has_been_set",true);
settings.setValue("global_scale",0.7);
// RPI and ROCK - disable font dpi. The user has to scale manually when using displays
// (Bigger than) 640x480 according to its preferences. On rpi, auto scale is just bugged,
// nothing more to say.
if(QOpenHD::instance().is_platform_rpi() || QOpenHD::instance().is_platform_rock() || true){
static constexpr auto TAG_QOPENHD_INITIAL_FONT_DPI_HAS_BEEN_SET="qopenhd_initial_font_dpi_has_been_set";
if(!settings.value(TAG_QOPENHD_INITIAL_FONT_DPI_HAS_BEEN_SET,false).toBool()){
qDebug()<<"RPI/ROCK: Disable font dpi by default";
settings.setValue(TAG_QOPENHD_INITIAL_FONT_DPI_HAS_BEEN_SET,true);
settings.setValue("screen_custom_font_dpi",-1);
}
}
if(QOpenHD::instance().is_platform_rock()){
Expand Down

0 comments on commit 188f033

Please sign in to comment.