File: allow-jpeg-loading-on-big-endian.patch

package info (click to toggle)
hyprgraphics 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 928 kB
  • sloc: cpp: 1,547; sh: 9; makefile: 6
file content (24 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Zach DeCook <zachdecook@librem.one>
Date: Fri, 24 Oct 2025 12:29:48 +0200
Subject: allow jpeg loading on big endian

Bug: https://github.com/hyprwm/hyprgraphics/pull/11
Origin: https://github.com/hyprwm/hyprgraphics/pull/11
---
 src/image/formats/Jpeg.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/image/formats/Jpeg.cpp b/src/image/formats/Jpeg.cpp
index 849efac..aaa3e83 100644
--- a/src/image/formats/Jpeg.cpp
+++ b/src/image/formats/Jpeg.cpp
@@ -17,9 +17,6 @@ std::expected<cairo_surface_t*, std::string> JPEG::createSurfaceFromJPEG(const s
     if (!std::filesystem::exists(path))
         return std::unexpected("loading jpeg: file doesn't exist");
 
-    if (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
-        return std::unexpected("loading jpeg: cannot load on big endian");
-
     std::ifstream file(path, std::ios::binary | std::ios::ate);
     file.exceptions(std::ifstream::failbit | std::ifstream::badbit | std::ifstream::eofbit);
     std::vector<uint8_t> bytes(file.tellg());