gamepads
gamepads copied to clipboard
[Windows] Plugin blocks window resizing
The current Windows implementation blocks the application from responding to window size changes. The application stays the same size while the rest of the window gets filled with black space when increasing the size, or the application gets cut off when decreasing the size.
For comparison the Linux version does not block the application from resizing with the window.
Reproducing steps:
- Add
gamepads
to thepubspec.yaml
of any Flutter project, or just use theexample
project in this package. - Run the program in any mode. (No need to implement any of the functionality of the plugin, nor have a gamepad connected)
- Try to resize the window.
Tested on Flutter 3.7 and 3.10 with gamepads 0.1.1.
The current Windows implementation blocks the application from responding to window size changes. The application stays the same size while the rest of the window gets filled with black space when increasing the size, or the application gets cut off when decreasing the size.
Hello, how did you solve this problem
Hello, how did you solve this problem
I have not solved it directly, but you can use win32_gamepad for the time being.
Hello, how did you solve this problem
I have not solved it directly, but you can use win32_gamepad for the time being.
I use win32_ How can gamepad not detect device connections? Determine whether the setting is connected and always return no
Hello, how did you solve this problem
I have not solved it directly, but you can use win32_gamepad for the time being.
for (var idx = 0; idx < 4; idx++) { final gamepad = Gamepad(idx); final connectionStatus = gamepad.state.isConnected ? 'connected' : 'disconnected'; print('Gamepad $idx is $connectionStatus.'); }
print('Testing first gamepad.'); final gamepad = Gamepad(0); if (gamepad.isConnected) {} Is there any way to get in there? Thank you.
Hello, how did you solve this problem
I have not solved it directly, but you can use win32_gamepad for the time being.
Win32_ How to use gamepad? I need to test buttons such as A B X Y
@chengwei88888 please only post things related to the bug mentioned in the title of the issue
If anyone is looking for a workaround until there is a proper fix, you can clone/fork this repo, delete the "windows" entry in gamepads/packages/gamepads under flutter: plugin: platforms:, and the associated dependency under dependencies:.
This will allow you to add this package as a local dependency without breaking your windows app, so you can use it for Linux gamepad support, while using something like this: https://pub.dev/packages/win32_gamepad for Windows support.
Is there a specific operating procedure? My controller can only be monitored using the gamepads component, but the window and keyboard cannot handle this issue
Why didn't the developers solve all the questions raised?
Why didn't the developers solve all the questions raised?
We are building this package in our free time, and we will solve any issues when we have the time. Anyone is welcome to contribute to make this package better.
Any solution ?
Any solution ?
Unfortunately not, I think the whole windows part needs to be migrated to a newer API for it to work properly.
It seems that the library for gamepad support is literally unusable on platforms where window resizing is possible. To be more precise, this applies to all the declared supported platforms on pub.dev. Thank you, of course, for your efforts xd
It seems that the library for gamepad support is literally unusable on platforms where window resizing is possible. To be more precise, this applies to all the declared supported platforms on pub.dev. Thank you, of course, for your efforts xd
No, this only applies to windows.
Happy to look at this if no one else does so first, but it will be after I complete an implementation for Android that conforms to the current platform interface.