Commit Graph

3043 Commits

Author SHA1 Message Date
Rafael Kitover d6aa168718
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-11-08 02:03:11 +00:00
Benjamin Siskoo 364dad84a9 Fixed typos and translated strings... 2022-11-07 02:21:39 +00:00
Fabrice de Gans 02f516f646 Set wxWS_EX_VALIDATE_RECURSIVELY style for dialog
This is no longer required since wxWidgets 3.1.0 but is needed for
prior versions.
2022-10-31 17:57:10 +03:00
Rafael Kitover f138b44a50
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-27 02:02:19 +00:00
Fabrice de Gans 080be1a325 [config] Make usage of Option less verbose
* Add convenience direct accessors to individual Options.
* Move BasicOptionObserver to a separate header and allow it to
  observer multiple options. This also removes the include for
  "config/option.h" for using this observer, reducing build time.
* Never skip the "Plugin" option when changing filters. This is
  already handled properly in the GameArea class. If the plugin is
  unusable, GameArea resets the filter to the default value.
* Make the OptionID names slightly less long and fix the inconsistent
  naming in the enum.
2022-10-26 12:28:14 +00:00
Rafael Kitover 0a104a9a9d
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-26 02:02:20 +00:00
Rafael Kitover 0bfb88d0e3
Fix regression in ea2a929f, check for Wayland
Fix regression in ea2a929f, which broke x11 support by not checking for
Wayland when making the Wayland EGL subsurface move call.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-25 19:17:40 +00:00
Rafael Kitover 873de5f667
build: update default.nix
Change dbus_libs to dbus, which is the new package name.

This is for `nix-shell` to build on NixOS.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-25 19:14:38 +00:00
Rafael Kitover 9bf6a25048
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-24 02:02:24 +00:00
Rafael Kitover ea2a929f5e Backport 800d6ed69b from wx to fix Wayland EGL pos
Backport 800d6ed69b from wxWidgets git to fix resizing the
`GLDrawingPanel` in Wayland using the EGL `wxGLCanvas`.

Also rename `IsItWayland()` to `IsWayland()`.

Fix #1028

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-23 13:14:03 -07:00
Fabrice de Gans 0ca5184dda [option] Convert all uses of geometry options to use config::Option
Moving and resizing the window no longer updates the entire option
set, reducing jank on move and resize.
2022-10-23 11:42:08 +00:00
Rafael Kitover d2d070b52f
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-23 02:03:18 +00:00
Rafael Kitover c40a141792
Write vsync toggle msg to debug log not OSD
Write vsync enable/disable messages to debug log and not the OSD, they
are kind of annoying.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-22 11:55:56 +00:00
Rafael Kitover 5d2dd01e85
Call Layout() after DrawingPanel OnSize event
When processing the `OnSize` event in the `GameArea` and calling the
embedded `DrawingPanel` `OnSize` event, call `Layout()` afterwards.

This seems to improve the resizing behavior of the EGL `wxGLCanvas`
`DrawingPanel` on Wayland.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-22 11:51:13 +00:00
Rafael Kitover 00344ca8f1
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-10-22 02:02:19 +00:00
Fabrice de Gans af4951511e [config] Add Observers for Options
This adds a generic Observer interface to config::Option. To
demonstrate its intended usage, the Display Configuration dialog and
the options it controls have been updated to be entirely handled via
the config::Option class.

Implementations for wxValidator are used to validate the flow between
the UI and the underlying Option. In turn, modifying the Option value
triggers all of its observers that should then do what they need to
do.

Rather than explicitly calling all of the needed methods after
modifying a global option value, the UI elements that need to be
notified when an Option value is modified will be notified via their
observers. Runtime assert checks are put in place to prevent infinite
recursion if an observer attempts to modify an Option while handling
the observer callback.

Once all uses of Options have been updated, we should get into a state
where the following will be true:
* cmdevents.cpp will no longer rely on the application state.
* All dialogs will have been moved to specific implementations,
  reducing the size of guiinit.cpp
* update_opts() will no longer need to be called and will be removed.

This will then make it easier to update accelerator handling to be
done with config::UserInput.

Bug: #745
2022-10-22 01:47:39 +00:00
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