Commit Graph

152 Commits

Author SHA1 Message Date
Nik
d62abaed8d build: Add support for x86 macOS 10.15 and ARM64 macOS 11.0 (#2607)
This PR drops the use of brew for dependency management in favor of
macports so we can support lower macOS versions instead of just the
lowest one supported by Apple

Closes #2586
2026-01-09 17:42:51 +01:00
WerWolv
89dea86b3b web: Fix canvas being too big 2025-12-30 18:28:26 +01:00
iTrooz
e5d9d9ec9e chore: apply more complicated lints (#2576)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->

### Implementation description
<!-- Explain what you did to correct the problem -->

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

### Additional things
<!-- Anything else you would like to say -->
2025-12-21 20:55:50 +01:00
iTrooz
17c2dfcbd0 chore: apply more light lints (#2575)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->

### Implementation description
<!-- Explain what you did to correct the problem -->

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

### Additional things
<!-- Anything else you would like to say -->
2025-12-20 15:59:48 +01:00
iTrooz
261610dcf1 chore: apply light lints (#2570) 2025-12-19 23:49:37 +01:00
WerWolv
4d585d17de fix: Achievements re-triggering in cases where an achievement is triggered before its save is loaded 2025-11-29 09:07:37 +01:00
WerWolv
e1079d751a fix: Handle uncaught exceptions more gracefully 2025-08-30 14:24:39 +02:00
WerWolv
e353802e9f impr: Added more OpenGL version information to logs 2025-08-27 23:34:01 +02:00
Nik
df2448e121 fix: Web version not starting anymore due to WebGL only supporting OpenGL 3.0 2025-08-25 07:29:36 +02:00
WerWolv
254bd88e6b fix: macOS initialising very low OpenGL version by default 2025-08-24 16:10:13 +02:00
WerWolv
5c2309bcf7 fix: OpenGL detection not working correctly 2025-08-23 11:04:41 +02:00
WerWolv
cfe3c5b6df fix: Still do minimum OpenGL version verification 2025-08-20 22:42:04 +02:00
WerWolv
b49e2eeac4 fix: Too new OpenGL version getting requested on Windows 2025-08-20 22:31:40 +02:00
WerWolv
3c9aa97f6c feat: Added function to show toast messages, moved native error message function to libimhex 2025-08-17 22:46:38 +02:00
WerWolv
babd9584a6 build: Fix a few remaining build errors 2025-08-14 21:58:07 +02:00
WerWolv
fbde2942de build: Refactor ContentRegistry into multiple separate files 2025-08-14 21:22:03 +02:00
WerWolv
d920718b44 build: Refactor ImHexAPI into multiple separate files 2025-08-14 20:16:40 +02:00
WerWolv
4ca429e389 impr: Allow post-processing shaders to be set dynamically 2025-08-14 17:11:37 +02:00
WerWolv
09b2e20a3d impr: Save most of the hex editor settings
#2398
2025-08-11 21:03:18 +02:00
WerWolv
5028b354cc impr: Clean up window setup code 2025-08-10 12:34:03 +02:00
kur$
6b4fef806c fix: Added protection against deleting symlinks (#2288)
This PR improves the safety and reliability of the deleteOldFiles()
function by:

Preventing symlink attacks

Uses std::filesystem::canonical() to resolve all paths, eliminating ./..
and symlinks
Verifies each file is actually inside the target directory before
deletion
Safer file operations
Explicitly skips non-regular files (directories/symlinks)

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-08-09 19:58:36 +02:00
WerWolv
d925c8216d impr: Allow ImHex to be used without subpixel rendering on Windows if only OpenGL 3 is available 2025-08-09 19:13:45 +02:00
WerWolv
c88fc43032 fix: Crash on exit if update folder doesn't exist 2025-08-09 16:21:51 +02:00
WerWolv
411e971ba7 impr: Properly delete old update files 2025-08-09 14:28:48 +02:00
Ivor Wanders
93a71120d4 fix: Initialise splash window with correct size (#2390)
With an initial Window size of 1 by 1, the program aborts during launch
on my Debian 12 (bookworm) system running the Mate Desktop environment
on X11.


The exception from X is the following:
```
$ ./imhex
[18:36:33] [INFO]  [main | Main]                Welcome to ImHex 1.38.0.WIP!
[18:36:33] [INFO]  [main | Main]                Compiled using commit master@59c6d30
[18:36:33] [INFO]  [main | Main]                Running on Linux 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) (x86_64)
[18:36:33] [INFO]  [main | Main]                Linux distribution: Debian GNU/Linux 12 (bookworm). Version: 12
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Resource id in failed request:  0x5400009
  Serial number of failed request:  152
  Current serial number in output stream:  163
```

The culprit is in `hex::init::WindowSplash::initGLFW()`, specifically
the `glfwCreateWindow` call with a window size of 1 by 1, that's the
last call in the ImHex codebase, after that it's libglfw and libX11.

The issue can be worked around by inhibiting the splash screen using the
`IMHEX_SKIP_SPLASH_SCREEN=1` environment variable, setting the window to
be a size larger than 1 by 1 also seems to resolve the situation.

My hunch is that an underflow occurs somewhere with the smaller values,
but I did no further investigation into analysing the root cause.

----
Above the line is the commit message.

### Problem description
See https://github.com/WerWolv/ImHex/issues/2215, which I think is the
same problem, and commit description above. Edit; I did another search
in the issues, I wouldn't be surprised if #2233 is a duplicate of the
2215 issue.

### Implementation description
Please see the commit message.

Analysis was done by setting an X11 error handler, making that throw and
running it in a debugger. This is available in this dev commit;
4a24e16a2ef100a9417e572f6b16c4a95711e94e.

### Screenshots
No apparent glitches if I make the splash window stick around with
`return std::nullopt;` in the `loop()` function. I don't know if there's
an issue at the beginning, but given that the window is set to
transparent before it is created and resized I don't expect any.

Here's a compulsory screenshot of the splash screen over an editor;

<img width="1247" height="666" alt="image"
src="https://github.com/user-attachments/assets/8ce05565-f207-4134-892d-9c074c4c840c"
/>


### Additional things
> Anything else you would like to say

Yes! I don't use ImHex often, but it's really useful when I do, thank
you!
2025-08-09 14:12:22 +02:00
WerWolv
9cff9043ee impr: Remove hex::format, improve format and logging type safety 2025-08-06 20:02:23 +02:00
WerWolv
b81328ac1a fix: Web build not properly starting up anymore 2025-08-02 23:07:20 +02:00
WerWolv
7b6d5d2686 impr: Cleanup splash screen, make hex highlights look nicer 2025-07-31 20:33:55 +02:00
WerWolv
f239b0c6d7 fix: Incorrect progress bar on splash screen 2025-07-28 18:02:33 +02:00
WerWolv
d08152a824 impr: Cleanup splash screen, speed up ImHex launching even further 2025-07-26 23:48:03 +02:00
WerWolv
66ec1de625 fix: Splash screen progress bar not updating properly 2025-07-26 23:03:34 +02:00
WerWolv
c1545b57c9 impr: Cleanup font loading API, fix CJK glyphs being rendered way too large 2025-07-25 23:06:44 +02:00
WerWolv
820b833bbc fix: Window close event handlers not getting called correctly 2025-07-25 10:52:11 +02:00
WerWolv
2b72d08e39 build: Fix and re-enable Web build 2025-07-24 10:52:08 +02:00
Nik
d1840a2184 build: Update ImGui to v1.92.1 (#2325)
Update ImGui to the latest version and rewrite most of the font handling
code
2025-07-10 10:00:39 +02:00
WerWolv
cfc364e4f1 fix: Commands that setup init events not working anymore 2025-07-07 11:16:29 +02:00
WerWolv
053f7655c3 fix: Crashes on exit due to font deletion
#2287
2025-06-28 22:58:55 +02:00
WerWolv
288f8ee42f fix: Crash on Wayland when glfwTerminate() gets called more than once 2025-06-28 13:48:48 +02:00
WerWolv
1ca40481bb tests: Integrated ImGui Test Engine 2025-05-29 23:44:49 +02:00
paxcut
5c4cf7379f feat: Added Subpixel Font rendering (#2092)
Proof of concept for implementing subpixel processing in ImGui. This is
work in progress, and it is bound to have problems.

What it does:
1) Uses freetype own subpixel processing implementation to build a
32-bit color atlas for the default font only (no icons, no unifont) . 2)
Avoids pixel perfect font conversion when possible. 3) Self contained,
no ImGui source code changes.
4) Results in much improved legibility of fonts rendered on low dpi LCD
screens that use horizontal RGB pixel layouts (no BRG or OLED or CRT if
they even exist anymore)

What it doesn't:
1) Fancy class based interface. The code is barely the minimum needed to
show it can work. 2) Dual source color blending. That needs to be
implemented in shader code, so it needs to change ImGui source code
although minimally. This will result in some characters appearing dimmer
than others. Easily fixed with small fragment and vertex shaders. 3)
subpixel positioning. If characters are very thin they will look
colored, or they can be moved to improve legibility. 4) deal with
detection of fringe cases including rare pixel layouts, non LCD screens,
Mac-OS not handling subpixel rendering and any other deviation from the
standard LCD. 5) tries to be efficient in speed or memory use. Font
Atlases will be 4 times the size they were before, but there are no
noticeable delays in font loading in the examples I have tried.

