From 146de706b65b0d888d4b58c1e174931955351995 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 22 Dec 2021 04:25:55 +0100 Subject: [PATCH] early-access version 2333 --- CMakeModules/GenerateSCMRev.cmake | 12 ++++++--- README.md | 2 +- src/common/CMakeLists.txt | 5 ++++ src/yuzu/main.cpp | 41 ++++++++++++------------------- 4 files changed, 31 insertions(+), 29 deletions(-) diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake index 43ca730ec..c7da2b91d 100755 --- a/CMakeModules/GenerateSCMRev.cmake +++ b/CMakeModules/GenerateSCMRev.cmake @@ -11,9 +11,15 @@ find_package(Git QUIET PATHS "${GIT_EXECUTABLE}") # generate git/build information include(GetGitRevisionDescription) -get_git_head_revision(GIT_REF_SPEC GIT_REV) -git_describe(GIT_DESC --always --long --dirty) -git_branch_name(GIT_BRANCH) +if(NOT GIT_REF_SPEC) + get_git_head_revision(GIT_REF_SPEC GIT_REV) +endif() +if(NOT GIT_DESC) + git_describe(GIT_DESC --always --long --dirty) +endif() +if (NOT GIT_BRANCH) + git_branch_name(GIT_BRANCH) +endif() get_timestamp(BUILD_DATE) # Generate cpp with Git revision from template diff --git a/README.md b/README.md index 8c247d18a..27720aba3 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2331. +This is the source code for early-access 2333. ## Legal Notice diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 919da4a53..790193b00 100755 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -22,6 +22,11 @@ add_custom_command(OUTPUT scm_rev.cpp -DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING} -DBUILD_TAG=${BUILD_TAG} -DBUILD_ID=${DISPLAY_VERSION} + -DGIT_REF_SPEC=${GIT_REF_SPEC} + -DGIT_REV=${GIT_REV} + -DGIT_DESC=${GIT_DESC} + -DGIT_BRANCH=${GIT_BRANCH} + -DBUILD_FULLNAME=${BUILD_FULLNAME} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake DEPENDS diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b7bb43348..a7271e075 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2546,39 +2546,30 @@ void GMainWindow::ToggleFullscreen() { } void GMainWindow::ShowFullscreen() { + const auto show_fullscreen = [](QWidget* window) { + if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { + window->showFullScreen(); + return; + } + window->hide(); + window->setWindowFlags(window->windowFlags() | Qt::FramelessWindowHint); + const auto screen_geometry = QApplication::desktop()->screenGeometry(window); + window->setGeometry(screen_geometry.x(), screen_geometry.y(), screen_geometry.width(), + screen_geometry.height() + 1); + window->raise(); + window->showNormal(); + }; + if (ui->action_Single_Window_Mode->isChecked()) { UISettings::values.geometry = saveGeometry(); ui->menubar->hide(); statusBar()->hide(); - if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { - showFullScreen(); - return; - } - - hide(); - setWindowFlags(windowFlags() | Qt::FramelessWindowHint); - const auto screen_geometry = QApplication::desktop()->screenGeometry(this); - setGeometry(screen_geometry.x(), screen_geometry.y(), screen_geometry.width(), - screen_geometry.height() + 1); - raise(); - showNormal(); + show_fullscreen(this); } else { UISettings::values.renderwindow_geometry = render_window->saveGeometry(); - - if (Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive) { - render_window->showFullScreen(); - return; - } - - render_window->hide(); - render_window->setWindowFlags(windowFlags() | Qt::FramelessWindowHint); - const auto screen_geometry = QApplication::desktop()->screenGeometry(this); - render_window->setGeometry(screen_geometry.x(), screen_geometry.y(), - screen_geometry.width(), screen_geometry.height() + 1); - render_window->raise(); - render_window->showNormal(); + show_fullscreen(render_window); } }