Commit Graph

449 Commits

Author SHA1 Message Date
WerWolv
ed32439645 impr: Only add stacktrace to exceptions thrown in main thread 2025-12-02 20:00:19 +01:00
WerWolv
8f57dd86af fix: Typos 2025-12-01 19:33:21 +01:00
WerWolv
cba93e87eb fix: Issues with drawing interactive tutorial 2025-11-30 14:07:57 +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
4dc3f9e033 build: Update ImGui Test Engine 2025-09-19 18:21:57 +02:00
WerWolv
b039bc14c6 fix: Only first opened popup appearing properly 2025-09-08 19:51:58 +02:00
WerWolv
06ac7eb85f impr: Make Hex Editor view always be focused by default 2025-08-31 11:22:26 +02:00
WerWolv
c65015fcc7 fix: Make sure crash handling operations happen in the right order 2025-08-31 10:23:19 +02:00
WerWolv
d2c1b2a31b impr: Resume logging before printing crash logs 2025-08-30 14:35:29 +02:00
WerWolv
e30f073809 build: Properly link against libpthread on mingw 2025-08-30 14:27:40 +02:00
WerWolv
e1079d751a fix: Handle uncaught exceptions more gracefully 2025-08-30 14:24:39 +02:00
WerWolv
a9d45d837f fix: Missing pthread include 2025-08-30 11:21:09 +02:00
WerWolv
bcbe5eb105 fix: Use Win32 functions to terminate thread on Windows 2025-08-30 11:19:40 +02:00
WerWolv
281921d1de fix: Crashes in non-main threads causing freezes 2025-08-30 10:32:24 +02:00
WerWolv
bd9e9a7dcf impr: Make crash handling from non-main threads more resilient 2025-08-27 23:53:46 +02:00
WerWolv
abffb8c138 fix: Text in toasts getting cut off very quickly 2025-08-27 23:34:16 +02:00
WerWolv
e353802e9f impr: Added more OpenGL version information to logs 2025-08-27 23:34:01 +02:00
WerWolv
130055af22 fix: Crash when force-exiting on macOS 2025-08-27 23:33:44 +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
b5bf9f1486 fix: Don't close modals on focus change 2025-08-18 20:49:27 +02:00
WerWolv
b602fcc485 fix: Popups sometimes not opening until clicking on the window again 2025-08-18 20:37:12 +02:00
WerWolv
441dcea705 impr: Cleanup popup creation handling 2025-08-18 20:06:42 +02:00
WerWolv
c5e0951def fix: Crash if platform backend doesn't have GetWindowFocus function defined yet 2025-08-18 20:06:06 +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
cf5b9da45e fix: Disable focus handling on the web version since the GLFW_FOCUSED attribute doesn't work 2025-08-17 20:21:36 +02:00
WerWolv
89b94ebbf9 fix: Buttons near the edges of the Window not reacting correctly to clicks
#2413
2025-08-17 10:33:26 +02:00
WerWolv
8b72ea81c0 fix: More window focus event issues 2025-08-16 16:47:23 +02:00
WerWolv
0ebe4150ae fix: ImHex getting stuck in unlocked FPS mode when some events are blocking 2025-08-15 19:25:25 +02:00
WerWolv
f921742dcc fix: Window not being properly resizable from the top right on Windows 2025-08-15 17:30:23 +02:00
WerWolv
1c54e7e38b fix: Focus loss getting triggered when a popup was selected 2025-08-15 17:29:49 +02:00
WerWolv
165d00dad3 build: Fix more missing includes 2025-08-14 22:22:32 +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
3616c3ad7b fix: Move jthread include 2025-08-10 22:41:06 +02:00
WerWolv
23d673f920 fix: Multiple FreeBSD build and run errors 2025-08-10 22:38:12 +02:00
WerWolv
12785c00bd impr: Condense and modernize data inspector view 2025-08-10 18:25:06 +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
45b08b6010 impr: Enable some of the new ImGui configs 2025-08-09 16:22:07 +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