-
Notifications
You must be signed in to change notification settings - Fork 37
multiple fixes #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MLXProjects
wants to merge
16
commits into
amarullz:master
Choose a base branch
from
MLXProjects:1.5-dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
multiple fixes #18
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When the hid_getevent() loop got LIBAROMA_HID_EV_RET_EXIT, it didn't set the event type after clearing; so the message queue loop never got a valid event. This prevented the application to receive and handle the LIBAROMA_MSG_EXIT message. It's working now :) Oh, and there was a minor indentation fix at hid/messages.c.
At the start, libaroma used the typical MIN/MAX macros: ``` #define MIN (((a)<(b))?(a):(b)) #define MAX (((a)>(b))?(a):(b)) ``` That always kinda worked, but double-evaluation may cause nasty bugs which are pretty hard to find. With the 1.5 update, the macros were changed to inline functions; this handled the double-evaluation issue at the cost of needing one function for every compared type (int, float and double), and needing to update all the macro usages for the right function (ensuring proper type and signedness comparison). That change also broke some animations, due to the wrong function being used (e.g. int MIN/MAX used for float values). The approach taken in this commit aims to prevent further issues: At the cost of needing two GNU extensions, we can use a macro that handles the data types properly while using a single evaluation. The result is pretty much like the inline functions without having to care about multiple types :D The corresponding changes were reverted in control's code, too.
Adjusted the SDL.h header path (it should always be inside a SDL directory in the compiler's include path). Also, fixed the main define check at platform.c
Since building libjpeg-turbo with SSE support needs a NASM compiler which the build system doesn't support, I just disabled SIMD for it. Not the best fix, but I couldn't find a way to make it work with GCC.
Thanks to SonarCloud technologies :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a few relevant fixes for some features that broke in the 1.5 source update, along with some general things like warnings fixed :D
Each commit details the changes and, when needed, compares old vs new behavior.
This is the first step for me to organise my fork into something mergeable while mantaining compatibility, since my current codebase is a mess due to it having like 4 years of my attempts at learning C lol