Commit Graph

3212 Commits

Author SHA1 Message Date
retro-wertz bd5ba43122 Cleanup: Remove previous core option struct and unused variables etc 2019-07-18 19:34:20 +08:00
retro-wertz aac30c72d3 Add GB Color Correction core option 2019-07-18 18:07:00 +08:00
retro-wertz 02a7a48bf3 GB: Fix selected palette not applied when loading content...
- Prevent GB type hardware change during runtime.
2019-07-18 17:35:54 +08:00
hizzlekizzle 8462ca76ca
Merge pull request #59 from retro-wertz/gb
a few gb updates
2019-07-17 23:24:47 -05:00
retro-wertz 1fa78e69c5 Fix android build 2019-07-18 11:57:42 +08:00
retro-wertz 6dcf016d20 GB: Allow support for colorizer patched games
- a new core option is provided since enabling this support
means allowing invalid access to vram and palette
- works in GBC/GBA hardware mode only
2019-07-18 10:41:59 +08:00
retro-wertz 85bd86cf5f GB: Send LCD interrupt only if there is no INT 48h signal
- Fixes Speedy Gonzales status bar in GB emulated hardware type.
2019-07-18 08:31:33 +08:00
hizzlekizzle b147e9129f
Merge pull request #57 from retro-wertz/sync
update
2019-07-17 14:45:00 -05:00
retro-wertz d808297bc6 Fix crash caused by incorrect variable index for analog sticks 2019-07-18 01:02:17 +08:00
retro-wertz 7e8828986e libretro: Add core option sublabels 2019-07-18 00:56:58 +08:00
Rafael Kitover ce11403b4e
builder: updates for mingw
Bump libgpg-error 1.27 -> 1.36 and add a patch to support gawk 5.0 from
gentoo.

Add meson to list of msys2 OS deps, this is not needed right now.

Remove glib `CreateFile` patch which has been removed from msys2
MINGW-packages master and add a couple of other patches.

Unfortunately using a newer glib release is not yet possible because of
weird linking errors with meson on mingw.

Add ninja to `host_dists` for `mingw.sh`, this is not needed currently.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-17 15:28:36 +00:00
retro-wertz c5e6a3409a Libretro: Update GBC memory map 2019-07-16 22:51:07 +08:00
Rafael Kitover fa45ccdfcd
builder: fix command(), update c2man url
Rewrite the `/bin/sh -c command` construct in `command()` correctly.

Update c2man url to the github mirror because it's dead.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-16 11:29:04 +00:00
Rafael Kitover e64b990415
builder: fix msys2
msys2 does not `/bin/command` or `/usr/bin/command`, check for these and
fall back to `/bin/sh -c "command $*"`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-16 00:48:18 +00:00
Rafael Kitover 5802207829
builder: make zip + sig on win + minor changes
Pass command-line arguments to `build_project()` for use in the cmake
command.

Make `$PROJECT_ARGS` override `$CMAKE_BASE_ARGS` for the project.

Override `command()` to call `/bin/command` to avoid the bash builtin
which has undesirable behavior when overriding commands.

Override `gpg` to invoke either the `gpg` or the `gpg2` binary,
whichever is available, or print a warning that gpg is not available.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-11 20:18:21 -04:00
Rafael Kitover 296255d492
handle SDL joystick query errors #451
SDL APIs like `SDL_JoystickNumAxes(dev)` can return a negative error
code. Handle this case better.

