protonscr

Question to conf true\false is case insensitive?

dxvkclosed question
doitsujin/dxvk#2270 · opened 2021-09-02 by Bxaa · updated 2021-09-02 · 9 comments · github
BBxaa 2021-09-02 github

Is true equal True while conf parsing?

DDadSchoorse 2021-09-02 github
BBxaa 2021-09-02 github

This is just genius code :)
For obvious reasons this must be fixed

value.ToLower() == "true"

std::string data = "Abc";
std::transform(data.begin(), data.end(), data.begin(),
[](unsigned char c){ return std::tolower(c); });

I lost a lot of time because of this crap trying to figure out why nothing is working :)

KK0bin maintainer 2021-09-02 github

Feel free to open a PR.

Ddoitsujin maintainer 2021-09-02 github

The example file even kind of tells you that True is the one to use.

Also, tolower is locale sensitive, i.e. really bad.

BBxaa 2021-09-02 github

.ToLower(CultureInfo.InvariantCulture)

KK0bin maintainer 2021-09-02 github

We'll keep that in mind when we rewrite DXVK in C#...

BBxaa 2021-09-02 github

setlocale

Don't... you know exactly what I mean :)

Ddoitsujin maintainer 2021-09-02 github

I don't really see how this is a big deal in the first place, it hasn't been for the past three years and given your behaviour in this thread i'm honestly inclined to leave it as-is out of spite.

BBxaa 2021-09-02 github

Don't get me wrong - I wasted a lot of time because of this misunderstanding. I just couldn't imagine that it could be so bad.
English is not my native language. I didn't mean to offend anyone.

I am not a C++ programmer, and I hardly use it, but even for me there is no difficulty in this.
If you think the current implementation of config parsing is good, then let it stay as it is.
I don't think so, but that's my personal opinion. I would be fired from my job if I made such an implementation :)

You know what I mean?

And yes, thank you for your work!

Nothing extracted yet.