Skip to content
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

libobs/util: Add support for #if and #elif to CF parser #10312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

exeldro
Copy link
Contributor

@exeldro exeldro commented Mar 1, 2024

Description

Add support for #if and #elif to CF parser
It supports without comparator and with the following comparators: ==, >=, <=, !=, <, >

Motivation and Context

This was not supported yet and I wanted to use it in a shader. And it helps when trying to convert existing shaders to be used in OBS.

How Has This Been Tested?

On windows 11 by having a shader with this code in it:

#define test 1234

#if test == 0

#elif 0

#elif test > 1234

#elif test < 1234

#elif test == 1234

#endif

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Mar 2, 2024
@derrod derrod requested a review from Lain-B August 21, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants