Skip to content

Fix VFS stat command#154

Merged
garbear merged 1 commit intokodi-game:Piersfrom
garbear:fix-vfs-stat
Mar 18, 2026
Merged

Fix VFS stat command#154
garbear merged 1 commit intokodi-game:Piersfrom
garbear:fix-vfs-stat

Conversation

@garbear
Copy link
Member

@garbear garbear commented Mar 17, 2026

Description

Fixes bug in the VFS wrapper causing UAE to not find BIOS files.

Motivation and context:

Reported here: https://forum.kodi.tv/showthread.php?tid=384979

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a VFS wrapper bug where file/stat flag bitmasks were being combined with &= instead of |=, causing required flags to never be set (which can prevent UAE from detecting BIOS files via stat/validity checks).

Changes:

  • Use |= (bitwise OR) to accumulate Kodi VFS open flags for read-only file opens.
  • Use |= (bitwise OR) to accumulate retro_vfs stat result bitmask flags (IS_VALID, IS_DIRECTORY, IS_CHARACTER_SPECIAL).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes incorrect bitmask manipulation in the libretro VFS wrapper so that file open flags and stat() result flags are set correctly, addressing UAE failing to locate BIOS files.

Changes:

  • Fix OpenFile() to set Kodi VFS read flags with bitwise OR (|=) instead of AND (&=).
  • Fix Stat() to set RETRO_VFS_STAT_* result flags with bitwise OR (|=) instead of AND (&=).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@garbear
Copy link
Member Author

garbear commented Mar 18, 2026

Reported working in the forum: https://forum.kodi.tv/showthread.php?tid=384979

@garbear garbear merged commit 486936a into kodi-game:Piers Mar 18, 2026
10 checks passed
@garbear garbear deleted the fix-vfs-stat branch March 18, 2026 15:16
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

Successfully merging this pull request may close these issues.

2 participants