Commit Graph

3077 Commits

Author SHA1 Message Date
Rafael Kitover da686a4827
Reinit panel on vsync toggle.
Destroy the DrawingPanel on vsync checkbox toggle so that it is
re-created with the vsync option in effect.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-21 21:43:13 +00:00
Rafael Kitover ec27885c36
Support EGL VSync on Wayland.
Add support for `eglSwapInterval()` to enable or disable VSync on
Wayland.

Also add status messages for enabling or disabling VSync, for both EGL
and GLX.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-21 19:19:28 +00:00
Rafael Kitover c27d384a53
Enable GL on Wayland for wx 3.2+, no vsync.
wxWidgets 3.2+ has experimental `wxGLCanvas` support for Wayland EGL,
enable it for those versions.

The `glXQueryExtensionsString()` method for enabling or disabling vsync
does not work on Wayland currently, so it's disabled.

TODO: Enable/disable vsync on Wayland EGL.

Fix #1028.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-21 17:24:46 +00:00
Rafael Kitover 75e46b7117
build: update macOS third_party_libs_tool from git
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-19 00:00:59 +00:00
Rafael Kitover c249115b7a
build: set -mtune=generic
Nach explained that this is the safest and best option.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-16 18:37:03 +00:00
Rafael Kitover d23b374fbf
ci: add basic macos-latest runner
Add basic macos-latest build to have one macOS runner.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-16 18:22:37 +00:00
Rafael Kitover 2985b46926
ci: add ubuntu-latest workflow
Add basic build on ubuntu-latest to have at least one ci build on Linux.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-16 14:18:13 +00:00
Adam Sampson 54b8192d30 Fix prototype for main.
A typo in 297d7c06c4 meant main had the
wrong prototype on non-Windows systems, breaking the build.
2022-10-16 13:08:25 +00:00
Rafael Kitover 927ccf0bc8
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-16 02:02:40 +00:00
Fabrice de Gans 8c1bd84f40 [config] Move VbamOption and wxGameControl to config namespace 2022-10-15 23:11:41 +00:00
Fabrice de Gans 297d7c06c4 [hidpi] Use wxWidgets 3.2 on Windows
* Remove the custom handling for pre-3.1.4 builds on Windows since
  both the mingw and msvc builds now use 3.2.
* Remove wxDPIChangedEvent handling, since this triggers a resize,
  which has the same effect.
* Implement main/WinMain ourselves, rather than relying on wxWidgets
  macros. This allows us to initialize the console earlier in the
  process.
* Add an explicit dependency on the manifest file to trigger a link
  when it is modified.
2022-10-15 22:25:54 +00:00
Fabrice de Gans 0d86432a31 [hidpi] Implement full HiDPI support
This converts the HiDPIAware into a series of helper functions, using
wxWidgets native support starting with wxWidgets 3.1.4. Custom
implementations are provided for Mac and Windows.

In addition, this fixes a few issues with the Windows build:
* Use the same defines variables in the MSVC and MinGW builds, with
  g++ and Clang.
* Add a custom manifest for the application, indicating full DPI
  support and support for recent Windows versions so the application
  will no longer run in compatibility mode by default.
* Manually spawn a console in debug builds if none is attached and
  always use the parent console if it is available otherwise, even in
  release builds. This also removes the /subsystem:console linker
  argument.
2022-10-15 22:25:54 +00:00
Fabrice de Gans 95337da558 [build] Add basic clang-cl support
XAudio2 is disabled because the included header needs to be updated to
be parseable by clang.
2022-10-15 22:25:34 +00:00
Rafael Kitover d6331ff92e
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-14 02:02:29 +00:00
Rafael Kitover 69a4061ab9
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-13 02:02:23 +00:00
Rafael Kitover 8f27869715
build: fix finding static vcpkg SDL2
The static lib is now called `SDL2-static.lib` and the debug version is
called `SDL2-staticd.lib`.

Adjust our `cmake/FindSDL2.cmake` for the new vcpkg naming convention.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-09 04:00:26 +00:00
LibretroAdmin 7e30b03889
Merge pull request #109 from negativeExponent/silence_bios_sign_compare_warnings
HLE: Fix sign-compare warnings
2022-10-07 10:59:16 +02:00
LibretroAdmin 09bb3c3acf Remove fallthrough - breaks Clang on Mac/iOS 2022-10-07 10:58:00 +02:00
LibretroAdmin 655cfb929d
Merge pull request #111 from negativeExponent/fix_warnings
Fix warnings and more cleanups
2022-10-07 10:57:48 +02:00
negativeExponent e2f3a64143 Cleanup more libretro-specific branches 2022-10-07 15:28:31 +08:00
negativeExponent 1c95df1212 Simplify save state handling
- size and version parameters are unused in the libretro implementation,
  so remove them
