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

DOSBox compatibility layer option duplicated #279

Closed
hlechner opened this issue Jul 6, 2019 · 8 comments
Closed

DOSBox compatibility layer option duplicated #279

hlechner opened this issue Jul 6, 2019 · 8 comments

Comments

@hlechner
Copy link

hlechner commented Jul 6, 2019

Expected behavior

No duplicated options should be displayed on DOSBox compatibility layer options.

Actual behavior

Its showing a duplicated option from the same file:
image

Both Disable fullscreen options are from the same file: /usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf

If I disable only one option: It will start with fullscreen disabled but the next time it will came with both options disabled.
If I disable two options: will start with fullscreen and the next times as well.

Steps to reproduce
  • Go to a DOSBox Compatibility layer options
Version and environment
Version: 0.14.1-8865f62-makepkg
Branch:  makepkg
Commit:  8865f62 (8865f62cc982a35dfe70e70f4b50996413a92f06)
Distro:  NAME=Arch Linux
DE:      Yaru:ubuntu:GNOME
@tkashkin
Copy link
Owner

tkashkin commented Jul 6, 2019

Run GameHub with --debug --verbose arguments.
It should log found data directories and configs.
Same directory shouldn't be added multiple times, but maybe it is.

@neuromancer
Copy link
Contributor

I can confirm this issue, I will try to obtain some useful logs. There are some issues in the latest revision, that could be related with DOSBox games manually added by the user before upgrading GameHub.

@hlechner
Copy link
Author

hlechner commented Jul 6, 2019

When I click to launch the DOSBox game:

[DEBUG]  [Utils.run] {'/usr/bin/dosbox' '-conf' '/home/hlechner/.wine/drive_c/Program Files (x86)/GOG.com/Little Big Adventure 2/dosboxLBA2.conf' '-conf' '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf' '-conf' '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'}; dir: '/home/hlechner/.wine/drive_c/Program Files (x86)/GOG.com/Little Big Adventure 2'
[Detaching after fork from child process 8455]
DOSBox version 0.74-2
Copyright 2002-2018 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file /home/hlechner/.wine/drive_c/Program Files (x86)/GOG.com/Little Big Adventure 2/dosboxLBA2.conf
CONFIG:Loading additional settings from config file /usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf
CONFIG:Loading additional settings from config file /usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf
MIXER:Got different values from SDL: freq 22050, blocksize 1024
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none

Running --gdb or --debug --verbose produces the results above, but at the GameHub start the debug verbose produces these lines too:

[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true

@tkashkin
Copy link
Owner

tkashkin commented Jul 6, 2019

I have added more verbose logging for data_dirs.
It shouldn't add same directories multiple times but for some reason it does in your case. I guess directories may have trailing slashes on your systems.
Run GameHub with --debug --verbose again and it should log something like this:

[DEBUG]  [DOSBox.init] ProjectConfig.DATADIR: '/usr/share'
[DEBUG]  [DOSBox.init] user_data_dir: '/home/tk/.local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/gnome'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/pantheon'
[DEBUG]  [DOSBox.init] system_data_dir: '/home/tk/.local/share/flatpak/exports/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/flatpak/exports/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/snapd/desktop'
[DEBUG]  [DOSBox.init] data_dirs: {'/usr/share', '/home/tk/.local/share', '/usr/share/gnome', '/usr/share/pantheon', '/home/tk/.local/share/flatpak/exports/share', '/var/lib/flatpak/exports/share', '/usr/local/share', '/var/lib/snapd/desktop'}

@hlechner
Copy link
Author

hlechner commented Jul 6, 2019

Result:

$ com.github.tkashkin.gamehub --debug --verbose
[DEBUG]  [Database.migrate] Latest db version: 8, current: 8
[DEBUG]  [WineWrap] Updating index
[DEBUG]  [DOSBox.init] ProjectConfig.DATADIR: '/usr/share'
[DEBUG]  [DOSBox.init] user_data_dir: '/home/hlechner/.local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/home/hlechner/.local/share/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/local/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/'
[DEBUG]  [DOSBox.init] data_dirs: {'/usr/share', '/home/hlechner/.local/share', '/home/hlechner/.local/share/flatpak/exports/share/', '/var/lib/flatpak/exports/share/', '/usr/local/share/', '/usr/share/'}
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[INFO]   Version: 0.14.1-2f7c584-makepkg
[INFO]   Branch:  makepkg
[INFO]   Commit:  2f7c584 (2f7c5840d7764031b73a21475e739a86a03c0709)
[INFO]   Distro:  NAME=Arch Linux
[INFO]   DE:      Yaru:ubuntu:GNOME

@tkashkin
Copy link
Owner

tkashkin commented Jul 6, 2019

Does it work correctly now?

@hlechner
Copy link
Author

hlechner commented Jul 6, 2019

Fixed.

Can you confirm this fix for you too? @neuromancer

@neuromancer
Copy link
Contributor

Confirmed. Seems to be fixed.

@hlechner hlechner closed this as completed Jul 6, 2019
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants