Skip to content
Permalink
Browse files

Merge pull request #12397 from TotalCaesar659/center-window

Move window to center
  • Loading branch information...
unknownbrackets committed Oct 8, 2019
2 parents 622fc38 + b014ecc commit c0aa75917c74e54c931951e7330bd5567ff85a53
Showing with 2 additions and 2 deletions.
  1. +2 −2 Qt/mainwindow.cpp
@@ -25,9 +25,9 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
QDesktopWidget *desktop = QApplication::desktop();
int screenNum = QProcessEnvironment::systemEnvironment().value("SDL_VIDEO_FULLSCREEN_HEAD", "0").toInt();

// Move window to top left coordinate of selected screen
// Move window to the center of selected screen
QRect rect = desktop->screenGeometry(screenNum);
move(rect.topLeft());
move((rect.width()-frameGeometry().width()) / 4, (rect.height()-frameGeometry().height()) / 4);

SetGameTitle("");
emugl = new MainUI(this);

0 comments on commit c0aa759

Please sign in to comment.
You can’t perform that action at this time.