Fix window icon path

This commit is contained in:
Xu Zhen committed 2022-12-06 23:17:35 +08:00
1 parent 4fd336f5ef
commit abb4aa92f1
2 files changed
+14

No files matched your search

+8
View File
@@ -5,6 +5,7 @@
#include <QApplication>
#include <QDesktopServices>
#include <QDesktopWidget>
#include <QFile>
#include <QFileDialog>
#include <QMessageBox>
@@ -26,7 +27,14 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
nextState(CORE_POWERDOWN),
lastUIState(UISTATE_MENU)
{
#if defined(ASSETS_DIR)
if (QFile::exists(ASSETS_DIR "icon_regular_72.png"))
setWindowIcon(QIcon(ASSETS_DIR "icon_regular_72.png"));
else
setWindowIcon(QIcon(qApp->applicationDirPath() + "/assets/icon_regular_72.png"));
#else
setWindowIcon(QIcon(qApp->applicationDirPath() + "/assets/icon_regular_72.png"));
#endif
SetGameTitle("");
emugl = new MainUI(this);