u.toChangeSize affects the result of u.updateSize. When the callback
for WindowSetSize is invoked, toChangeSize should be true.
In order to simplify the logic, we have to remove toChangeSize later.
Closes#1884
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
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
IsWindowBeingClosed reports whether the window is being closed by
the user.
SetWindowClosingHandled sets whether the window closing is handled
or not. If the state is true, the window is not closed immediately
by the user and the game can handle the closing state. In this case,
the Update function should return an error in order to end the game.
This change also adds examples/windowclosing.
Closes#1574
Callbacks created by NewCallbackCDecl were never released and then
they are leaked, especially when the window size was changed by
SetWindowSize on Windows.
This change defines new callback ID types with uintptr, and reuse
the callbacks.
Closes#1672