Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Plugin blocks window resizing #3

Open
Dudlileif opened this issue Jun 5, 2023 · 17 comments
Open

[Windows] Plugin blocks window resizing #3

Dudlileif opened this issue Jun 5, 2023 · 17 comments
Labels
bug Something isn't working help wanted Extra attention is needed windows Relates to gamepads_windows

Comments

@Dudlileif
Copy link

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.

@chengwei88888
Copy link

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
Copy link

chengwei88888 commented Oct 20, 2023

Hello, how did you solve this problem

@Dudlileif
Copy link
Author

Dudlileif commented Oct 20, 2023

Hello, how did you solve this problem

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

@chengwei88888
Copy link

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
Copy link

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
Copy link

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

@spydon
Copy link
Member

spydon commented Oct 24, 2023

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

@spydon
Copy link
Member

spydon commented Oct 24, 2023

image

@panthuncia
Copy link

panthuncia commented Oct 24, 2023

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.

@chengwei88888
Copy link

图像

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
Copy link

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

@flame-engine flame-engine deleted a comment from chengwei88888 Oct 25, 2023
@spydon
Copy link
Member

spydon commented Oct 25, 2023

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.

@hgadjan
Copy link

hgadjan commented Jan 21, 2024

Any solution ?

@spydon
Copy link
Member

spydon commented Jan 30, 2024

Any solution ?

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

@sanyabeast
Copy link

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

@spydon
Copy link
Member

spydon commented Apr 18, 2024

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 spydon added the help wanted Extra attention is needed label May 2, 2024
@markvideon
Copy link
Collaborator

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 markvideon added bug Something isn't working windows Relates to gamepads_windows labels Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed windows Relates to gamepads_windows
Projects
None yet
Development

No branches or pull requests

7 participants