hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.79k stars 2.12k forks source link

Configuration: add comments to INI file describing options #13159

Open devinprater opened 3 years ago

devinprater commented 3 years ago

What happens?

Since PPSSPP's interface is not usable by screen readers, blind people must use the INI file to configure the program. Many parts of the INI are fine with how they are presented now, like:

FirstRun = False

but others, like

CPUCore = 2

Could be annotated with comments to provide the option for which the number is mapped to. This could look like:

CPUCore = 2
# CPU Core 1: X
# CPU Core 2: Y
# CPU Core 3: Z

This could help users who edit the configuration know which option does what. This is especially useful on iOS, where one should select the IR Interpreter... I think that's the one... so the default JIT would actually crash the emulator.

What should happen?

The INI file should be annotated with comments for unclear options which require a numeric or text data.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

This effects all operating systems and versions.

hrydgard commented 3 years ago

I find it really interesting how you use the ini file as a substitute for the inaccessible UI!

This is a cool idea, although a bit fiddly technically since the current INI code has not been designed to modify comments, instead to always leave them in place - since both humans and the emulator can read and write the file, we need to be very careful to not accidentally stomp on human-written comments if we add this.

unknownbrackets commented 3 years ago

For CPU Core specifically, we could make it allow names like we did for the GPU Backend. But I agree it's more of a general problem across settings.

I do wish there was a trivial way to create a map of enum names from an enum in C++... (or maybe there is and I just don't know of it.)

-[Unknown]

devinprater commented 3 years ago

@unknownbrackets I wouldn't want to write a name for the CPU core. Numbers are good, I just would like to know which options are available. Writing names could be bad because what if the written thing is wrong? Like, instead of "IR Interpreter" you get "ir interpretor?" This very well could happen for a blind person using a screen reader that may not know how to spell the word. Then I'd imagine the CPU would go back to JIT, which may not work on iOS.

@hrydgard I wouldn't want to edit the comments, just have comments around the code showing, if needed, what the setting does, and definitely, which options are available.

hrydgard commented 3 years ago

Right I understand that, but the emulator is what writes the ini file in the first place, and it needs to put the comments there automatically if they aren't there already every time, and somehow avoiding stomping comment edits the user might have made. It's not trivial but absolutely doable.

JaegerFox commented 3 years ago

This would be very helpful. since I upgrade from a version 1.9x to 1.10.x frameskip unthrottle stopped working, and I had to look in the source code to see which was the new option, and for me it is better to use numbers like

UnthrottleMode = 2 
# UnthrottleMode 2 : Skip_Draw

instead of UnthrottleMode = SKIP_DRAW