Remove code that unconditionally resets RFU on Windows in General
Purpose mode, and instead remap two values necessary for Final Fantasy
Tactics Advance.
Thanks to @JackoboLeChocobo for this information.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a note at the top of the issue template asking users to test the
nightly or master before reporting an issue.
Add a note to the top of the README.md as well.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove the `find_package(unofficial-gettext ...)` invocation for vcpkg
as it is no longer required, the normal `find_package(Gettext ...)`
mechanism works.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Some allocators return a non-null pointer when calling *alloc with
zero size, that will segfault upon access. Check for the size parameter
before allocating anything to ensure that the breakpoint and trace
fields will stay null when size >> 3 or size >> 1 is zero.
This is a major refactor of the wxSDLJoy class.
* Move handling of SDL objects creation and destruction to its own
class. This simplifies the lifespan of SDL-related objects.
* Re-add handling of HATs. This is necessary for DirectInput
controllers.
* Rename the public API for wxSDLJoy to be clearer.
* Add documentation for every class related to wxSDLJoy.
Update and rewrite the Windows Native Development Environment section of
the developer manual.
Update list of Chocolatey packages and give Chocolatey usage notes.
Update terminal setup instructions.
Add sample PowerShell `$profile` and `.vimrc`.
Rewrite and streamline the short PowerShell tutorial.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Default to latest, which is bionic, for earlier repositories, match all
intermediate release code names.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
I'm not sure what purpose this currently serves but I know that it
breaks the build when CMAKE_PREFIX_PATH is set to something nontrivial.
Stop doing that.
Adjust compiler flags to use `-std=gnu++17` for gcc/clang instead of
`-std=gnu++11` and `/std:c++17` for msvc.
Remove Ubuntu trusty job from travis (it's too old.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Stop setting the 4 plane data pointers in recording audio frames to the
sample stream. This confuses the converter and makes it write the right
channel to both channels.
- Fix#723.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Prefer the `wx-config` from PATH on Gentoo, because that points to the
eselected wxWidgets build.
This is already done for Win32 builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Hopefully fix various bugs caused by not differentiating between SDL
joystick_index and SDL_JoystickID (the joystick instance id.)
On controller disconnect, disconnect and reconnect all configured
devices because the SDL joystick index may change, and this will update
the mapping.
Also fix creating a state entry for the configured joystick even when
it's not connected, add the controller/joystick name to the connected
message and increase the poll time from 10ms to 25ms.
- Fix#718.
- Fix#726.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Assume an archlinux-like distribution based on the existence of
`/usr/bin/pacman` as the last test.
- Fix#710.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Start the joystick polling timer on pause and stop it on resume, so that
accelerators bound to joystick events are still processed.
Followup on def5d3e4.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Followup on 7031c1d1, which for some reason removed the calls to stop
the timer when a game is loaded and restart it when it is unloaded.
Add the calls back.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove the `evthandler` member and `Attach()` method from `wxSDLJoy`.
Add the `GetJoyEventHandler()` method to `MainFrame`, which returns the
window in focus, or the panel if the option for joystick background
input is enabled.
Remove the handler parameter in `wxSDLJoy::CreateAndSendEvent()` and
call `wxGetApp().frame->GetJoyEventHandler()` to get the handler.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- Joystick background input.
Set as enabled by default.
- Linux: `X11` and `Wayland` done.
1. `Wayland` does not allow to listen for keypresses for security reasons.
Discussion here: https://github.com/albertlauncher/albert/issues/309
2. For `X11` we can use `XQueryKeymap` to check keyboard state.
- Windows: done.
We use `GetAsyncKeyState` most significant bit to check if the key
is being pressed.
Followup on ff03bcc1.
Running wxrc from the build directory turned out to be unnecessary,
because the dlls were not there anyway, and we added them to the PATH.
And using absolute paths for the xrc sources puts them into the gettext
pot comments which is not what we want.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This adds the command-line option `-c` or `--config` to specify a custom
configuration file.
Co-authored-by: Fabrice de Gans-Riberi <steelskin+github@gmail.com>
Do not link `SDL2main` on any WIN32, not just MSVC.
Define `WIN32_CONSOLE_APP` for Debug mode builds on any WIN32, not just
MSVC.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove generated files that are now written to the build dir instead.
Match any build directory from root.
Stop listing submodule and vcpkg.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix vcpkg upgrades to work with the current vcpkg master.
When upgrading zlib, remove all optional deps first, because everything
depends on zlib and this can overrun the appveyor 1hr time limit.
Make SFML an optional dep too, like ffmpeg.
Reduce the vcpkg install time limit to 20 minutes, otherwise it may try
to build wxWidgets and ffmpeg and overrun the 1hr time limit.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make sure git is part of the base package list for Win32 builds.
Move the `git submodule update` out of `check_cross()` and into the
Win32 build sections.
Allow it to fail, in case the user is not using a git clone, the cmake
checks will produce an error if the subtree does not exist.
This fixes the problem with the git submodule update failing because git
is not installed yet.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When doing a dynamic build, the wxWidgets dlls are needed by the wxrc
executable.
Invoke wxrc with the target triplet debug and release bin directory
prepended to the PATH, this is where the dlls are.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a function to check if libogg is installed but libvorbis isn't, this
means it failed to upgrade libvorbis because libogg wasn't upgraded to
the newest port revision supporting pkg-config, see:
https://github.com/microsoft/vcpkg/issues/13037
In this case, remove libogg recursively and allow the install action to
reinstall SFML and all deps.
This will also fix building link support on appveyor for the time being.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make `speedup_frame_skip` and `speedup_throttle` independent settings,
with `speedup_frame_skip == 0` when `speedup_throttle` is not in effect,
and `speedup_throttle == 100` when `speedup_frame_skip` is in effect.
This fixes a previously introduced bug where `speedup == true &&
speedup_frame_skip = X` was never enabled.
This also allows `speedup_throttle == 0` for no throttle and no frame
skip during speedup.
Also set the upper bound on `throttle` and `speedup_throttle` to `450`
instead of `600`, as the DirectSound driver does not support values
higher than that.
In the DirectSound implementation of `setThrottle`, for `throttle == 0`
use a `throttle == 450` frequency multiplier, because a zero frequency
does nothing.
- Fix#719.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The el_GR, Greek (Greece) translation is empty, while the el, Greek,
translation is 92% done.
Remove el_GR from git and from transifex.
- Fix#721.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Instead of just checking if the submodule has been cloned, always update
it when cmake runs if git is available.
This fixes the problem of users' dependencies submodule clone never
getting updated with new changes.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When the wxrc installed by vcpkg into tools was made with the non-static
wxWidgets, and the build is static, it will not find the wxWidgets dlls
and fail.
Use our own wxrc.exe from the dependencies submodule for the time being.
This is a temporary fix, a proper fix would be adding the dlls, if they
are installed, to the PATH.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>