From 23bb6b871f7e0d780e6b6b2a3362d9cccab4b564 Mon Sep 17 00:00:00 2001 From: Mars Date: Sat, 5 Oct 2024 15:57:25 -0400 Subject: [PATCH] are you serious. the issue was yabai. --- flake.lock | 18 +++++++++--------- flake.nix | 10 +++++----- src/main.cpp | 9 +++++---- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index ab0b733..5f13307 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1727065772, - "narHash": "sha256-U9baiEXL2YsS67QKlBAPIUq+OB+eUPKv8n1vGNdhiec=", + "lastModified": 1728001300, + "narHash": "sha256-W7PYJ6s+A91V1WZOTef8y3t1BGQKCfcLtHjOKcP5ScA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "989dc4cbf6a95f2e5fefc8cd61d2198a8fb6834a", + "rev": "e00cc9f2fa7eaac3232e0de9b0b86dfd58b1f43c", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1726481836, - "narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=", + "lastModified": 1726871744, + "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20f9370d5f588fb8c72e844c54511cab054b5f40", + "rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2", "type": "github" }, "original": { @@ -58,11 +58,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1726734507, - "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", + "lastModified": 1727984844, + "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", + "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 33adc34..e414d26 100644 --- a/flake.nix +++ b/flake.nix @@ -24,8 +24,8 @@ stdenv = if pkgs.hostPlatform.isLinux - then pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_18.libcxxStdenv - else pkgs.llvmPackages_18.libcxxStdenv; + then pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_19.libcxxStdenv + else pkgs.llvmPackages_19.libcxxStdenv; sources = import ./_sources/generated.nix { inherit (pkgs) fetchFromGitHub fetchgit fetchurl dockerTools; @@ -89,7 +89,7 @@ clang-format = { enable = true; - package = pkgs.llvmPackages_18.clang-tools; + package = pkgs.llvmPackages_19.clang-tools; }; }; }; @@ -99,7 +99,7 @@ [ alejandra bear - (llvmPackages_18.clang-tools.override {enableLibcxx = true;}) + (llvmPackages_19.clang-tools.override {enableLibcxx = true;}) lldb meson ninja @@ -126,7 +126,7 @@ in "${linuxPackages_latest.nvidia_x11}/share/vulkan/icd.d/nvidia_icd.x86_64.json:${vulkanPaths}"; shellHook = '' - export PATH="${llvmPackages_18.clang-tools.override {enableLibcxx = true;}}/bin:$PATH" + export PATH="${llvmPackages_19.clang-tools.override {enableLibcxx = true;}}/bin:$PATH" ''; name = "C++"; diff --git a/src/main.cpp b/src/main.cpp index 3f52b61..f105a9f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -110,6 +110,7 @@ class VulkanApp { vkfw::WindowHints hints; hints.clientAPI = vkfw::ClientAPI::eNone; + hints.resizable = false; mWindow = vkfw::createWindowUnique(WIDTH, HEIGHT, "Vulkan", hints); } @@ -597,8 +598,8 @@ class VulkanApp { return mDevice->createShaderModuleUnique(createInfo); } - static fn chooseSwapSurfaceFormat(const std::vector& availableFormats - ) -> vk::SurfaceFormatKHR { + static fn chooseSwapSurfaceFormat(const std::vector& availableFormats) + -> vk::SurfaceFormatKHR { for (const auto& availableFormat : availableFormats) if (availableFormat.format == vk::Format::eB8G8R8A8Srgb && availableFormat.colorSpace == vk::ColorSpaceKHR::eSrgbNonlinear) @@ -607,8 +608,8 @@ class VulkanApp { return availableFormats[0]; } - static fn chooseSwapPresentMode(const std::vector& availablePresentModes - ) -> vk::PresentModeKHR { + static fn chooseSwapPresentMode(const std::vector& availablePresentModes) + -> vk::PresentModeKHR { for (const auto& availablePresentMode : availablePresentModes) if (availablePresentMode == vk::PresentModeKHR::eMailbox) return availablePresentMode;