diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/internal_network/socket_proxy.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 26 | ||||
| -rw-r--r-- | src/yuzu/main.h | 6 |
5 files changed, 22 insertions, 18 deletions
diff --git a/src/core/internal_network/socket_proxy.cpp b/src/core/internal_network/socket_proxy.cpp index 7d5d37bbc..1e1c42cea 100644 --- a/src/core/internal_network/socket_proxy.cpp +++ b/src/core/internal_network/socket_proxy.cpp | |||
| @@ -11,6 +11,10 @@ | |||
| 11 | #include "core/internal_network/network_interface.h" | 11 | #include "core/internal_network/network_interface.h" |
| 12 | #include "core/internal_network/socket_proxy.h" | 12 | #include "core/internal_network/socket_proxy.h" |
| 13 | 13 | ||
| 14 | #if YUZU_UNIX | ||
| 15 | #include <sys/socket.h> | ||
| 16 | #endif | ||
| 17 | |||
| 14 | namespace Network { | 18 | namespace Network { |
| 15 | 19 | ||
| 16 | ProxySocket::ProxySocket(RoomNetwork& room_network_) noexcept : room_network{room_network_} {} | 20 | ProxySocket::ProxySocket(RoomNetwork& room_network_) noexcept : room_network{room_network_} {} |
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 13d5a1f67..b42e5be1e 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -53,7 +53,7 @@ using VideoCommon::FileEnvironment; | |||
| 53 | using VideoCommon::GenericEnvironment; | 53 | using VideoCommon::GenericEnvironment; |
| 54 | using VideoCommon::GraphicsEnvironment; | 54 | using VideoCommon::GraphicsEnvironment; |
| 55 | 55 | ||
| 56 | constexpr u32 CACHE_VERSION = 6; | 56 | constexpr u32 CACHE_VERSION = 7; |
| 57 | 57 | ||
| 58 | template <typename Container> | 58 | template <typename Container> |
| 59 | auto MakeSpan(Container& container) { | 59 | auto MakeSpan(Container& container) { |
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 29d506c47..239f12382 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -315,7 +315,7 @@ target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include) | |||
| 315 | if (NOT WIN32) | 315 | if (NOT WIN32) |
| 316 | target_include_directories(yuzu PRIVATE ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) | 316 | target_include_directories(yuzu PRIVATE ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) |
| 317 | endif() | 317 | endif() |
| 318 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | 318 | if (UNIX AND NOT APPLE) |
| 319 | target_link_libraries(yuzu PRIVATE Qt::DBus) | 319 | target_link_libraries(yuzu PRIVATE Qt::DBus) |
| 320 | endif() | 320 | endif() |
| 321 | 321 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 7b16d7f7e..59e56633a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #ifdef __APPLE__ | 9 | #ifdef __APPLE__ |
| 10 | #include <unistd.h> // for chdir | 10 | #include <unistd.h> // for chdir |
| 11 | #endif | 11 | #endif |
| 12 | #ifdef __linux__ | 12 | #ifdef __unix__ |
| 13 | #include <csignal> | 13 | #include <csignal> |
| 14 | #include <sys/socket.h> | 14 | #include <sys/socket.h> |
| 15 | #endif | 15 | #endif |
| @@ -275,7 +275,7 @@ static void OverrideWindowsFont() { | |||
| 275 | #endif | 275 | #endif |
| 276 | 276 | ||
| 277 | bool GMainWindow::CheckDarkMode() { | 277 | bool GMainWindow::CheckDarkMode() { |
| 278 | #ifdef __linux__ | 278 | #ifdef __unix__ |
| 279 | const QPalette test_palette(qApp->palette()); | 279 | const QPalette test_palette(qApp->palette()); |
| 280 | const QColor text_color = test_palette.color(QPalette::Active, QPalette::Text); | 280 | const QColor text_color = test_palette.color(QPalette::Active, QPalette::Text); |
| 281 | const QColor window_color = test_palette.color(QPalette::Active, QPalette::Window); | 281 | const QColor window_color = test_palette.color(QPalette::Active, QPalette::Window); |
| @@ -283,7 +283,7 @@ bool GMainWindow::CheckDarkMode() { | |||
| 283 | #else | 283 | #else |
| 284 | // TODO: Windows | 284 | // TODO: Windows |
| 285 | return false; | 285 | return false; |
| 286 | #endif // __linux__ | 286 | #endif // __unix__ |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan) | 289 | GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan) |
| @@ -291,7 +291,7 @@ GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan | |||
| 291 | input_subsystem{std::make_shared<InputCommon::InputSubsystem>()}, config{std::move(config_)}, | 291 | input_subsystem{std::make_shared<InputCommon::InputSubsystem>()}, config{std::move(config_)}, |
| 292 | vfs{std::make_shared<FileSys::RealVfsFilesystem>()}, | 292 | vfs{std::make_shared<FileSys::RealVfsFilesystem>()}, |
| 293 | provider{std::make_unique<FileSys::ManualContentProvider>()} { | 293 | provider{std::make_unique<FileSys::ManualContentProvider>()} { |
| 294 | #ifdef __linux__ | 294 | #ifdef __unix__ |
| 295 | SetupSigInterrupts(); | 295 | SetupSigInterrupts(); |
| 296 | #endif | 296 | #endif |
| 297 | system->Initialize(); | 297 | system->Initialize(); |
| @@ -509,7 +509,7 @@ GMainWindow::~GMainWindow() { | |||
| 509 | delete render_window; | 509 | delete render_window; |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | #ifdef __linux__ | 512 | #ifdef __unix__ |
| 513 | ::close(sig_interrupt_fds[0]); | 513 | ::close(sig_interrupt_fds[0]); |
| 514 | ::close(sig_interrupt_fds[1]); | 514 | ::close(sig_interrupt_fds[1]); |
| 515 | #endif | 515 | #endif |
| @@ -1379,7 +1379,7 @@ void GMainWindow::OnDisplayTitleBars(bool show) { | |||
| 1379 | } | 1379 | } |
| 1380 | 1380 | ||
| 1381 | void GMainWindow::SetupPrepareForSleep() { | 1381 | void GMainWindow::SetupPrepareForSleep() { |
| 1382 | #ifdef __linux__ | 1382 | #ifdef __unix__ |
| 1383 | auto bus = QDBusConnection::systemBus(); | 1383 | auto bus = QDBusConnection::systemBus(); |
| 1384 | if (bus.isConnected()) { | 1384 | if (bus.isConnected()) { |
| 1385 | const bool success = bus.connect( | 1385 | const bool success = bus.connect( |
| @@ -1393,7 +1393,7 @@ void GMainWindow::SetupPrepareForSleep() { | |||
| 1393 | } else { | 1393 | } else { |
| 1394 | LOG_WARNING(Frontend, "QDBusConnection system bus is not connected"); | 1394 | LOG_WARNING(Frontend, "QDBusConnection system bus is not connected"); |
| 1395 | } | 1395 | } |
| 1396 | #endif // __linux__ | 1396 | #endif // __unix__ |
| 1397 | } | 1397 | } |
| 1398 | 1398 | ||
| 1399 | void GMainWindow::OnPrepareForSleep(bool prepare_sleep) { | 1399 | void GMainWindow::OnPrepareForSleep(bool prepare_sleep) { |
| @@ -1415,7 +1415,7 @@ void GMainWindow::OnPrepareForSleep(bool prepare_sleep) { | |||
| 1415 | } | 1415 | } |
| 1416 | } | 1416 | } |
| 1417 | 1417 | ||
| 1418 | #ifdef __linux__ | 1418 | #ifdef __unix__ |
| 1419 | static std::optional<QDBusObjectPath> HoldWakeLockLinux(u32 window_id = 0) { | 1419 | static std::optional<QDBusObjectPath> HoldWakeLockLinux(u32 window_id = 0) { |
| 1420 | if (!QDBusConnection::sessionBus().isConnected()) { | 1420 | if (!QDBusConnection::sessionBus().isConnected()) { |
| 1421 | return {}; | 1421 | return {}; |
| @@ -1500,14 +1500,14 @@ void GMainWindow::OnSigInterruptNotifierActivated() { | |||
| 1500 | 1500 | ||
| 1501 | emit SigInterrupt(); | 1501 | emit SigInterrupt(); |
| 1502 | } | 1502 | } |
| 1503 | #endif // __linux__ | 1503 | #endif // __unix__ |
| 1504 | 1504 | ||
| 1505 | void GMainWindow::PreventOSSleep() { | 1505 | void GMainWindow::PreventOSSleep() { |
| 1506 | #ifdef _WIN32 | 1506 | #ifdef _WIN32 |
| 1507 | SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); | 1507 | SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); |
| 1508 | #elif defined(HAVE_SDL2) | 1508 | #elif defined(HAVE_SDL2) |
| 1509 | SDL_DisableScreenSaver(); | 1509 | SDL_DisableScreenSaver(); |
| 1510 | #ifdef __linux__ | 1510 | #ifdef __unix__ |
| 1511 | auto reply = HoldWakeLockLinux(winId()); | 1511 | auto reply = HoldWakeLockLinux(winId()); |
| 1512 | if (reply) { | 1512 | if (reply) { |
| 1513 | wake_lock = std::move(reply.value()); | 1513 | wake_lock = std::move(reply.value()); |
| @@ -1521,7 +1521,7 @@ void GMainWindow::AllowOSSleep() { | |||
| 1521 | SetThreadExecutionState(ES_CONTINUOUS); | 1521 | SetThreadExecutionState(ES_CONTINUOUS); |
| 1522 | #elif defined(HAVE_SDL2) | 1522 | #elif defined(HAVE_SDL2) |
| 1523 | SDL_EnableScreenSaver(); | 1523 | SDL_EnableScreenSaver(); |
| 1524 | #ifdef __linux__ | 1524 | #ifdef __unix__ |
| 1525 | if (!wake_lock.path().isEmpty()) { | 1525 | if (!wake_lock.path().isEmpty()) { |
| 1526 | ReleaseWakeLockLinux(wake_lock); | 1526 | ReleaseWakeLockLinux(wake_lock); |
| 1527 | } | 1527 | } |
| @@ -4070,7 +4070,7 @@ void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) { | |||
| 4070 | } | 4070 | } |
| 4071 | 4071 | ||
| 4072 | void GMainWindow::changeEvent(QEvent* event) { | 4072 | void GMainWindow::changeEvent(QEvent* event) { |
| 4073 | #ifdef __linux__ | 4073 | #ifdef __unix__ |
| 4074 | // PaletteChange event appears to only reach so far into the GUI, explicitly asking to | 4074 | // PaletteChange event appears to only reach so far into the GUI, explicitly asking to |
| 4075 | // UpdateUITheme is a decent work around | 4075 | // UpdateUITheme is a decent work around |
| 4076 | if (event->type() == QEvent::PaletteChange) { | 4076 | if (event->type() == QEvent::PaletteChange) { |
| @@ -4085,7 +4085,7 @@ void GMainWindow::changeEvent(QEvent* event) { | |||
| 4085 | } | 4085 | } |
| 4086 | last_window_color = window_color; | 4086 | last_window_color = window_color; |
| 4087 | } | 4087 | } |
| 4088 | #endif // __linux__ | 4088 | #endif // __unix__ |
| 4089 | QWidget::changeEvent(event); | 4089 | QWidget::changeEvent(event); |
| 4090 | } | 4090 | } |
| 4091 | 4091 | ||
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index f7aa8e417..150ada84c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include "yuzu/compatibility_list.h" | 15 | #include "yuzu/compatibility_list.h" |
| 16 | #include "yuzu/hotkeys.h" | 16 | #include "yuzu/hotkeys.h" |
| 17 | 17 | ||
| 18 | #ifdef __linux__ | 18 | #ifdef __unix__ |
| 19 | #include <QVariant> | 19 | #include <QVariant> |
| 20 | #include <QtDBus/QDBusInterface> | 20 | #include <QtDBus/QDBusInterface> |
| 21 | #include <QtDBus/QtDBus> | 21 | #include <QtDBus/QtDBus> |
| @@ -255,7 +255,7 @@ private: | |||
| 255 | void changeEvent(QEvent* event) override; | 255 | void changeEvent(QEvent* event) override; |
| 256 | void closeEvent(QCloseEvent* event) override; | 256 | void closeEvent(QCloseEvent* event) override; |
| 257 | 257 | ||
| 258 | #ifdef __linux__ | 258 | #ifdef __unix__ |
| 259 | void SetupSigInterrupts(); | 259 | void SetupSigInterrupts(); |
| 260 | static void HandleSigInterrupt(int); | 260 | static void HandleSigInterrupt(int); |
| 261 | void OnSigInterruptNotifierActivated(); | 261 | void OnSigInterruptNotifierActivated(); |
| @@ -435,7 +435,7 @@ private: | |||
| 435 | // True if TAS recording dialog is visible | 435 | // True if TAS recording dialog is visible |
| 436 | bool is_tas_recording_dialog_active{}; | 436 | bool is_tas_recording_dialog_active{}; |
| 437 | 437 | ||
| 438 | #ifdef __linux__ | 438 | #ifdef __unix__ |
| 439 | QSocketNotifier* sig_interrupt_notifier; | 439 | QSocketNotifier* sig_interrupt_notifier; |
| 440 | static std::array<int, 3> sig_interrupt_fds; | 440 | static std::array<int, 3> sig_interrupt_fds; |
| 441 | 441 | ||