90 Commits
Author SHA1 Message Date
itsmattkc e5f09b092a lib: create listen sockets AFTER connection
This may fix connectivity issues where the internal kernel device changes after it's unmanaged in NetworkManager and/or the backend is changed from iwd to wpa_supplicant
2025-12-30 10:16:32 -08:00
itsmattkc 969db197fd lib: add extra debugging line
May come in handy?
2025-12-30 02:07:06 -08:00
itsmattkc 65e1178c0e fix closing race condition 2025-12-29 10:04:42 -08:00
MattKC b1b7565506 define htobe32 for windows 2025-12-06 09:40:27 -08:00
MattKC b0bbc31002 Various optimizations and refactoring (#259)
* optimizations

* Update menu_game.h

* try new code

* use cached EGLImages

* try drm cache on pi

* nani?

* huh?

* require opengl egl

* find EGL

* find EGL separately

* logging

* add support for versions of ffmpeg less than 6.0

* disable drm cache for now

* Update ui_sdl.c

* use old code for now

* disable avcc hdr for now

* restore error message

* try disabling format modifiers?

* tell me what the layer is

* pi decoder actually produces frames in yuv420p

* print more debug info

* try this

* switch to faster decode path

* switch to old code

* Update ui_sdl.c

* add more timing profiling

* more printing

* enable some optimizations

* draw menus when not in game mode

* call render present

* Update ui_sdl.c

* Update ui_sdl.c

* remove unused code

* Update CMakeLists.txt

* incorporate direct DRM code

* Update CMakeLists.txt

* free drm context and test old decoding code

* move SDL event loop to separate thread so controls are not limited by display rate

* add a wait to reduce CPU thrashing

* fix double free

* separate video into recv and consume threads

* Update ui_sdl_drm.c

* Update ui_sdl_drm.c

* Update gamepad.c

* further optimizations

* anti-alias buttons more

* fix some compiler errors

* only include DRM on linux

* fix windows compile issues

* fix includes

* Update CMakeLists.txt

* add htobe32 define for macOS

* Update video.c

* Update gamepad.c
2025-11-30 20:56:52 -08:00
MattKCandMattKC 61e2a91028 Implement Polkit agent for platforms that lack them (#244)
* attempt to set up polkit listener

* implement polkit agent functionality

* finalized polkit implementation

* add warning for installing polkit rule

* docker: install libpolkit-agent-1-dev

* add uninstall polkit option

---------

Co-authored-by: MattKC <[email protected]>
2025-10-03 16:25:00 -07:00
VoxelTek 67f7f6f5ac Rename Vanilla-Pi to Vanilla (#209)
* Rename vanilla-pi to vanilla-gui

* revert weirdly-changed menu.h

* Change icon to rounded

* Rename vanilla-gui to vanilla, name libvanilla

* Fix broken .desktop file

* Rename `vanilla-gui` to `vanilla`
2025-07-25 00:32:16 -07:00
itsmattkc 864f989ecf add macOS support 2025-05-29 22:43:27 -07:00
MattKC 00f41e0546 Implement microphone support (#167)
* microphone initial work

* implement dumping functionality

Allows us to dump packets from the console for replay later on

* implement dump playback functionality

* pipe: when using playback, don't require wireless adapter

* move dump functionality to pipe

* started caramel library for interfacing with real gamepad

* finalized microphone implementation

* cleanup

* cleanup 2

* cleanup 3

* cleanup 4

* fixed more issues

* use initializers so mutex and cond are always valid

* rewrite audio output system to improve latency

* fix indent

* provide capability for audio to be enabled/disabled based on state

* fix android builds
2025-05-23 12:28:32 -07:00
itsmattkc 4ae9abefbf remove redundant logging functions 2025-05-08 12:58:36 -07:00
itsmattkc df9e34ac33 use improved SPS/PPS params for recording instead of hardcoding them 2025-02-18 19:25:32 -08:00
itsmattkc 599342e412 setup new build dockers 2025-02-18 00:59:34 -08:00
itsmattkc 234b2604a8 significant work 2025-02-17 11:06:12 -08:00
itsmattkc 9b370947e1 implement actual gameplay 2025-02-13 15:19:04 -08:00
itsmattkc db9cd2f134 return ssid and psk from pipe to library
Will eventually allow one Vanilla instance to connect to multiple consoles
2025-02-10 13:02:18 -08:00
itsmattkc 94d86f5bba implement communication with pipe
also adds support for local Unix domain socket mode
2025-02-09 12:26:58 -08:00
itsmattkc b17645c71e add mutexes for arena retrieval functions 2024-11-15 19:59:15 -08:00
itsmattkc 7524130b7a use bswap correctly 2024-11-15 19:03:00 -08:00
itsmattkc e1e9128fb1 use significantly faster bit reversing algorithm 2024-11-15 17:57:15 -08:00
itsmattkc 72d889ebbc don't bother swapping bits on audio payload size
This amounts to a 16-bit byteswap anyway which is way faster
2024-11-15 17:00:14 -08:00
itsmattkc 242386ea75 use memory arena to optimize handing data to frontend 2024-11-15 16:52:19 -08:00
itsmattkc 410b002d99 optimization: only copy actual data to frontend 2024-11-15 15:50:34 -08:00
itsmattkc 4ecf7c07f1 move reverse_bits into util.c 2024-11-13 17:40:08 -08:00
Daniel Foster 86d9feca8d lib: use pthread_setname_np directly (#99)
since pthread_setname_np is non-portable (hence the _np), it is only declared if
you #define _GNU_SOURCE
2024-11-08 19:59:15 -08:00
itsmattkc a8893cd1f8 optimized writing exp golomb leading zeros 2024-11-08 16:24:05 -08:00
itsmattkc 2f6a3a1252 improved bitshift part of code 2024-11-08 16:22:51 -08:00
itsmattkc 997c4d7543 fixed audio seemingly 2024-11-06 16:18:14 -08:00
itsmattkc b063abb359 use software clzl implementation 2024-11-06 14:32:03 -08:00
itsmattkc 1aa81b4b3b fix cmake source entry 2024-11-04 20:40:30 -08:00
itsmattkc 73d3bc99db rename tests to test 2024-11-04 20:36:51 -08:00
itsmattkc 99d5d2c8ef introduce test building cmake arg 2024-11-04 20:36:29 -08:00
itsmattkc 00739b85b1 added unit tests for SPS generating code 2024-11-04 20:34:08 -08:00
itsmattkc 8e1ce4e5d6 generate custom SPS parameters
Fixes majority of latency issue on raspberry pi

Thanks to: https://forums.raspberrypi.com/viewtopic.php?p=334801#p334801
2024-11-04 20:33:52 -08:00
itsmattkc fadb98429a removed extant slash 2024-11-04 20:29:30 -08:00
itsmattkc 5c42244a4c only push audio event if payload size > 0 2024-11-04 20:29:10 -08:00
itsmattkc 717dcbc6cd add get_millis() to util 2024-10-27 18:22:20 -07:00
itsmattkc e140c1a58c significantly optimized video/audio packet intake 2024-10-27 18:22:08 -07:00
itsmattkc 5f34f63dc9 name all threads 2024-10-27 16:30:42 -07:00
itsmattkc 8401e31f17 removed unnecessary newline from debug 2024-10-21 13:32:08 -07:00
itsmattkc e2c3515e46 added more debug info to gamepad.c 2024-10-16 15:05:04 -07:00
itsmattkc 7f272fd608 Merge branch 'event-loop' into rpi-eventloop 2024-10-14 13:34:43 -07:00
itsmattkc 1d41c1e431 actually make this stuff work 2024-10-14 12:04:22 -07:00
MattKC 39fb9da8ae initial event loop implementation 2024-10-14 03:09:20 -07:00
MattKC 92b5ffb5b1 don't block when using vanilla_start 2024-10-14 00:52:57 -07:00
itsmattkc 54b3f16f2b Merge branch 'master' into rpi 2024-10-10 16:38:49 -07:00
itsmattkc 0860076f66 started work towards h264 decoder 2024-10-10 16:32:12 -07:00
itsmattkc 42223f55e9 lib: resend until pipe acks 2024-10-09 11:58:34 -07:00
itsmattkc f3c01ed5b0 Merge branch 'pipe-rewrite' 2024-10-09 09:54:39 -07:00
MattKC 93b45187f1 Merge remote-tracking branch 'origin/pipe-rewrite' 2024-10-09 09:36:49 -07:00
UwUnyaa 5b3e3ca953 implement a TV button (#43) 2024-10-08 21:17:01 -07:00