gamepads icon indicating copy to clipboard operation
gamepads copied to clipboard

[Windows] Plugin blocks window resizing

Open Dudlileif opened this issue 1 year ago • 17 comments

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 the pubspec.yaml of any Flutter project, or just use the example 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.

Dudlileif avatar Jun 05 '23 17:06 Dudlileif

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.

chengwei88888 avatar Oct 19 '23 09:10 chengwei88888

Hello, how did you solve this problem

chengwei88888 avatar Oct 20 '23 06:10 chengwei88888

Hello, how did you solve this problem

I have not solved it directly, but you can use win32_gamepad for the time being.

Dudlileif avatar Oct 20 '23 06:10 Dudlileif

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

chengwei88888 avatar Oct 20 '23 07:10 chengwei88888

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.

chengwei88888 avatar Oct 20 '23 07:10 chengwei88888

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 avatar Oct 20 '23 08:10 chengwei88888

@chengwei88888 please only post things related to the bug mentioned in the title of the issue

spydon avatar Oct 24 '23 22:10 spydon

image

spydon avatar Oct 24 '23 22:10 spydon

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.

panthuncia avatar Oct 24 '23 23:10 panthuncia

图像

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

chengwei88888 avatar Oct 25 '23 01:10 chengwei88888

Why didn't the developers solve all the questions raised?

chengwei88888 avatar Oct 25 '23 05:10 chengwei88888

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.

spydon avatar Oct 25 '23 12:10 spydon

Any solution ?

hgadjan avatar Jan 21 '24 09:01 hgadjan

Any solution ?

Unfortunately not, I think the whole windows part needs to be migrated to a newer API for it to work properly.

spydon avatar Jan 30 '24 21:01 spydon

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

sanyabeast avatar Apr 18 '24 15:04 sanyabeast

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.

spydon avatar Apr 18 '24 16:04 spydon

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.

markvideon avatar May 03 '24 02:05 markvideon