2022-10-07 14:46:29 +08:00
negativeExponent 3158b73d69 Wrap functions unused by LIBRETRO 2022-10-07 14:21:29 +08:00
LibretroAdmin 62671753a9
Merge pull request #108 from negativeExponent/fix_implicit-fallthrough
Fix implicit fallthrough and other warnings
2022-10-07 08:21:19 +02:00
LibretroAdmin cb3fc44789
Merge pull request #110 from negativeExponent/fix_missing_field_initializers
Fix missing-field-initializer warnings
2022-10-07 08:20:51 +02:00
negativeExponent ac2a56be7f Silence other warnings 2022-10-07 13:41:06 +08:00
negativeExponent ba2513b511 Fix missing break statements 2022-10-07 13:23:02 +08:00
negativeExponent 0594fa2a2c Silence implicit-fallthrough warnings
Used [[fallthrough]]; to mark affected areas. Such keyword should be
available since C++11
2022-10-07 13:21:49 +08:00
negativeExponent 9864dc2853 Fix missing-field-initializer warnings 2022-10-07 12:52:29 +08:00
negativeExponent 12f39b86b1 HLE: Fix sign-compare warnings 2022-10-07 12:34:32 +08:00
Rafael Kitover eed171aac0
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-02 02:02:17 +00:00
Rafael Kitover 603d6a3872
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-01 02:02:18 +00:00
Fabrice de Gans f8974d8870
Merge pull request #1012 from Ds886/fix-missing-header
* adds missing header to memgzio ("stdint")
2022-09-30 13:11:50 -07:00
Ds886 6be626d4c7 * adds missing header("stdint") 2022-09-30 22:56:58 +03:00
Rafael Kitover 8771172d19
build: silence cmake warning on macOS for Sparkle
Silence cmake policy set warning for FetchContent
DOWNLOAD_EXTRACT_TIMESTAMP by setting it to TRUE.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-29 23:04:27 +00:00
Rafael Kitover 85a95dcde0
build: macOS C++ compatibility fixes
Remove constexpr in user-input.h as LLVM 13 complains that it is
illegal.

Use variant-lite as nonstd::variant and related types as some variant
functions are macOS 10.14 Mojave only.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-29 22:34:59 +00:00
Rafael Kitover 343eafc477
build: add variant-lite as nonstd::variant
From:

https://github.com/martinmoene/variant-lite

. Needed for macOS build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-29 22:34:59 +00:00
Rafael Kitover 1425248072
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-29 02:02:19 +00:00
Rafael Kitover 4bdd3798f1
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-28 02:02:21 +00:00
LibretroAdmin 7c25d64d69
Merge pull request #106 from ds22x/master
Update to core options v2 interface
2022-09-28 00:02:59 +02:00
Fabrice de Gans 69d24fb53e [build][msvc] Fix debug information and set hidpi support
* Add /ZI compiler flag in Debug mode to get proper debug symbols.
* Specify hidpi support in the app manifest.
2022-09-27 01:25:20 +00:00
Fabrice de Gans b027e64753 [config] Move wxUserInput to the config namespace
* Remove the wx prefix and make UserInput a class in the config
  namespace.
* Make UserInput constexpr-constructible. This should reduce program
  startup time by having the compiler pre-allocate UserInput objects.
* Change initialization of UserInput objects to be made via
  constructor. A previous approach would have limited creation of
  UserInput objects to a few places but that proved unworkable in the
  long run.
2022-09-26 02:20:12 +00:00
Fabrice de Gans 1d4eb48a68 [build] Fix all warnings in src/gba/bios.cpp
This adds some helper methods to safely downcast integer types.

Bug: #1003
2022-09-26 02:17:26 +00:00
Fabrice de Gans 1e1451c57f [build] Fix warnings in src/common
Bug: #1003
2022-09-26 02:14:53 +00:00
Fabrice de Gans b2ec1544be [build] Regenerate lex and yacc files
The source grammar files were also updated. This fixes compiler
warnings for these files.

Bug: #1003
2022-09-26 02:13:12 +00:00
Fabrice de Gans 239b244640 [build] Fix warnings in memgzio.c
Bug: #1003
2022-09-26 02:11:52 +00:00
Rafael Kitover 9cc45c355b
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-26 02:02:20 +00:00
Fabrice de Gans 4a056c7720 [options] Remove duplicate string constants
* Changed the string to enum conversions to be built at runtime from
  the existing constant array rather than redefining the strings.
* Fixed an issue in the initialization of the `checkable_mi` array.
  A test had been mistakenly removed during the refactor.
* Fixed an issue where changing a bool or int option would cause an
  assertion error at runtime. Changed helper methods definitions to
  use a pointer to a variable rather than take a parameter by
  reference, clarifying the intent from the caller perspective.
* Fixed the `renderer` enum definition to properly exclude Direct3D or
  Quartz2D depending on the platform.
* Various comment fixes.
2022-09-25 05:47:34 +00:00
Fabrice de Gans c4d46a713f [options] Refactor INI options
This change introduces a new class to handle all of the INI options
data, VbamOption. A VbamOption represents a single option in the INI
file. It is not constructible outside of its implementation, which
prevents the initialization of incorrectly formatted options.

Internally, a VbamOption points to a global variable in memory, which
holds the value used at runtime. This is because various parts of the
codebase edit the global variable rather than going through a central
registry. This also means we need to separately update the INI values.

In the future, we may be able to convert all existing reads and writes
to the global variable to go through VbamOption. Individual UX elements
could link directly to getters/setters for a specific VbamOption rather
than have duplicate data.

VbamOption replaces the opt_desc struct and the global opts array. All
users of opt_desc and the global opts array have been updated.

This is a necessary preliminary change to better support a refactor of
accelerators, through wxUserInput.

Issue: #745, #158
2022-09-25 05:47:34 +00:00
Rafael Kitover dd6071e5cb
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-25 02:02:21 +00:00
Rafael Kitover c10338a854
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-24 02:02:22 +00:00