Connor McLaughlin
bf85fbe331
GameSettings: Fix widescreen hack not saving to cache
2020-09-01 20:32:55 +10:00
Connor McLaughlin
0af22825ad
FrontendCommon: Drop imgui deps for libretro build
2020-09-01 12:48:57 +10:00
Connor McLaughlin
6bbbb96d4b
Move GameList to FrontendCommon
...
Reduces libretro core dependencies further.
2020-09-01 12:46:44 +10:00
Connor McLaughlin
2b902f6d09
Merge pull request #806 from CookiePLMonster/axis-to-button-map
...
Allow mapping axes to buttons
2020-08-29 23:35:18 +10:00
Silent
057bf986c4
Allow mapping half axes to buttons
...
This allows to bind pressure sensitive NeGcon buttons to keyboard,
mouse and controller buttons
2020-08-29 14:19:28 +02:00
Connor McLaughlin
547cc4dbf6
Qt: Clear OSD messages on system stop
2020-08-29 22:19:09 +10:00
Connor McLaughlin
5115c75f88
CommonHostInterface: Clear input map before changing interface
...
Should hopefully fix the crash when changing controller backends.
2020-08-24 00:22:49 +10:00
Silent
8def7420c4
XInput: Try to use XInput 1.3 if 1.4 is not present
...
This simple change enables the use of Guide button
for Windows 7 users, provided they have DirectX End-User
Runtimes installed. XInput 9.1.0 does not have the hidden
XInputGetStateEx export, so it was not possible to poll for
Guide button.
2020-08-22 22:52:54 +02:00
Silent
1c4bbc8cde
XInput: Do not use XINPUT_CAPS_FFB_SUPPORTED
...
There are several reasons for this:
1. XINPUT_CAPS_FFB_SUPPORTED flag was introduced in Windows 8,
and therefore only supported by XInput 1.4
2. Despite the name, this flag does NOT indicate whether normal rumble
is supported. This flag is reserved for more complex force feedback,
and according to MSDN it may have went unused on Windows.
This fixes a future (the method is not used yet) bug where
XInputControllerInterface::GetControllerRumbleMotorCount would
erroreously report no rumble support.
2020-08-22 22:46:12 +02:00
Connor McLaughlin
3c46f7b44c
ControllerInterface: Add XInput controller backend
2020-08-22 16:50:19 +10:00
Connor McLaughlin
ab002e78e1
Support translating strings in emulator core
2020-08-22 13:06:20 +10:00
Hugo Hromic
1e10bef09e
SDLControllerInterface: Add support for optional game controller database
...
If an optional "gamecontrollerdb.txt" file exists in the user directory,
then SDL game controller mappings will be loaded from it.
There is an officially endorsed community sourced database in
https://github.com/gabomdq/SDL_GameControllerDB
2020-08-21 23:51:07 +01:00
Connor McLaughlin
bca609a2a6
Qt: Add option to disable per-game settings
2020-08-21 00:09:37 +10:00
Connor McLaughlin
60d3fffec1
Add per-game overrides (mainly for compatibility)
2020-08-21 00:09:37 +10:00
Connor McLaughlin
3ca1d5b275
CommonHostInterface: Fix lag when OSD message display disabled
2020-08-16 01:40:18 +10:00
Connor McLaughlin
10a46a7fd8
OSD: Add option to show display resolution
2020-08-16 00:20:11 +10:00
Connor McLaughlin
f5fb8186c7
Switch some messages to the OSD and increase durations
2020-08-16 00:20:10 +10:00
Connor McLaughlin
c5db7db182
Build: Compile source as UTF-8 with MSVC
2020-08-15 00:04:38 +10:00
jpchow26
2a43b8b182
Update ini_settings_interface.cpp ( #734 )
...
* Update ini_settings_interface.cpp
Fix compiler error on Windows.
2020-08-11 02:59:58 +10:00
Connor McLaughlin
5c6e92cdfc
GPU/HW: Disable coordinate clamping when unnecessary
2020-08-10 23:28:37 +10:00
Connor McLaughlin
ac42510780
INISettingsInterface: Fix saving/loading with Unicode paths
2020-08-09 04:40:21 +10:00
Connor McLaughlin
fbdc9ae631
CommonHostInterface: Remove additional API reset/restore on screenshot
2020-08-04 21:08:56 +10:00
Connor McLaughlin
0c1b637549
PGXP: Add initial implementation
2020-08-02 00:25:07 +10:00
Connor McLaughlin
b6f871d2b9
JIT optimizations and refactoring ( #675 )
...
* CPU/Recompiler: Use rel32 call where possible for no-args
* JitCodeBuffer: Support using preallocated buffer
* CPU/Recompiler/AArch64: Use bl instead of blr for short branches
* CPU/CodeCache: Allocate recompiler buffer in program space
This means we don't need 64-bit moves for every call out of the
recompiler.
* GTE: Don't store as u16 and load as u32
* CPU/Recompiler: Add methods to emit global load/stores
* GTE: Convert class to namespace
* CPU/Recompiler: Call GTE functions directly
* Settings: Turn into a global variable
* GPU: Replace local pointers with global
* InterruptController: Turn into a global pointer
* System: Replace local pointers with global
* Timers: Turn into a global instance
* DMA: Turn into a global instance
* SPU: Turn into a global instance
* CDROM: Turn into a global instance
* MDEC: Turn into a global instance
* Pad: Turn into a global instance
* SIO: Turn into a global instance
* CDROM: Move audio FIFO to the heap
* CPU/Recompiler: Drop ASMFunctions
No longer needed since we have code in the same 4GB window.
* CPUCodeCache: Turn class into namespace
* Bus: Local pointer -> global pointers
* CPU: Turn class into namespace
* Bus: Turn into namespace
* GTE: Store registers in CPU state struct
Allows relative addressing on ARM.
* CPU/Recompiler: Align code storage to page size
* CPU/Recompiler: Fix relative branches on A64
* HostInterface: Local references to global
* System: Turn into a namespace, move events out
* Add guard pages
* Android: Fix build
2020-07-31 17:09:18 +10:00
Connor McLaughlin
3edb8e113e
StringUtil: Add wide string<->utf8 conversion for Windows
2020-07-31 16:04:00 +10:00
Connor McLaughlin
8665a24eee
CommonHostInterface: Fix crash when there's no controller interface
2020-07-26 23:59:47 +10:00
Albert Liu
79576ca956
AnalogController: Expose axis scale setting to frontend
2020-07-24 19:18:41 -07:00
Connor McLaughlin
4a3e5ed644
VulkanHostDisplay: Fix custom crosshair rendering on NVIDIA
2020-07-24 02:40:46 +10:00
Albert Liu
855fc9a31c
CommonHostInterface: Prevent some potential null pointer dereferences
2020-07-21 17:14:11 -07:00
Connor McLaughlin
68d98af497
Qt: Remove usage of QString where possible for settings
2020-07-21 20:10:06 +10:00
Connor McLaughlin
eb7da791ea
CommonHostInterface: Fix command line help not printing on Windows
2020-07-21 20:09:54 +10:00
Albert Liu
79adabeb91
CommonHostInterface: Bump to settings version 3
...
This is required for phasing out QSettings usage because game paths were
being saved using the QSettings multi-value format, which is
incompatible with SimpleIni.
2020-07-16 20:35:49 -07:00
Connor McLaughlin
8febf5df04
D3D11HostDisplay: Fix reversed feature level order
2020-07-12 00:44:13 +10:00
Connor McLaughlin
d6ec1fd84e
Build fix
2020-07-10 14:46:44 +10:00
Connor McLaughlin
c01854e9d1
Define LIBRETRO macro when building core, skip swap chain
2020-07-10 14:02:45 +10:00
Connor McLaughlin
a5fe740e30
Fix a bunch of compiler warnings
2020-07-09 13:30:16 +10:00
Connor McLaughlin
60a739e305
D3D11HostDisplay: Add __has_include check for dxgi1_5.h
2020-07-09 13:24:56 +10:00
Connor McLaughlin
5984f977ca
D3D11HostDisplay: Ensure we only get feature level 10-11
2020-07-09 13:00:31 +10:00
Connor McLaughlin
97a946bd62
CommonHostInterface: Implement frame step hotkey
2020-07-08 02:05:36 +10:00
Connor McLaughlin
76cb52407b
SDLControllerInterface: Init joystick API as well
2020-07-06 02:47:33 +10:00
Connor McLaughlin
b9ffca1ddf
libretro: Vulkan renderer support
2020-07-04 22:14:07 +10:00
Connor McLaughlin
2c4fce3f0d
D3D11HostDisplay: Don't create swap chain for headless
2020-07-04 17:37:50 +10:00
Albert Liu
0a0a2024fd
SDLControllerInterface: Prefer cbutton.which for button events
...
Functionally the same as caxis.which due to SDL_Event union, but prefer
using SDL_ControllerButtonEvent members for button events.
2020-07-02 17:45:44 -07:00
Connor McLaughlin
655dff84e2
VulkanHostDisplay: Fix software cursor rendering
2020-07-01 01:57:25 +10:00
Connor McLaughlin
400ee3d9b3
OpenGLHostDisplay: Fix software cursor rendering
2020-07-01 01:57:25 +10:00
Connor McLaughlin
8cd9e0887e
libretro: Use framebuffer view dimensions not texture dimensions
2020-07-01 01:57:25 +10:00
Connor McLaughlin
ed6065d7f5
D3D11HostDisplay: Fix software cursor rendering
2020-07-01 00:56:46 +10:00
Connor McLaughlin
4dc9e10777
HostInterface: Support per-controller-type settings
2020-07-01 00:56:46 +10:00
Connor McLaughlin
2a38090e7a
HostDisplay: Move most backend logic to FrontendCommon
2020-06-30 03:03:56 +10:00
Albert Liu
1a45ee3018
CommonHostInterface: Use largeImage fields in Discord presence payload
...
Fixes application icon not showing up in Discord Rich Presence.
2020-06-26 22:28:48 -07:00
Connor McLaughlin
58b0e6859a
Frontend: Reset/restore GPU state before saving screenshot
...
Fixes driver crashes in Vulkan.
2020-06-27 02:59:58 +10:00
Albert Liu
293c2f50cd
ControllerInterface: Make axis-to-button deadzone customizable
2020-06-23 08:15:17 -07:00
Albert Liu
6b7c068f83
ControllerInterface: Implement axis scaling for axis-to-axis mappings
...
This feature allows us to work around analog stick range issues at the
intercardinal directions in certain titles (e.g. Rockman DASH 2) caused
by modern controllers having a tighter logical range of reporting than
PS1 analog controllers.
2020-06-23 08:14:37 -07:00
Connor McLaughlin
eaca5eca07
GPU/Vulkan: Use Metal layer instead NSView on macOS.
2020-06-22 15:58:07 +10:00
Connor McLaughlin
f846817848
Vulkan: Fix crash when opening settings window -> resizing
2020-06-22 15:58:00 +10:00
Connor McLaughlin
1455e793d5
Vulkan: Fix crash when drag-resizing window
2020-06-22 15:57:54 +10:00
Connor McLaughlin
77291096db
Settings: Add GPU adapter option and hook up to D3D11/Vulkan
2020-06-20 03:34:19 +10:00
Connor McLaughlin
1b5f8db2fc
Vulkan/Context: Support specifying GPU to use
2020-06-20 03:34:19 +10:00
Connor McLaughlin
7fce9b102e
FrontendCommon: Add GPU enumeration methods to D3D11/Vulkan host displays
2020-06-20 03:34:19 +10:00
Connor McLaughlin
1e26ded73c
SDL: Use FrontendCommon D3D11 host display wrapper
2020-06-20 03:34:19 +10:00
Connor McLaughlin
6eb2079088
FrontendCommon: Add D3D11 helper for host display
2020-06-20 03:33:34 +10:00
Connor McLaughlin
6aacf0019a
FrontendCommon: Add a Vulkan host display interface
2020-06-19 00:18:19 +10:00
Connor McLaughlin
63cc4ab197
CommonHostInterface: Release save state selector before display
...
This can have GPU objects, so needs to be released first.
2020-06-19 00:16:59 +10:00
Albert Liu
8a94fc944a
CommonHostInterface: Fix minor log message typo
2020-06-16 09:53:18 -07:00
Connor McLaughlin
8d2c7db224
Qt: Source input profiles from program and user directory
...
This way Linux users as well as Windows users who use the Documents
user directory can use the shipped input profiles.
2020-06-12 02:47:40 +10:00
Connor McLaughlin
075380f8e0
Move most helper logic from base HostInterface to FrontendCommon
2020-06-09 02:35:37 +10:00
Connor McLaughlin
b9bfe30b1e
SDL: Fix compilation on older versions
2020-06-07 01:38:38 +10:00
Connor McLaughlin
531c3ad5fa
AudioStream: Replace buffer queue with ring buffer
...
Should achieve a decent overall minimum latency reduction.
2020-06-07 01:22:03 +10:00
Albert Liu
e1e3cf4f5a
CommonHostInterface: Simplify input profile saving
2020-05-27 17:49:06 -07:00
Albert Liu
f8fea1b215
INISettingsInterface: Return bool on saving settings
2020-05-27 17:48:33 -07:00
Connor McLaughlin
b17a5832e5
System: Simplify save state booting
...
Fixes memory card warning messages on load state.
2020-05-27 02:01:11 +10:00
Connor McLaughlin
47c2b29395
Build: Use bin directory for cmake, fix Windows/cmake build
2020-05-16 13:10:31 +10:00
Connor McLaughlin
6477e5fb54
CommonHostInterface: Add volume up/down/mute hotkeys
2020-05-10 00:54:23 +10:00
Connor McLaughlin
c67e877d82
CommonHostInterface: Fix -state command line parameter not working
2020-05-08 00:57:46 +10:00
Connor McLaughlin
2d6bdc1f82
Qt: Fix rumble not stopping on power off
2020-05-01 16:42:47 +10:00
Connor McLaughlin
1ed86f4897
Frontends: Add Discord Presence support
2020-05-01 01:01:53 +10:00
Connor McLaughlin
d8ab587153
HostInterface: Modify settings loading interface to support per-frontend settings
2020-05-01 01:01:50 +10:00
Connor McLaughlin
63692a012f
Qt: Add "New..." to input profile save button
...
This will ensure the profile gets saved to the correct location.
2020-04-27 01:05:03 +10:00
Connor McLaughlin
fce35d6dbe
CommonHostInterface: Support mouse bindings
2020-04-26 17:21:49 +10:00
Connor McLaughlin
a111e36ad7
CommonHostInterface: Add proper fast forward toggle
2020-04-26 01:22:44 +10:00
Connor McLaughlin
b9954a943a
CommonHostInterface: Default hotkeys for new save state UI
...
- F1: Load
- F2: Save
- F3: Select Previous
- F4: Select Next
2020-04-21 03:07:53 +10:00
Connor McLaughlin
2a710798cc
CommonHostInterface: Add save state selector UI
2020-04-21 03:07:40 +10:00
Connor McLaughlin
7c2244f20f
FrontendCommon: Add placeholder icon binary
2020-04-21 02:50:48 +10:00
Connor McLaughlin
277c03aca0
Add auto-generated Git version to window titles
2020-04-17 02:10:56 +10:00
Connor McLaughlin
f75ea052a6
FrontendCommon: Add input profile support
2020-04-15 01:44:04 +10:00
Connor McLaughlin
d9ebb975b2
CommonHostInterface: Reimplement controller rumble support
...
Even better than before, supports separate motor control.
2020-04-14 16:34:42 +10:00
Connor McLaughlin
915989fa25
CommonHostInterface: Remove extra newlines in messages
2020-04-14 04:05:10 +10:00
Connor McLaughlin
81cf4b469f
Frontends: Add shared command line interface
...
Also provides batch mode and automatic fullscreen switching.
-help: Displays this information and exits.
-version: Displays version information and exits.
-batch: Enables batch mode (exits after powering off)
-fastboot: Force fast boot for provided filename
-slowboot: Force slow boot for provided filename
-resume: Load resume save state. If a boot filename is provided,
that game's resume state will be loaded, otherwise the most
recent resume save state will be loaded.
-state <index>: Loads specified save state by index. If a boot
filename is provided, a per-game state will be loaded, otherwise
a global state will be loaded.
-statefile <filename>: Loads state from the specified filename.
No boot filename is required with this option.
-fullscreen: Enters fullscreen mode immediately after starting.
-nofullscreen: Prevents fullscreen mode from triggering if enabled.
-portable: Forces "portable mode", data in same directory.
--: Signals that no more arguments will follow and the remaining
parameters make up the filename. Use when the filename contains
spaces or starts with a dash.
2020-04-13 22:17:09 +10:00
Connor McLaughlin
e843fcd9f0
SDLControllerInterface: Fix broken input when player IDs clash
2020-04-11 19:36:53 +10:00
Connor McLaughlin
674bcdfeec
INISettingsInterface: Add Save() method
2020-04-11 00:00:21 +10:00
Connor McLaughlin
e7640d5367
HostInterface: Make SetUserDirectory() overridable by frontends
2020-04-05 22:59:06 +10:00
Connor McLaughlin
11e8a91e30
CommonHostInterface: Simplify fullscreen toggle
2020-04-05 22:58:54 +10:00
Connor McLaughlin
70ccdcfc30
INISettingsInterface: Make constructor parameter a std::string
2020-04-05 22:57:29 +10:00
Connor McLaughlin
cae2e09957
SDLControllerInterface: Pass player ID to hooks not joystick ID
...
Should fix controllers which show up as non-zero players.
2020-04-05 01:28:08 +10:00
Connor McLaughlin
3daa6b469a
Build: Explicitly disable spectre mitigations
...
Mitigations-off gave a roughly 20-25% boost in performance on my laptop
(i7-7700HQ), even with the recompiler.
It seems AppVeyor was building with them enabled. You shouldn't treat an
emulator like a sandbox and run untrusted code in it amyway.
2020-04-01 22:30:19 +10:00
Connor McLaughlin
361bedc2c3
SDLControllerInterface: Hackfix for non-player-id supporting controllers
2020-03-22 21:31:54 +10:00
Connor McLaughlin
46f921fb95
SDLControllerInterface: Fix crash on shutdown
2020-03-22 12:54:25 +10:00
Connor McLaughlin
8190efa5dc
SDLControllerInterface: Fix compilation on Ubuntu LTS
2020-03-22 12:28:10 +10:00
Connor McLaughlin
29a09a3685
Introduce ControllerInterface class, port SDL interface over
...
This breaks controller support in the SDL frontend until it's ported
over to the common interface.
2020-03-22 00:49:46 +10:00
Connor McLaughlin
1ee68ad12a
CommonHostInterface: Add Screenshot hotkey
2020-03-18 22:28:03 +10:00
Connor McLaughlin
8f39a0f154
Qt: Properly implement "Start Fullscreen"
2020-03-12 13:53:58 +10:00
Connor McLaughlin
ef2796b780
CommonHostInterface: Fix controller inputs not binding
...
Fixes #46 .
2020-03-06 21:55:27 +10:00
Connor McLaughlin
d41e6dd28f
CommonHostInterface: Add some more default key bindings
...
Also remove some unused code.
2020-02-29 00:41:17 +10:00
Connor McLaughlin
a298e93004
CMake: Fix Linux build
...
Fixes #36 .
2020-02-28 22:43:34 +10:00
Connor McLaughlin
f2adb71a70
CommonHostInterface: Bind face buttons to keypad by default
2020-02-28 18:15:21 +10:00
Connor McLaughlin
bbdee22ea8
SDL: Move SDLSettingsInterface (ini) to frontend-common
2020-02-28 17:00:14 +10:00
Connor McLaughlin
9ab5212833
FrontendCommon: Make SDL2 dependency optional
2020-02-28 17:00:12 +10:00
Connor McLaughlin
f35970fcac
FrontendCommon: Move input binding and some other logic from Qt to common
2020-02-28 17:00:09 +10:00
Connor McLaughlin
4f794b1c37
Add precompiled versions of D3D11 display shaders
2020-02-20 23:21:54 +09:00
Connor McLaughlin
b7dfe06f74
Qt: Support axes in input binding widgets
2020-02-18 00:06:11 +09:00
Connor McLaughlin
0f7365117b
SDLControllerInterface: Add missing include
2020-02-16 00:39:06 +09:00
Connor McLaughlin
06f4d72631
FrontendCommon: Use SDL_InitSubSystem() for lazy initialization
2020-02-16 00:15:05 +09:00
Connor McLaughlin
78a6666439
SDLAudioStream: Don't allow format to change
2020-02-16 00:15:02 +09:00
Connor McLaughlin
59cf799491
Qt: Implement controller interface/binding
2020-02-16 00:14:53 +09:00
Connor McLaughlin
1e009133ae
Rename 'Default' audio backend to 'SDL'
2020-02-16 00:14:35 +09:00
Connor McLaughlin
745c2785b2
Move shared frontend code from SDL to a seperate project
2020-02-16 00:13:53 +09:00