Skip to content

Don't use SDL filesystem in DInput joystick driver#15845

Open
Nintorch wants to merge 1 commit into
libsdl-org:mainfrom
Nintorch:fix-win-joy-filesystem
Open

Don't use SDL filesystem in DInput joystick driver#15845
Nintorch wants to merge 1 commit into
libsdl-org:mainfrom
Nintorch:fix-win-joy-filesystem

Conversation

@Nintorch

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

This PR makes the DirectInput joystick driver optionally not use the SDL filesystem subsystem in case an external project that intergrates SDL (e.g. Godot Engine) doesn't use its filesystem subsystem.

Please let me know if this change is acceptable!

Existing Issue(s)

None

char path[128];
WIN32_FIND_DATAA file;
SDL_snprintf(path, sizeof(path), "%s%s", directories[i], "/EZFRD64.DLL");
HANDLE search_handle = FindFirstFileA(path, &file);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't mind switching to Win32 filesystem code here, but this isn't equivalent, and won't find e.g. "C:\Windows\USB_Vibration\791847\EZFRD64.DLL"

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