Commit Graph

2249 Commits

Author SHA1 Message Date
Rafael Kitover 1401573f52
release v2.1.3
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-17 17:23:23 +00:00
Rafael Kitover ac35e37ca0
fix game geometry on windows
Previously when working on Visual Studio support I noticed an XRC error
dialog when adding the game area to the BoxSizer.

I tried removing the wxEXPAND flag with insufficient testing, the flag
is actually necessary.

The error is actually an incorrect debug assertion that is present in
3.1.2 and later fixed in master. The assertion is not triggered when
the project is built in release mode.

Remove the windows conditional code that removes the wxEXPAND flag.

TODO: silence assertion in debug mode or patch the wxWidgets vcpkg port.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-17 13:38:29 +00:00
Rafael Kitover 9fa544d1bb
cmake: wxWidgets Release config for visual studio
Fix the cmake code that sets up wxWidgets when using vcpkg with Visual
Studio so that the Release configuration also works. Use variables
instead of an if statement.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-17 13:15:13 +00:00
Rafael Kitover 3cacb363a6
libretro: put " " between version and git sha
To make the version string consistent with other cores, make it of the
form "<VER> <SHORT-SHA>" with a space in-between.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 15:51:30 +00:00
Rafael Kitover c2656f1375
libretro: remove "-" between version and git sha
To make the libretro core consistent with other cores, remove the "-"
between the version and the git short sha for git builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 15:46:32 +00:00
Rafael Kitover 4203bb53f2
libretro: set version with git sha
Read version from `CHANGELOG.md` and append the short git sha if not on
the released commit.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 14:13:22 +00:00
Rafael Kitover 8abbb070e8
cmake: use Win32Deps when mingw cross compiling
So that dependencies submodule is cloned.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 13:07:51 +00:00
Rafael Kitover ffc9309253
builder: freetype 2.9.1 -> 2.10.0, verbose make
make project with `VERBOSE=1`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 13:05:43 +00:00
Wes Smith b6bb24e016
Merge pull request #1 from libretro/master
Rebase
2019-04-15 22:27:52 -04:00
Rafael Kitover d08dd6cd18
builder: opensuse update 2
Install python3 in cross deps and call glib configure with the path to
it.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-16 00:08:45 +00:00
Rafael Kitover 9b38a38428
builder: updates for opensuse, refactor cross deps
Move linux distribution detection into `detect_os()` in the core.

The appropriate routine is then called with eval.

Move linux deps installation (for fedora previously) from
`linux-cross-builder` to `mingw-cross.sh` using the `linux_distribution`
variable set by `detect_os()`.

Add a routine to install suse cross dependencies as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-15 23:38:26 +00:00
Rafael Kitover d28fd302aa
cmake: only link SetupAPI on win32 if it's found
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-15 13:11:00 +00:00
Rafael Kitover af63a1194f
cmake: add -lSetupAPI to SDL2 libs for win32
Fix for undefined reference errors linking for msys2 mingw build using
the scripts.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-15 03:28:18 +00:00
Rafael Kitover 04c77a267f
update win32 dependencies submodule
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-14 01:18:37 +00:00
Rafael Kitover 5dfb36ad84
remove .clang-format, update .travis.yml
Remove .clang-format as it causes some people's editors to do
unnecessary reformatting automatically.

Add binary `--help` check to travis build steps.

Add `-DENABLE_SDL=ON -DENABLE_OPENAL=ON` to cmake options for all travis
jobs.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-13 23:18:57 +00:00
Rafael Kitover ed16d625e3
add unistd.h compat header for visual studio
Using:

https://stackoverflow.com/a/826027/262458

Revert 5019a201.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-13 22:50:05 +00:00
Zach Bacon 5019a20165
[SDL Front] MSVC doesn't have an unistd.h system file, closest is io.h, this will fix building the SDL frontend with msvc again. 2019-04-10 17:27:45 -04:00
Edênis Freindorfer Azevedo 2ae72f38cd fix starting game pos and geometry #406
Fix display when loading ROMs with custom geometry.

This issue was a combination of `wxSHAPED` and its effect on the custom
geometry. It is necessary to force a dummy resize so the display adjusts
itself.

Align game frame on center, both horizontal and vertical.
2019-04-09 15:49:13 +00:00
Rafael Kitover 2beb561838
cmake: move wx funcs and macros into separate file
In 2097b5aa I added a function that is used both in the non-vcpkg block
and outside of it, but the function was defined in the non-vcpkg block,
and this broke the visual studio build.

Move functions and macros into an include file so that they are globally
available.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-09 02:04:50 +00:00
Rafael Kitover 468fe26678
fix lang in changelog, add bios to issue template
Fix changelog for last release being generated in the russian locale.

