diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index ff0947f573..26707a76e2 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -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); diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 8a0b6c6441..4158600698 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -773,7 +773,13 @@ int main(int argc, char *argv[]) { SDL_SetWindowTitle(window, (app_name_nice + " " + PPSSPP_GIT_VERSION).c_str()); char iconPath[PATH_MAX]; +#if defined(ASSETS_DIR) + snprintf(iconPath, PATH_MAX, "%sicon_regular_72.png", ASSETS_DIR); + if (access(iconPath, F_OK) != 0) + snprintf(iconPath, PATH_MAX, "%sassets/icon_regular_72.png", SDL_GetBasePath() ? SDL_GetBasePath() : ""); +#else snprintf(iconPath, PATH_MAX, "%sassets/icon_regular_72.png", SDL_GetBasePath() ? SDL_GetBasePath() : ""); +#endif int width = 0, height = 0; unsigned char *imageData; if (pngLoad(iconPath, &width, &height, &imageData) == 1) {