Skip to content

Commit

Permalink
Qt: Use Qt 6.8 thread helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Oct 20, 2024
1 parent 45f7829 commit b277035
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 73 deletions.
6 changes: 5 additions & 1 deletion CMakeModules/DuckStationDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

find_package(SDL2 2.30.7 REQUIRED)
find_package(SDL2 2.30.8 REQUIRED)
find_package(Zstd 1.5.6 REQUIRED)
find_package(WebP REQUIRED) # v1.4.0, spews an error on Linux because no pkg-config.
find_package(ZLIB REQUIRED) # 1.3, but Mac currently doesn't use it.
Expand Down Expand Up @@ -38,6 +38,10 @@ if(ENABLE_WAYLAND)
find_package(Wayland REQUIRED Egl)
endif()

if(BUILD_QT_FRONTEND)
find_package(Qt6 6.8.0 COMPONENTS Core Gui Widgets LinguistTools REQUIRED)
endif()

find_package(Shaderc REQUIRED)
find_package(spirv_cross_c_shared REQUIRED)

Expand Down
4 changes: 2 additions & 2 deletions scripts/flatpak/org.duckstation.DuckStation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

app-id: "org.duckstation.DuckStation"
runtime: "org.kde.Platform"
runtime-version: "6.7"
runtime-version: "6.8"
sdk: "org.kde.Sdk"
sdk-extensions:
- "org.freedesktop.Sdk.Extension.llvm17"
add-extensions:
"org.freedesktop.Platform.ffmpeg-full":
directory: "lib/ffmpeg"
version: "23.08"
version: "24.08"
add-ld-path: "."
autodownload: true

Expand Down
8 changes: 4 additions & 4 deletions scripts/packaging/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ depends=('libjpeg.so' # libjpeg or libjpeg-turbo
'libwebp'
'libx11'
'libxrandr'
'qt6-base'
'qt6-imageformats'
'qt6-svg'
'qt6-base>=6.8.0'
'qt6-imageformats>=6.8.0'
'qt6-svg>=6.8.0'
'wayland'
'zlib'
'zstd'
Expand All @@ -45,7 +45,7 @@ makedepends=('base-devel'
'lld'
'llvm'
'ninja'
'qt6-tools')
'qt6-tools>=6.8.0')

source=(
"${pkgname}::git+file://${startdir}/../../.."
Expand Down
2 changes: 0 additions & 2 deletions src/duckstation-qt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
find_package(Qt6 6.7.2 COMPONENTS Core Gui Widgets LinguistTools REQUIRED)

include(CopyBaseTranslations)

set(CMAKE_AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion src/duckstation-qt/logwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void LogWindow::logCallback(void* pUserParam, const char* channelName, const cha

const QLatin1StringView qchannel((level <= Log::Level::Warning) ? functionName : channelName);

if (g_emu_thread->isOnUIThread())
if (QThread::isMainThread())
{
this_ptr->appendMessage(qchannel, static_cast<u32>(level), qmessage);
}
Expand Down
Loading

0 comments on commit b277035

Please sign in to comment.