Commit Graph

131 Commits

Author SHA1 Message Date
namtsui a1472fb190
OpenBSD 7.2 patches (#953)
* OpenBSD: BSS is immutable so mark it as mutable so that mprotect RWX works

see: mimmutable(1)
bc009f82ea

* OpenBSD does not have mcontext_t

<signal.h> provides `typedef struct sigcontext ucontext_t;'.
take register names from <machine/signal.h>, which provides struct
sigcontext.

see:
1a13d3ae4e

* OpenBSD uses major.minor for shared libs, so properly dlopen libGL.so

* OpenBSD remove redefinition of swap16

* OpenBSD: SDL2 controller detection

Use sdl_open_joystick() to open controllers on startup instead of
SDL_JOYDEVICEADDED event, which never gets detected.

* OpenBSD does not have mcontext_t but linux does
2023-02-28 18:22:45 +01:00
Flyinghead b86df7217c sdl: don't add a joystick if its name can't be retrieved
Otherwise it crashes later on during SDL_JoystickClose

Fixes MINIDUMP-9K, MINIDUMP-B4
2023-02-27 17:59:48 +01:00
Flyinghead a045c52146 sdl: handle joystick and gamepad api errors to avoid crashes
Fixes MINIDUMP-7K
2023-02-06 15:20:21 +01:00
Flyinghead 0b6c09da02 sdl: don't rely on event to get window size when processing resize event
window size may be different from drawable size if high-dpi is enabled.
Fixes wayland resize with scale factor > 100%.
2023-02-05 11:30:23 +01:00
Flyinghead 90e9f70a1a vk: fix resizing on wayland. validation errors with framebuffer render
wayland doesn't return the current surface dimensions in
getSurfaceCapabilities so we defaulted to 640x480. Instead use the
current display dimension as set by SDL.
Issue #648
Issue #898 (partial fix)

Vulkan validation errors when doing direct framebuffer rendering if fb
slots are skipped, since the corresponding fence isn't waited on.
Instead use an independent index to use them in sequential order.
2023-02-03 11:19:41 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead ab3f5dbc4c sdl: fix crash in getNativeHwnd() when recreating window
fixes rawinput crash
Fix for MINIDUMP-4B, MINIDUMP-4G, MINIDUMP-4F, MINIDUMP-4E
2023-01-18 09:45:01 +01:00
Flyinghead 5b8e932509 move steam deck hack to sdl/sdl.cpp 2022-11-14 15:59:19 +01:00
Flyinghead e0d87eb093 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/rend/gui.cpp
2022-08-22 13:09:56 +02:00
Flyinghead 55600c40a9 sdl: use exp scale for rumble power
Better sensitivity for low power values.
Issue #707
2022-07-28 10:47:42 +02:00
Flyinghead 0840da1bd5 sdl: fix inverted axis detection 2022-07-08 20:36:20 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
Flyinghead 971d47eb42 sdl: SDL_QuitSubSystem() on exit
Tentative fix for issue #654
2022-05-31 17:42:42 +02:00
Edward Li baab70c509 Rumble using MacBook's Taptic Engine (take 2) 2022-05-17 16:37:37 +02:00
Flyinghead a710674cd4 gui: init once. reset ui driver when needed. android 120+ Hz support
ImGui is now initialized once at startup and shutdown before
terminating. graphics initialization is independent.
Move more imgui stuff into imgui drivers.
switch: set scaling on external screen to 1.4, same as xbox
UI scaling refactoring.
2022-04-13 18:06:19 +02:00
Flyinghead 6c38295d62 new naomi network protocol. vblank event. initd rumble support
new vblank event, used by cheats, lua and naomi net
new udp net protocol for naomi. rx/tx on vblank on emu thread.
input: rumble power configurable (Issue #158)
ui: rumble intensity slider, enable/disable upnp
aica: hook to consume midi out
decode midi out to simulate rumble for initd
upnp can now be disabled
2022-03-27 15:23:21 +02:00
Julien Reichardt 4f638f6d77 Use service button instead of coin
The service button can also be used to add coins.
2022-01-11 14:09:54 +01:00
Julien Reichardt 80d78705b0 Add default coin mapping 2022-01-10 12:13:14 +01:00
scribam 746b3c5a54 sdl: fix joystick rumble 2022-01-06 08:59:39 +01:00
flyinghead 0478ec9696 dx11: per-pixel renderer 2021-12-11 18:53:35 +01:00
flyinghead d071adea9a dx11: fix modifier volumes, rotation. sdl: on-screen keyboard support
dx11: Back face stencil ops need to be set
dx11: Rotate CCW instead of CW
dx11: Present with NO_WAIT when fast forwarding
sdl: support for on-screen keyboard. Delay keys up by one frame to allow quick key presses.
ui: better fix to wait for future on UWP
2021-11-28 16:19:03 +01:00
flyinghead f91847dad0 DX11 renderer WIP 2021-11-26 18:08:41 +01:00
flyinghead 42fa77c81f uwp: the back button (B) shouldn't close the app 2021-11-24 13:42:25 +01:00
flyinghead 8262c9ece7 UWP support - WIP 2021-11-19 23:18:45 +01:00
Flyinghead ac5abd96bb ui: imgui driver, GraphicsContext interface, dx9 swap interval
Refactor imgui backend code into imgui drivers for gl, vk, dx9
Generic GraphicsContext interface for gl/vk/dx9 contexts
Simplify graphics api switching code
dx9, gl(sdl): set swap interval based on monitor refresh rate.
2021-11-10 20:35:30 +01:00
Flyinghead da3ed74c4e vulkan: moltenvk support on macOS - WIP
sdl: save/restore window position in config
2021-11-01 13:05:22 +01:00
Flyinghead ab45b5ec8a ggpo: keyboard/mouse games support. Fix chat when keyboard disabled
ggpo: support for arcade games using keyboard (totd, luptype) and
mouse/rotary encoders (waiwai drive)
Chat and UI now usable when the keyboard is not set to a maple port.
2021-10-19 16:56:46 +02:00
Flyinghead c2caef4ad5 ui: use SDL clipboard functions for imgui
allow cut & paste on linux
2021-10-07 19:14:29 +02:00
Flyinghead bc238de5ce switch: open 4 controllers. android: java7 compatibility 2021-10-06 18:55:04 +02:00
Flyinghead 699dcdaf5b Merge remote-tracking branch 'origin/master' into net-rollback
# Conflicts:
#	core/hw/maple/maple_if.cpp
#	core/rend/mainui.cpp
#	shell/libretro/libretro.cpp
2021-09-30 15:03:29 +02:00
Flyinghead 7fe2ab720f refactor screen_width/height 2021-09-27 20:29:23 +02:00
Flyinghead 1dc22ec76c sdl: null init sdl_controller 2021-09-26 22:02:21 +02:00
Flyinghead 1725dbfa98 input: fix arcade mode for on-screen gamepads.
Use same layout as gamepad arcade for on-screen gamepads (ABXYRL)
map RT and LT to buttons 5 and 6 in arcade
android: Fix non-working fast-forward button
Use maple port in lastAxisValue state
naomi: use default alienfnt buttons: 1-4
2021-09-21 15:56:01 +02:00
flyinghead 5b7d189058 sdl: fix hat button names 2021-09-19 22:35:23 +02:00
Flyinghead 65956dbc8d input: merge buttons and axes
Default mappings for arcade and console
Default mappings for arcade stick/hitbox
Proper handling of inverted axes
ggpo: automatic analog setting for arcade games
2021-09-19 18:27:21 +02:00
Joshua L 22947af854
Sdl gamecontrollerdb.txt fix (#356)
sdl: load gamecontrollerdb.txt before calling SDL_InitSubSystem
2021-09-18 18:07:07 +02:00
Flyinghead 5121b0df93 maple: mutually exclusive btns per controller. better D2A axes
Handle mutually exclusive buttons (U/D, L/R) in each controller.
Track digital X/Y axes state to allow for proper handling of U+D and
L+R. Issue #334
SDL: Ignore key repeat events
2021-09-07 10:54:00 +02:00
Flyinghead 07cdb42ff7 switch: set UI scaling factor depending on docking mode 2021-07-15 14:44:39 +02:00
Flyinghead 4fa89c4a45 switch: build with miniupnp. set correct window size
organize header
remove unneeded switch-specific code
2021-07-15 12:19:11 +02:00
Flyinghead db9c48b085 switch: typo 2021-07-14 17:48:41 +02:00
Flyinghead c0171f5fd1 switch: open sdl joysticks 0 & 1 at init 2021-07-14 17:22:17 +02:00
Flyinghead b40328e621 input: don't change mapper if file not found. sdl: fix default bindings 2021-07-05 09:59:46 +02:00
flyinghead 894a0540b9 sdl: convert keyboard mapping from keycodes to scancode on first load 2021-07-04 17:45:45 +02:00
Flyinghead 7f49accc22 Merge remote-tracking branch 'origin/master' into fh/directx 2021-06-07 20:53:31 +02:00
scribam d6545b253b Misc cleanup 2021-06-06 11:15:06 +02:00
flyinghead 5f5d31730c sdl: hide mouse in fullscreen. fix & refactor mouse devices
support rawinput mouse wheel
simplify mapping load
2021-05-19 18:13:52 +02:00
flyinghead 71fb024061 rawinput: proper conversion of abs coordinates
Issue #138
get rid of libPvr_GetRenderTarget() -> getNativeHwnd()
2021-05-04 12:03:09 +02:00
flyinghead b90cdf9588 RawInput driver. Multiple keyboards support
Merge Keyboard and KbGamepad
Always use system mouse for UI
Issue #138

Fix DX9 when not using SDL
2021-04-29 18:58:04 +02:00