Giter VIP home page Giter VIP logo

Comments (5)

cursey avatar cursey commented on September 17, 2024

Yeah sorry that error it gives isn't very useful. Here's a tip. The line number shown by the error is accurate for non-coalesced scripts if you subtract the # of lines in Defaults.js + 4. So real line number = reported line number - # of lines in Defaults.js - 4. The 4 isn't some random magic number either, kanan.py prepends 4 variables before Defaults.js (debug, testing, verbose and path).

Anyway, the problem you're having is because there are two versions of SystemParametersInfo. An ANSI version called SystemParametersInfoA and a Unicode version called SystemParametersInfoW. You can find this information near the bottom of Microsoft's documentation on the function.

I also prefer your way of doing it over it taking the entire screen, so I've gone ahead and made it the default behavior of BorderlessWindowedMode.js. Hope you are alright with that.

from kanan.

Warsen avatar Warsen commented on September 17, 2024

Hey thanks, It works shockingly better than I expected, I thought maybe there would be a border problem somewhere and yet here it worked.

I recommend that you use all 4 integers of the rectangle to set the new window position because it's possible for an end user to unlock their task bar and drag it to one of the other 3 sides of their display. I tried this out on Windows 10, I right clicked task bar, unchecked "Lock the taskbar", left clicked and dragged it to the top of the screen where it snapped to the top. then when I run the game with your patcher, the game windowis positioned itself over the taskbar (and the entire display to my surprise, I expected a taskbar-shaped empty space below but it didn't happen).

It's not a big deal. I personally would never do something ridiculous such as resize or move my task bar, but a prior Linux user might. Using 'left' and 'top' instead of 0, 0 would be an improvement.

from kanan.

cursey avatar cursey commented on September 17, 2024

Oh, good point!

from kanan.

Warsen avatar Warsen commented on September 17, 2024

Oh. I realized why there wasn't an empty space underneath the game window in my scenario. right and bottom are absolute positions, you'll want the parameters to be
x = left
y = top
width = right - left
height = bottom - top

from kanan.

cursey avatar cursey commented on September 17, 2024

Should work fine now.

from kanan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.