AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

Resize WSA window instead of ADB resolution change

Open Radiant-Xyz opened this issue 3 years ago • 0 comments

I've written a very dirty fix with borrowed code from another python application, so... I guess I'll call it proof-of-concept for now? I'm not familiar with the project or python, but I wanted to test my idea out. It probably introduces an issue as well. If you're interested anyway, here's what I've done:

  1. Removed the resizing using ADB commands
  2. Added (borrowed) code to resize the window, reposition it and make it borderless
  3. Set _screen_size_checked to true in order to let the program run normally from there
  4. Added code to trim screenshots to the desired 1280x720 if self.config.Emulator_Serial is "wsa-0"

The result is that ALAS works normally. It recognizes the UI and interacts with it as usual.

I've used this project as the source of the code responsible for resizing the window and make it borderless: https://github.com/banzify/Borderless-Window-Utility The project does not clearly state any license. Therefore I'm not sure if the code can be used just like this.

Radiant-Xyz avatar Aug 22 '22 23:08 Radiant-Xyz