Skip to content

Commit

Permalink
exp -set before writing the AA flag / screen scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Nov 14, 2023
1 parent 9dc6628 commit a66db5b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,18 @@ static void android_check_permissions(){
#endif
}

static void write_screen_resolutions(QApplication& app){
const auto actual_size=QGuiApplication::primaryScreen()->size();
QRenderStats::instance().set_screen_width_height(actual_size.width(),actual_size.height());
// This includes dpi adjustment
QScreen* screen=app.primaryScreen();
if(screen){
QRenderStats::instance().set_display_width_height(screen->size().width(),screen->size().height());
}
}

int main(int argc, char *argv[]) {

QCoreApplication::setOrganizationName("OpenHD");
QCoreApplication::setOrganizationDomain("openhd");
QCoreApplication::setApplicationName("QOpenHD");
{// Original screen resoluton before setting anything
const auto screen=QGuiApplication::primaryScreen();
if(screen){
const auto actual_size=screen->size();
QRenderStats::instance().set_screen_width_height(actual_size.width(),actual_size.height());
}
}

QSettings settings;

Expand Down Expand Up @@ -247,7 +244,12 @@ int main(int argc, char *argv[]) {
QApplication app(argc, argv);
// Customize cursor if needed
QOpenHD::instance().customize_cursor_from_settings();
write_screen_resolutions(app);
{ // This includes dpi adjustment
QScreen* screen=app.primaryScreen();
if(screen){
QRenderStats::instance().set_display_width_height(screen->size().width(),screen->size().height());
}
}
QOpenHDVideoHelper::reset_qopenhd_switch_primary_secondary();

#if defined(__ios__)
Expand Down

0 comments on commit a66db5b

Please sign in to comment.