Before this fix, Win32API is used to get the current monitor. This
might not work and return an unexpected monitor on some machines after
the runloop starts.
Instead, use the current window to get the current monitor correctly
instead of the Win32APIs. To get the initial monitor, the API
ForegroundWindow is still used.
Updates #1584
Updates #1844
FPS was unstable on fullscreen mode i.e., when the view size is the
same as the monitor size.
By using a little different size view, FPS becomes stable.
Updates #1745
This is a breaking change. On macOS, `SetFullscreen` creates a new
independent space and maximize the size of the window there.
Updates #1506Closes#1579
We now set deviceScale to always the mapping from logical window system pixels
to device independent pixels (which is what Ebiten API users expect), and
introduce a new concept of videoModeScale that maps from video mode to logical
window system pixels.
videoModeScale is now only used for computing full-screen resolutions, while
deviceScale is used for any other conversion.
Fixes window sizes on X11, should be a NOP otherwise.
Closes#1774.
This should fix fullscreen mode on Linux/X11 systems in general,
while not affecting other systems.
Note that this deletes a bunch of OS X specific and Windows specific code,
as GLFW already provides this functionality.
This change is not expected to cause regressions, however,
the current behavior is still wrong and leads to wrong/unintended window sizes.
To be fixed in further PRs.
Updates #1774
This is basically a revert of 93a156a718.
This implements parsing the SDL gamepad mappings by Ebiten instead
of GLFW, so that Ebiten can handle parsing errors completely.
Closes#1802
This is only supported on desktops yet (on mobile standard layout isn't
implemented yet, and on the web this is the browser's responsibility).
Closes#1723
This change introduces the standard gamepad layout. This changes adds
these APIs:
* func HasGamepadStandardLayoutMapping
* func IsGamepadStandardButtonPressed
* func GamepadStandardAxisValue
* type StandardGamepadButton
* type StandardGamepadAxis
The standard gamepad layout is based on the web standard. See
https://www.w3.org/TR/gamepad/#remapping.
On desktops, the SDL's gamecontrllerdb.txt is used. If the gamepad is
listed in the text file, the mapping works. GLFW's mapping featrue is
not used.
On browsers, the property of a gamepad 'mapping' is used. When the
mapping value is 'standard', the gamepad is recognized to have the
standard mapping.
On mobiles, the implementation is still WIP.
Updates #1557