This should fix the fatal exception from trying to allocate an array
with an illegal size (negative, due to the error.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-11 21:25:51 +00:00
Rafael Kitover 95658f57fc
transifex sync
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 22:37:16 +00:00
Rafael Kitover 86c4dc7d3c
transifex sync
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 15:22:54 +00:00
Rafael Kitover bcc8b54096
transifex sync
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 04:50:39 +00:00
Edênis Freindorfer Azevedo 7569242f77 Fix pause behaviour with `Pause when inactive`.
If the user pauses with the keybinding or the menu `Emulation` > `Pause`
while `Pause when inactive` is enabled, the game should not unpause when
the window receives focus again. It should wait for the user to trigger
the manual unpause.

- Fix #460.
2019-07-04 04:42:32 +00:00
Edênis Freindorfer Azevedo 030740ee34 Fix some memory leak. 2019-07-04 04:41:26 +00:00
Edênis Freindorfer Azevedo 8ea607e1c7 remove translation from joystick keys
Avoid issues with translation, at least for now,
by not translating joystick button/axis names.
2019-07-04 04:26:48 +00:00
Rafael Kitover cec32a61cc
travis: mac: disable --help check, it segfaults
Disable the binary `--help` sanity check on mac because it is currently
segfaulting.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 04:08:42 +00:00
Rafael Kitover f54dd25bb8
travis: fix gettext on mac + brew
cmake cannot find gettext, force link the gettext brew.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-04 03:51:00 +00:00
Rafael Kitover e2f06210e0
update Visual Studio support
Replace the vcpkg code with a newer and better version. In this version
the `vcpkg` directory is on the same level as the source directory, so
that IntelliSense does not get confused scanning for files.

The cmake variable `VCPKG_TARGET_TRIPLET` is required to activate vcpkg
support, it must be set to e.g. `x64-windows` or `x86-windows`.

Update `CMakeSettings.json` for the new code for the GUI.

Fix a problem copying the `SDL2.dll` file to the binary directory.

Update `README.md` with commandline instructions.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-03 23:28:48 +00:00
Edênis Freindorfer Azevedo 91501becf6 Fix small memory leak. 2019-07-03 19:25:11 +00:00
Edênis Freindorfer Azevedo c366907f64 Temporary fix for #65.
It looks like that when we use the `Simple` output module, we get
weird errors when trying to load state for any game, most likely due to
memory corruption. AFAIK, it seems the frame buffer is not large enough
to render all components.

This issues does not appear when using OpenGL, or using the Simple with
any display filter available.
2019-07-03 19:25:11 +00:00
Rafael Kitover d585a61049
followup on kbd trans issues fix in 30b92724
Use the table to to replace both the translated string and the English
string.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-03 02:17:13 +00:00
Rafael Kitover eaf1ad2429
Merge remote-tracking branch 'vbam-libretro/master' 2019-07-01 08:00:30 +00:00
Rafael Kitover 30b9272412
hopefully fix kbd control translation issues
Add missing gettext calls for the game controls code.

Seems to work correctly in the Russian locale with special keys.

Also add CLion files to `.gitignore`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-07-01 07:53:23 +00:00
Edênis Freindorfer Azevedo 90b3f35408 Add hotkeys for changing sizes (1x ... 6x).
Use a accelerator to quickly provide a way to change to/from multipliers
of the original size.

- Fix #415.
2019-06-29 14:04:04 +00:00
Edênis Freindorfer Azevedo fa77010f23 Fix pause toggle keybinding when unmuting.
We use the same event for both keybinding and `Emulation` > `Pause`
actions. The issue here is that the menu item is checkable, meaning
that you toggle its value and then run the handler.

The handler checks the value of the menu item `Emulation` > `Pause`,
and toggle the game pause accordingly. Such thing does not happen when
using the keybinding. Hence, it did not toggle the pause as expected.

- Related to #454.
2019-06-29 14:01:21 +00:00
Twinaphex 8cb420030f
Merge pull request #56 from webgeek1234/master
Android updates
2019-06-27 13:15:33 +02:00
Edênis Freindorfer Azevedo 8b8efa1b2d fix key shortcuts for save/load states
* Fix key shortcuts for save/load states.

We show the wrong description for these shortcuts, although it works
correctly for the keybinding.

* Use the proper labels for save/load states.
2019-06-26 02:30:31 +00:00
Rafael Kitover 9fa20b49ca
joystick cleanups #444
Check that SDL reports any available controls for a joystick, otherwise
mark it invalid and close it.

When processing events for joysticks, check that each one is valid.

Set initial value of controls to zero initially not after getting the
initial state, previously we were getting the initial state and
overwriting it with zeroes, defeating the purpose.

Fix memory leak, `curval` array of controls not being cleared.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-06-24 20:36:21 +00:00
Rafael Kitover 684b1bb7aa
fix mem error for config global `homeDir`
Fix `homeDir` `ConfigManager` global pointing to freed memory.

Thanks to @FredericHamel for catching this.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-06-23 20:08:23 +00:00
Edênis Freindorfer Azevedo ccc91fa04b quick fix for unicode filenames on windows 2019-06-23 10:59:13 +00:00
Edênis Freindorfer Azevedo dfa4fec3d5 Fix missing shortcuts from key bindings.
Correct set WXK_NUMPAD_{ADD,SUBTRACT} for default volume controls and
enable users to change it via menu "Options > Key Shortcuts".

Also allow users to use both these buttons for other input.
2019-06-23 10:50:52 +00:00
Edênis Freindorfer Azevedo 69b581f7e5 Handle key{bindings,shortcuts} correctly on frame.
Some keybindings were not handled by the frame. That includes some
wxAcceleratorEntry keys. On Linux, if you set a key shortcut using a key
with no modifier ("U" for "Input > Configure"), pressing the key would
not lead to anything.

This is very likely related to wxGTK, although it is not possible to
confirm this at the moment.
2019-06-23 10:50:52 +00:00
Edênis Freindorfer Azevedo cec1dbfd36 Split configuration for default keys.
Split for keyboard and joystick with two arrays variables for
refactoring purposes.
2019-06-23 10:50:52 +00:00
Edênis Freindorfer Azevedo d655031a8f Fix removing multiple system keys shortcuts.
Whenever users try to remove the system keys shortcuts, the
configuration file is overwritten and only records the last erase.

For example, if we wish to remove all the auto{A,B,L,R} keys at once,
we get the following writes on the configuration file:

NOOP=ALT+1,ALT+2,ALT+3,ALT+4
NOOP=ALT+2,ALT+3,ALT+4
NOOP=ALT+3,ALT+4
NOOP=ALT+4

Only `NOOP=ALT+4` stays for the following execution.
2019-06-23 10:50:52 +00:00
Edênis Freindorfer Azevedo 996d5b9df8 Do not set these options on `MainMenu.xrc`.
We already set the default values on `opts.cpp`, therefore these
values are not needed here.
2019-06-23 10:50:52 +00:00
Edênis Freindorfer Azevedo 019ab5a7e1 Fix "Joybus host invalid; disabling" warning.
Whenever there is a link connection for GBA, we check if "GBA/LinkHost"
is an empty string. If it is, we send this warning. This is unnecessary
because most connections are assumed to be for localhost, otherwise the
user would set a server ip address and not see this warning.
2019-06-23 10:07:24 +00:00
Edênis Freindorfer Azevedo f6bfe67632 Have better support for maximized window.
Currently, if we maximize the window, our windowPosition{X,Y} become 0.
When reopening the app, we have a window with the same size of a
maximized, but without this property toggled on. This is not intuitive
for users, since it is expected to have the last non-maximized size
to be restored.
2019-06-23 10:04:37 +00:00
Edênis Freindorfer Azevedo dcc0afa0d4 Fix window size when {en,dis}abling status bar.
If the status bar option is enabled or disabled, there is a trigger that
resizes the current window geometry to its zoom configuration. What
should happen instead is the size remain the same.
2019-06-23 10:04:37 +00:00
Edênis Freindorfer Azevedo bf6f2d4ac2 Change where the config dir is created.
On Windows, if there is a `vbam.ini` where the exe is, we should not
create the configuration directory `%LOCALAPPDATA%\visualboyadvance-m`.
2019-05-31 00:42:08 -07:00
Rafael Kitover 3490620e0f
travis: use Mac OS 10.14 and Xcode 10.2.1
The default Mac OS environment on travis no longer has brew bottle
support, so jobs time out.

Add the `osx_image` key to specify Mac OS 10.14 and Xcode 10.2.1.

Also try to re-enable link support using SFML.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-05-29 23:26:46 +00:00
Edênis Freindorfer Azevedo b0ec84693e fix stuck keys on ubuntu and on focus loss #142
In the `OnKeyDown` event handler, check if the key is actually pressed
using `wxGetKeyState()`, because for some reason on Ubuntu 18
spurious events are generated when the key is not actually pressed.

Also, if a game is paused by the frontend while a key is being pressed,
the key will remain active for the game when unpaused. This is an
issue because the key will likely be released outside of the game zone;
therefore, we would not process the key release for the game itself.

The same bug happens if clicking outside of the game zone while
holding a key.

For the case of a directional key, this means a continuous movement
in the direction of the key pressed before the pause until the key
is pressed and released.
2019-05-29 12:08:18 -07:00
Edênis Freindorfer Azevedo 3d57750c16
Follow-up work on #142.
Joysticks have their own set of {KEY,MOD,JOY}, what means that setting
everything for MOD=0 is a mistake. We need to deal only with keyboard
mappings here.
2019-05-23 20:04:18 -03:00
Aaron Kling 055b7c4d49 libretro: jni: Switch to clang compiler in preparation for ndk r20 2019-05-23 15:29:16 -05:00