1
0
mirror of synced 2024-11-14 19:17:42 +01:00
Commit Graph

1143 Commits

Author SHA1 Message Date
WerWolv
c46e445a04 impr: Store achievement progress immediately when unlocking one 2023-10-20 13:34:45 +02:00
WerWolv
5227887dbf impr: Added more fine-grained colors to themes 2023-10-20 12:30:21 +02:00
WerWolv
d07d36f784 fix: Loading of data processor workspaces not working correctly 2023-10-19 23:53:20 +02:00
Nik
b4ee02b725
fix: Shift right data processor node displaying shift left in its header 2023-10-19 22:48:11 +02:00
WerWolv
79e25b0889 feat: Added bitwise shift left/right data processor nodes 2023-10-19 22:08:39 +02:00
WerWolv
58870f3057 fix: File load achievement triggering every time a file was opened through the cli 2023-10-17 13:45:12 +02:00
WerWolv
8821f75e6b impr: Display friendly disk name as the tab title of the disk provider 2023-10-17 10:22:56 +02:00
WerWolv
c49aad6cd3 impr: List all physical drives on windows in the raw disk provider 2023-10-16 23:45:46 +02:00
WerWolv
afceb34729 fix: Crash when opening invalid files through the CLI 2023-10-16 10:59:49 +02:00
paxcut
93c8a45de0
fix: Fixed spacing in bit labels so it works for any font and any size. (#1365)
Testing various fonts and sizes I realized there were still problems
with the layout of the bit labels. Also I reorganized the code so that
lambdas are defined just before they are used. Comments needed
punctuation too.

Part of the problem was that I had been assuming all along that the
check boxes were ImGui's originals which are always square. In actuality
the width is determined by the width of the character for '0'. Also
ImGui table was adding spacing to separate cells which made the boxes
not start at same place as column. Also for some reason using indent of
zero didn't work as expected but using 0.1 pixels worked. With those
problems fixed it is fairly easy to make sure the labels are centered at
the box except when the first mantissa checkbox gets a label which is
wider that the box width. Before and after show results for different
fonts.

Before:

![image](https://github.com/WerWolv/ImHex/assets/53811119/3778e6d5-6fbd-48e1-ac51-39a6636daea5)

After:

![image](https://github.com/WerWolv/ImHex/assets/53811119/79c0f027-3119-4762-a4e3-315e84505f3b)
2023-10-15 20:07:51 +00:00
WerWolv
da1b53420f feat: Added debug variables to aid with development 2023-10-13 23:46:48 +02:00
WerWolv
5a71cc2d61 fix: Wikipedia explainer tool randomly resetting input 2023-10-12 20:35:44 +02:00
WerWolv
b98b60a126 fix: Provider hover tooltip always showing information about current provider 2023-10-12 20:28:02 +02:00
WerWolv
929e0e64a5 fix: Achievement hovering popups showing up even when they are covered by another window 2023-10-12 20:24:02 +02:00
WerWolv
48a1e93cfe fix: Tool windows drawing on top of the welcome screen
Fixes #1364
2023-10-12 15:15:05 +02:00
paxcut
081c581b8c
fix: Layout of large font labels in IEEE 745 floating point tool (#1337)
### Problem description
The issue seems to only affect the web version of ImHex but it is not
clear why. The labels of the checkboxes that represent bits in the IEEE
745 floating point tool were lay out incorrectly.

### Implementation description
The new code ensures that the bit labels are centered and located in the
middle of the checkbox regardless of the font size and the dear imgui
sized checkboxes.
2023-10-04 22:10:06 +02:00
iTrooz
d15bd4771d
feat: Support for building ImHex for the web (#1328)
Co-authored-by: WerWolv <werwolv98@gmail.com>
Co-authored-by: AnnsAnn <git@annsann.eu>
2023-10-04 12:00:32 +02:00
WerWolv
89bffbd1bc fix: Crash when exceptions are thrown in data processor nodes 2023-09-27 14:19:08 +02:00
WerWolv
e80c7bff1c impr: Refactored forwarder executable and add lots more information to it 2023-09-27 14:14:27 +02:00
WerWolv
b3ef615158 feat: Allow Edit -> Jump to to jump to little and big endian addresses
Closes #1324
2023-09-26 14:01:28 +02:00
WerWolv
89abc8557f feat: Added shortcuts for the pattern debugger 2023-09-24 18:26:42 +02:00
WerWolv
181a7c5b3d feat: Added evaluate pattern shortcut 2023-09-24 18:17:58 +02:00
WerWolv
f79e2df11a feat: Added shortcut to switch between providers 2023-09-24 18:11:17 +02:00
Paul Sorensen
be8c679d4a
impr: Return early to remove nested code (#1253)
<!--
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 -->
This will simplify the codebase in the pattern drawer. It returns early
on conditional statements and reduces the amount of nested code making
it easier to read and track while developing.
2023-09-20 10:49:09 +02:00
paxcut
c577a42f62
impr: Refactoring of floating point tool to decrease code complexity. (#1275)
I noticed the bad score on code factor so I reorganized it to make it
more readable and maintainable. In order to break down the big function
into it much smaller parts I encapsulated all the variables that the
functions need to access in two classes, one for the imgui related
statics and the other for non-static variables.

When writing the smaller functions I was noticed that there was room to
simplify the existing algorithms by writing functions that could be
called by parts that previously shared no code. I tested the changes the
same way I tested the original and it seems to work the same way but
maybe a bit faster. Although it may be possible to further optimize the
present code code factor no longer flags the function at all.
2023-09-20 10:48:44 +02:00
Lennard Fonteijn
ad69ac84b1
feat: Added hex::group attribute and various fixes (#1302)
As discussed (many times) on Discord, does the same as the new favorite
tag, but instead allows you to add multiple groups.

Initially, this would cause some insane issues with draw/reset
(apparantly) fighting eachother in the pattern drawer. After a lot of
trial and error, I decided to rewrite the flow that is responsible for
calling reset. Now evaluating patterns is the one to decide when the
reset happens, not the core "game"-loop.

To make sure that draw and reset can never happen at the same time, the
mutex originally used for the favorites has been repurposed. Due to the
restructuring, the mutex in the favorite-task is no longer needed, as
that will only ever kick-off after reset is called and if there are
actually patterns, which can never line up to be accessed on different
threads at the same time.

Last but not least, I noticed that hard crashes could result in your
config file getting overridden. I added a check to prevent that.

Last I issue I can see is that if you use an excessive amount of
favorites/groups, a crash can still happen, but it only happens when you
close the program (occasionally, but unpredictable). Before, this would
happen if you ran the evaluation a second time. I boiled the cause of
the crash down to these lines of code in evaluator.cpp >
patternDestroyed:

```cpp
if (pattern->isPatternLocal()) {
    if (auto it = this->m_patternLocalStorage.find(pattern->getHeapAddress()); it != this->m_patternLocalStorage.end()) {
        auto &[key, data] = *it;

        data.referenceCount--;
        if (data.referenceCount == 0)
            this->m_patternLocalStorage.erase(it);
    } else if (!this->m_evaluated) {
        err::E0001.throwError(fmt::format("Double free of variable named '{}'.", pattern->getVariableName()));
    }
}
```

Specifically, trying to access the `*it` is the reason for the crash
(this was also the cause of the crashes before my fixes, but then during
evaluation).

I'm suspecting the root cause is somewhere in the `.clone` methods of
the patterns. I'd say that for now a crash when closing the program is
more acceptable than during evaluation (which can even happen if you use
favorites).
2023-09-16 13:09:59 +02:00
Imron jehleh
64a30a45d5
fix: Error popup now showing up immediately after click (#1272)
From #1265, Looks like Error Popup doesn't handle properly in some
circumstances.

---------

Co-authored-by: iTrooz <hey@itrooz.fr>
Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-09-16 13:09:24 +02:00
WerWolv
1a2a926b77 fix: "About ... that much" achievement not triggering correctly 2023-09-12 22:24:12 +02:00
WerWolv
da18428f27 fix: Highlighting not being cleared correctly in some cases 2023-09-12 22:23:47 +02:00
iTrooz
5e86f62a98
fix: Handle exceptions thrown by providers on loadSettings() (#1307) 2023-09-12 12:00:00 +02:00
WerWolv
1bb0a72bed fix: Issues with various float nodes 2023-09-04 19:59:09 +02:00
WerWolv
7685a22c5f fix: Crash when pressing delete twice when data processor nodes are selected 2023-09-04 19:58:55 +02:00
WerWolv
4ff25819c2 fix: Pasting not working correctly on non-zero pages
Fixes #1291
2023-09-03 16:25:51 +02:00
WerWolv
563ff5a774 fix: Future proof the previous fix 2023-09-03 16:18:29 +02:00
WerWolv
b042b8327a fix: Crash when re-opening a custom section window while having a selection in it 2023-09-03 16:09:06 +02:00
WerWolv
971c8739ca fix: Potential crash when preprocessing invalid pattern file when loading a file 2023-09-03 15:49:27 +02:00
WerWolv
26f4aa0d9f fix: Buffer to integer node not working correctly 2023-09-03 15:41:00 +02:00
WerWolv
b2d1568abb fix: First overlay being assigned to all end nodes 2023-09-03 13:44:13 +02:00
WerWolv
632f388ece impr: Make --pl subcommand automatically register ImHex's include dirs 2023-09-03 12:25:00 +02:00
WerWolv
0bbd21f25a fix: Build issues with older standard libraries 2023-09-03 11:44:48 +02:00
WerWolv
367c4ec9c8 impr: More view comments and refactoring 2023-09-03 10:27:03 +02:00
WerWolv
5538307838 impr: Make achievement popups stay up for longer 2023-09-03 10:26:40 +02:00
iTrooz
fc1ad592cb
feat: Adapt content store view for new API contents (#1268) 2023-09-02 18:36:34 +02:00
Lennard Fonteijn
f725d763d1
feat: Remember bytes per row in Hex Editor (#1276) 2023-09-02 17:52:05 +02:00
iTrooz
c2fe9f0966
fix: verify that file names queried from the store do not allow path traversal (#1277) 2023-09-02 17:51:21 +02:00
WerWolv
58cef2361b impr: Added hint when patterns are still loading 2023-08-30 10:04:06 +02:00
WerWolv
60649d1cba fix: Occasional crash when using favorites 2023-08-30 09:18:24 +02:00
WerWolv
ea9457c08c patterns: Added [[hex::favorite]] attribute 2023-08-29 21:46:08 +02:00
WerWolv
4288f876e2 impr: Added lots of comments and cleaned up many views 2023-08-29 12:14:12 +02:00
iTrooz
10ad239fb9
fix: add _lang suffix to "Load into memory" localization string (#1267) 2023-08-28 02:21:41 +02:00