Ask users in the issue template what bios they are using, because this
can affect things like link.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-06 20:26:08 +00:00
Rafael Kitover 95433f6caa
release v2.1.2
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-06 19:01:14 +00:00
retro-wertz 5012969a59 Bump version to 2.1.1 2019-04-06 20:11:14 +02:00
retro-wertz 755f476799 Fix #52 2019-04-06 20:11:13 +02:00
Rafael Kitover 5b9d1a7174
cmake: improve finding wx utils
Clear the `find_program()` cache variable before each use.

On win32 prefer unqualified utility executables.

Add special handling for msys2, where wx-config is a shell script that
cannot be directly run from native cmake.

This is a followup on 2097b5aa.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-06 01:37:02 +00:00
Rafael Kitover 836b74a162
remove DOS line-ends from src/wx/xrc/*.xrc
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-04 19:21:20 +00:00
Rafael Kitover 49205bf28a
remove unused "multithread filter" menu item
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-04 19:20:20 +00:00
Edênis Freindorfer Azevedo 331d9d331c Fix compilation warnings for MacOS build. 2019-04-04 18:01:05 -01:00
Edênis Freindorfer Azevedo 5540790ff1
fix some compilation warnings
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Merged #396
2019-04-03 17:32:25 +00:00
Edênis Freindorfer Azevedo d919728138 Fix for resizing window geometry when loading games. 2019-04-03 11:51:56 +00:00
Rafael Kitover 64a9c0945f
fix analog stick regression from e57beed8 #400
Instead of ignoring the initial state of axes, which I did to make
triggers work on the 360 controller, set the initial previous value to
the initial state instead.

This fixes the original problem without breaking analog stick movement.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-01 09:38:51 -07:00
Rafael Kitover 0f0d2400bc
more specific check for 3.1.2 xrc error
The `wxEXPAND` flag is necessary for the game area in wxWidgets 3.0 and
earlier, it may be necessary in 3.1.2 as well, but it throws an xrc
error, so we check for windows and at least 3.1.2 to test for the visual
studio and vcpkg environment to avoid the xrc error.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-01 09:28:19 -07:00
Rafael Kitover d9a7df6105
fix if statement in SDL sound driver #396
@denisfa found this due to a warning, this should improve the
functionality of the SDL sound driver.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-01 08:42:52 -07:00
Rafael Kitover 41ee35f22e
add *.dll to .gitignore
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-04-01 08:42:18 -07:00
Rafael Kitover 6ec46678c5
installdeps: centos: do not install wx 2.8
Do not install the wxGTK-devel package on centos, as the wxGTK3-devel
package does come with a wxrc named wxrc-3.0.

This is a followup on 2097b5aa.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-28 22:20:16 +00:00
Rafael Kitover 2097b5aaa5
wx 2.8 compat fixes, centos support, cmake fixes
Add support for RHEL/centos to installdeps. There is no SFML package.

Add some string compatibility stuff so that everything builds on wx 2.8
unicode builds.

TODO: add travis slaves for 2.8, with and without unicode

Disable the game frame spacer code on 2.8 because it does not work (the
frame does not expand.)

cmake improvements:

- set ENABLE_LTO=OFF for Debug builds by default

- set ENABLE_LINK=OFF if SFML cannot be found and continue

- use better logic for finding wx utilities wx-config and wxrc

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Closes #395
Closes #297
2019-03-28 21:45:06 +00:00
Rafael Kitover b69fced749
cmake: refactor, better clang support
Do some reformatting towards the more modern cmake style.

Clean up some code.

Support linking to gcc compiled wxWidgets by setting
`-D__GXX_ABI_VERSION=` appropriately for clang.

Use the new method of calling `FindwxWidgets.cmake`, the old method
causes some problems now.

Set all necessary policies in both cmake files.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-27 03:25:43 +00:00
Rafael Kitover 7fb27c4df9
cmake: check for broken LTO
When using LTO with gcc or clang, try to compile and link something to
make sure it works, and disable it if it doesn't.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-26 14:49:48 +00:00
Rafael Kitover f2e9dc5530
cmake: check for policy CMP0077 existence
Check `if(POLICY CMP0077)` before trying to set it, because setting a
policy a version of cmake does not know about is an error.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-26 13:40:35 +00:00
Rafael Kitover ae38a70d1e
cmake: gcc/clang colors with ninja, fix warnings
Ninja requires `-fdiagnostics-color=always` instead of
`-fdiagnostics-color=auto` with gcc because it pipes output from the
compiler unlike regular makes.

Use `-fcolor-diagnostics` for clang, which also works correctly with
ninja to show colors.

Information for this taken from here:

https://medium.com/@alasher/colored-c-compiler-output-with-ninja-clang-gcc-10bfe7f2b949

Set all cmake policies in both the root `CMakeLists.txt` and
`src/wx/CMakeLists.txt` to silence warnings about unset policies from
cmake.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-26 00:35:23 +00:00
Rafael Kitover 23fe13d8fb
cmake: fix syntax error in Win32Deps.cmake
In a construct such as:

```cmake
if($ENV{FOO} MATCHES bar)
...
endif()
```

if the environment variable is not set, the if statement becomes a
syntax error because there is nothing being compared.

Fix this by quoting the environment variable like so:

```cmake
if("$ENV{FOO}" MATCHES bar)
...
endif()
```

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-23 08:22:57 -07:00
Rafael Kitover 59e9c69097
reset Xorg screensaver on joy events
Use the libXss Xorg screensaver extension library to call
`XResetScreenSaver()` on joystick events to inhibit screen blanking when
for whatever reason the joystick driver or DE (xboxdrv and KDE in this
case) does not do this.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-22 11:30:31 -07:00
Rafael Kitover a0283eadb6
fix game panel size on wxGTK #325
On wxWidgets 3.1.2, which is what vcpkg uses (and we use vcpkg for
Visual Studio) the wxEXPAND flag for the game area in the sizer throws
an XRC error dialog, removing the flag works correctly on Windows, but
not on wxGTK.

As a workaround, do not use the wxEXPAND flag on Windows.

TODO: with max zoom set, the game area is not centered vertically in
wxGTK.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-22 11:24:56 -07:00
Rafael Kitover f1ecd7c322
auto deps for visual studio, take 1
Use vcpkg to build deps when Visual Studio on Windows is detected, this
only happens on first build, but does take a while because things like
wxWidgets need to be built. Building from the developer command line is
also supported.

I considered making a pre-built tarball available, but the resulting
files are just too big for this to be practical.

Make the necessary cmake code changes for this to work and to use the
vcpkg packages, which work just like on linux or have other cmake glue
code available.

To do this, we make vcpkg a submodule, use git to checkout all
submodules, then just build and use the `vcpkg.exe`. Then we set the
CMAKE_TOOLCHAIN_FILE to the vcpkg toolchain and also include it
directly, why this is necessary I don't know, without it it doesn't work
in the IDE but does on the command line.

All of this requires no vcpkg integration with either the user or the
project. A user-wide `ENV{VCPKG_ROOT}` is also supported.

Fix the dynamic arrays in the GBA core, MSVC follows the C++ standard on
this and gcc does not.

TODO: add the necessary gcc flags to make this an error in cmake.

Use `wxArrayString` instead of `std::vector<wxString>` in
`src/wx/strutils.cpp` which is used in options parsing. This was
necessary because of a bizarre linker error with wxWidgets when using
Visual Studio:

https://trac.wxwidgets.org/ticket/10884#comment:46

In `src/wx/panel.cpp` make sure the unimplemented D3D renderer code does
not get compiled if it's actually `OFF`.

Also fix the new spacer code for the drawing panel to not combine
`wxEXPAND` with `wxALIGN_CENTER`, which is an error on wxWidgets 3.1.2,
which is what vcpkg uses. The drawing panel seems to be automatically
stretched to the max size automatically anyway.

TODO: if all of this works, we'll need an Appveyor set up for visual
studio.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-21 16:01:46 -07:00
Rafael Kitover 3da07f4083
detect llvm toolchain utilities #392
Use `clang -print-prog-path=<tool>` to find the locations of llvm
toolchain utilities such as `llvm-ranlib` and set the appropriate cmake
variables to the resultant paths.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-19 18:41:25 -07:00
Edênis Freindorfer Azevedo c714ff825a fix problems of command line parameters
* Fix return code for wrong command line parameters.

* Update return code for incorrect command line option on WX port.
2019-03-18 20:38:42 -07:00
Edênis Freindorfer Azevedo a1f0c34ace XDG followup work #94
* Apply save order for save states and batteries.
The order for save state/battery:
1. StateDir / BatteryDir;
2. The path of the current loaded game;
3. XDG Base Dir fallback.

* Use XDG Base Dir fallback to save screenshots and recordings.

* Apply search order for all dirs except recording (not implemented yet) of SDL port.
The order for battery/save state/screenshot is:
1. StateDir/BatteryDir/ScreenshotDir;
2. The path of the current loaded game;
3. XDG Base Dir (or equivalent) fallback.

* Refactor code.

* Fix freeing and setting pointer to NULL of SDL port.
2019-03-18 01:08:53 -07:00
Rafael Kitover 2142a46dd5
Revert "travis: try re-enabling binary check"
This reverts commit 101fac5910.

Both ubuntu and mac jobs timeout when trying to call `--help`.
2019-03-16 03:45:36 -07:00
Rafael Kitover 101fac5910
travis: try re-enabling binary sanity check
On the ubuntu and mac jobs, try re-enabling the `--help` check, it
should now work thanks to @denisfa's work on a57e51f6.

If this works we also want to use wine for the mingw jobs to do the
same.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-15 19:26:16 -07:00
Rafael Kitover 6ca59412a8
travis: disable mxe pkg key
The mxe package server key has been removed from the keyservers, allow
apt-key to fail and add `--allow-unauthenticated` to the apt-get
options.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-03-15 04:44:45 -07:00
Edênis Freindorfer Azevedo a57e51f699 Return non-error code for given command line parameters. 2019-03-14 16:17:45 -07:00