Any comments and code improvements are welcome.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-05-11 15:36:32 +02:00
WerWolv
8081dff6b6 build: Updated libfmt (#2234) 2025-05-09 19:00:04 +02:00
WerWolv
1ed56c1b1d fix: Wrong native scaling on Wayland 2025-02-16 21:59:30 +01:00
WerWolv
bf10d333cd fix: Default scale of Web version on macOS 2025-02-16 16:35:37 +01:00
WerWolv
a83610bc06 build: Updated libwolv 2025-02-11 23:05:25 +01:00
WerWolv
e1580e51cf build: Make ImHex fully compile with warnings enabled in MSVC 2025-02-10 09:42:35 +01:00
WerWolv
497670c4c3 fix: Don't apply backing scale factor twice to splash screen 2025-02-02 21:36:49 +01:00
WerWolv
e9bf1a9f7a fix: Crash when no plugins were loaded 2025-02-01 18:08:47 +01:00
WerWolv
24e7c2f3db fix: Make sure all textures are destroyed before glfw gets uninitialized 2025-01-27 22:10:30 +01:00
WerWolv
6e6c5bbc67 fix: Splash screen texture scaling 2025-01-27 21:20:59 +01:00
WerWolv
f4403ff480 impr: Make splash screen use SVG directly 2025-01-27 20:45:30 +01:00