Skip to content

Images in slideshow are not ordered if added by folder (random setting is disabled) #10382

@ximex

Description

@ximex

Operating System Info

Other

Other OS

Kubuntu 23.10

OBS Studio Version

30.1.0

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/A8fSnIT7ryAcMhXK

OBS Studio Crash Log URL

No response

Expected Behavior

If i add a folder for a slideshow they should be in alphabetically order of the filename if the random flag is not enabled

Current Behavior

The images appear in a random order (the random flag is NOT enabled)

Steps to Reproduce

  1. Add a slidshow
  2. Add a dir with many images in it
  3. Compare the ordering in the folder with the order the images are shown

Anything else we should know?

I'm not the C expert but if i'm not wrong it's because the os_readdir function doesn't sort the entries in a directory as the function readdir doesn't guaranteed the ordering AFAIK.
See:


struct os_dirent *os_readdir(os_dir_t *dir)

dir->cur_dirent = readdir(dir->dir);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions