qmc2 / qmc2-mame-fe

QMC2 - M.A.M.E. Catalog / Launcher II
40 stars 3 forks source link

Some values not showing in global options. #8

Closed N3tFX closed 2 years ago

N3tFX commented 2 years ago

I have noticed that for some text input fields, the values do not appear most of the times, even thought the value is set. I have noticed this in the global rompath field in the: Emulator tab > Global configuration sub-tab > Search Paths > rompath. If I close and reopen the windows many times it sometimes shows up, but it should load the value from the configuration file when the options window is opened.

qmc2 commented 2 years ago

It's clearly shown here. Probably a style thing?

qmc2 commented 2 years ago

But this is true for Windows...

N3tFX commented 2 years ago

I am on linux with gnome and I don't use any themes. It happens only to QMC2 and not others KDE apps that I use in the same machine. Weird.

N3tFX commented 2 years ago

Also, that field is the one that I've noticed. Maybe it's happening to other fields also.

qmc2 commented 2 years ago

Well, interestingly not here, that is, openSUSE Leap 15.1... thanks for the info! I'll check tomorrow or at least "this week" since I have a little time (Easter). Not today, though.

qmc2 commented 2 years ago

Also local / machine options are affected. But again, not on "my" Linux (Qt 5.9). Strange.

Didn't find it yet. These emu-option-types should be affected at least: QMC2_EMUOPT_TYPE_COMBO, _COLOR, _FILE, _DIRECTORY and _STRING. (Or all...)

estefan3112 commented 2 years ago

This happens to me in MacOS as well. For testing purposes, I set a custom rom-path and a custom ini-path, storing the values with the store icon:

Screenshot 2022-04-11 at 20 50 44

After a restart of QMC2, the values are gone in the UI, but they are in qmc2.ini! Screenshot 2022-04-11 at 20 52 32

qmc2 commented 2 years ago

Okay, thanks for the info... as expected.

estefan3112 commented 2 years ago

Add-on: It seems that this applies to all options in my configuration. Another example: I switch to Video/Windows (from default fullscreen), and after restarting QMC2, the option is no longer visible, but it is in qmc2.ini: Configuration\Global\window=true But the frontend does not show me the option as activated after a restart. After the restart, as a workaround, I can enable window=true again and only then click on reset to default value. This then deactivates the option in qmc.ini as well. So at least the options remain manageable by this workaround.

qmc2 commented 2 years ago

This is driving me nuts. I meanwhile figured out, that for "newer Qt" the amount of times it goes through the code (= sets the values in this dialog) is 1 and it doesn't realize the default values, whereas in "older Qt" (for instance my Qt 5.9) it's 2 and the defaults are loaded. That's strange enough.

In both Qt versions it doesn't set the description and so on correctly (however, that's not so important).

I need more time to fix it...

qmc2 commented 2 years ago

Okay, now the descriptions etc. are back... at least something :),

qmc2 commented 2 years ago

At least the StarDelegate example converted to use a QTreeWidget (as in case of QMC2's emu options) instead of a QTableView seems to work in both Qt versions, so it can't be much...

qmc2 commented 2 years ago

Wow, after "endless" sessions of changing src/emuopt.cpp I finally did this little commit and it seems to be working again: https://github.com/qmc2/qmc2-mame-fe/commit/66b0c0a406dc5a1e3c235c125672ee3fccad17c5

Please test and let me know your results!

N3tFX commented 2 years ago

I just tried it and it seems to work. At least in Debian.

qmc2 commented 2 years ago

Yeah, this really seems to have fixed it - strange, but who cares :). It works on Windows, too.

Thanks! I'm waiting for an info if it also works on macOS, and if, I'll close it.

estefan3112 commented 2 years ago

Very nice results on MacOS here! I have a Windows PC here, but no build environment on it.

qmc2 commented 2 years ago

Thanks, that's nice. Then I'll close the issue!