I want to get my dinput patches in before the code freeze, and besides the ones that I tried to commit last week I have some patches touching EnumDevicesBySemantics and ConfigureDevices, but I can't commit them before the DIPROP_USERNAME and configuration file patches are in too. Seeing that I'll have to change a lot of things in the patches to get them in I want to ask some questions:
* Is %APPDATA%\DirectInput\User Maps a better place to store the configuration files? * Should I use the registry to persist the usernames in the dinput devices instead of relying on the filename and filetimes like windows seems to do? Where in the registry does this information belong? * Any suggestions on how to format all these W strings? I could use just strcatW, but since I have to convert integers to strings I think I'll have to look at sprintf variation... * I'll drop the _ in front the functions from now on. Should I send patches to remove it in the other functions that already use it?
On 01/17/2012 11:19 AM, Lucas Zawacki wrote:
I want to get my dinput patches in before the code freeze, and besides the ones that I tried to commit last week I have some patches touching EnumDevicesBySemantics and ConfigureDevices, but I can't commit them before the DIPROP_USERNAME and configuration file patches are in too.
Even thou we are not officially "frozen" I doubt AJ will accept anything that significantly alters functionality. Unless you trying to fix some big number of programs that don't work of course. Do you have bug # that talks about program(s) not working?
Seeing that I'll have to change a lot of things in the patches to get them in I want to ask some questions:
- Is %APPDATA%\DirectInput\User Maps a better place to store the
configuration files?
Much better place IMHO.
- Should I use the registry to persist the usernames in the dinput
devices instead of relying on the filename and filetimes like windows seems to do? Where in the registry does this information belong?
Not sure what you mean here.
Just assume that Wine is being run by one user and one user only. Especially that you storing files under a particular user's profile directory. And since Wine doesn't allow multiple users to use the same wineprefix, it makes sense to assume that all configuration will be generated by one user.
- Any suggestions on how to format all these W strings? I could use
just strcatW, but since I have to convert integers to strings I think I'll have to look at sprintf variation...
Few things I can think of: - Store all string constants as "static const WCHAR fooW[] = {'f','o','o',0}". - Just make your heap_printfW() work with provided buffer and size (both passed by ref). And enlarge that buffer if needed. So the next call will use the new bigger buffer. This is not speed critical so should be fine with heap buffer. Unless of course someone else have some objections.
- I'll drop the _ in front the functions from now on. Should I send
patches to remove it in the other functions that already use it?
Yes please, but it can wait.
Vitaliy.