libpicofe.git
3 months agomenu: unhardcode 2x mode master github/master
notaz [Fri, 22 Aug 2025 22:28:09 +0000 (01:28 +0300)]
menu: unhardcode 2x mode

For cases like notaz/pcsx_rearmed#385

Make it possible to adjust to fit user's display, there is not much saving
from having it hardcoded. PicoDrive will need to update its pandora and
ps2 posts, otherwise it uses 1x anyway so should mostly not be affected.

6 months agoinput: fix a crash on disconnected dev config load
notaz [Tue, 10 Jun 2025 22:34:14 +0000 (01:34 +0300)]
input: fix a crash on disconnected dev config load

Because `kbd_binds` was null. in_bind_kbd_key() already handles it so
just call it to reuse.

6 months agogl: kludge to fix egl on stock Anbernic opendingux
kub [Wed, 4 Jun 2025 18:32:32 +0000 (20:32 +0200)]
gl: kludge to fix egl on stock Anbernic opendingux

6 months agomenu: handle path separator for win32
kub [Tue, 27 May 2025 21:49:35 +0000 (23:49 +0200)]
menu: handle path separator for win32

6 months agoin_sdl: give names to gamepad buttons
notaz [Fri, 23 May 2025 21:13:46 +0000 (00:13 +0300)]
in_sdl: give names to gamepad buttons

in control config, etc; otherwise it's just hex codes

6 months agoin_sdl: try to guess stick vs pressure-sensitive button 'axis'
notaz [Fri, 23 May 2025 20:59:28 +0000 (23:59 +0300)]
in_sdl: try to guess stick vs pressure-sensitive button 'axis'

if the user doesn't press anything on init/probe and the gamepad
is not broken it might work...

6 months agosdl: try to reduce init mode changes yet more
notaz [Fri, 23 May 2025 19:32:43 +0000 (22:32 +0300)]
sdl: try to reduce init mode changes yet more

6 months agosdl: switch to 16bpp if not in it
notaz [Fri, 23 May 2025 19:30:53 +0000 (22:30 +0300)]
sdl: switch to 16bpp if not in it

happens on init, where native mode is set for overlay detection to work

6 months agogl: initialize display only once
kub [Fri, 23 May 2025 16:48:06 +0000 (18:48 +0200)]
gl: initialize display only once

6 months agomake gl libraries dynamically loadable
kub [Thu, 22 May 2025 20:10:12 +0000 (22:10 +0200)]
make gl libraries dynamically loadable

6 months agomake 2x default for overlay
kub [Thu, 22 May 2025 20:23:18 +0000 (22:23 +0200)]
make 2x default for overlay

6 months agogl: allow to control vsync
notaz [Tue, 20 May 2025 21:21:58 +0000 (00:21 +0300)]
gl: allow to control vsync

6 months agogl: add texture filter selection
kub [Tue, 20 May 2025 19:47:34 +0000 (21:47 +0200)]
gl: add texture filter selection

6 months agoin_sdl: clean keyboard keys from gamepad
notaz [Sat, 17 May 2025 22:59:20 +0000 (01:59 +0300)]
in_sdl: clean keyboard keys from gamepad

6 months agoin_sdl: map remaining axes and hats to keycodes
notaz [Sat, 17 May 2025 22:24:57 +0000 (01:24 +0300)]
in_sdl: map remaining axes and hats to keycodes

the user can leave them unbound if some axes are used directly,
like for pcsx

7 months agoin_sdl: improve joy support
notaz [Fri, 16 May 2025 21:04:40 +0000 (00:04 +0300)]
in_sdl: improve joy support

- avoid event flood for analog->udlr mapping
- ability to disable this mapping
- basic hat support

7 months agoinput: use enum for set/get _config
notaz [Fri, 16 May 2025 18:28:37 +0000 (21:28 +0300)]
input: use enum for set/get _config

better visible in gdb

7 months agoMerge pull request #3 from notaz/sdl_gl
irixxxx [Fri, 16 May 2025 15:16:46 +0000 (17:16 +0200)]
Merge pull request #3 from notaz/sdl_gl

fixes for pcsx

7 months agoin_sdl: implement the actual update_analog
notaz [Thu, 15 May 2025 22:59:46 +0000 (01:59 +0300)]
in_sdl: implement the actual update_analog

7 months agoinput: introduce in_update_pointer
notaz [Thu, 15 May 2025 22:26:12 +0000 (01:26 +0300)]
input: introduce in_update_pointer

update_analog is meant for reading analog axes, so new function is
needed for what's implemented in in_sdl.

7 months agogl: update
notaz [Wed, 14 May 2025 16:44:58 +0000 (19:44 +0300)]
gl: update

- more error checking
- add a workaround for mesa compiled without OpenGL ES1.x (but with egl)
- don't leave half-initialized state (and just a black screen) on error
- clear texture memory, otherwise edges sometimes pick up noise from
  filtering taking garbage texels behind the edges
- allow to pass vertices to flip
- new clear function

7 months agosdl: update window handle on mode change
notaz [Mon, 12 May 2025 20:14:19 +0000 (23:14 +0300)]
sdl: update window handle on mode change

At least on sdl12-compat info.x11.window changes after calling
SDL_SetVideoMode() and gl init fails with the old one.

7 months agosdl: use correct SetVideoMode flags on init
notaz [Mon, 12 May 2025 20:08:24 +0000 (23:08 +0300)]
sdl: use correct SetVideoMode flags on init

- avoids flicker from recreating the window on startup
- resizable window from the beginning
- SDL_SWSURFACE fallback should actually work

maybe will also help notaz/libpicofe#4

7 months agoMerge pull request #2 from notaz/irixxxx
irixxxx [Mon, 5 May 2025 20:54:04 +0000 (22:54 +0200)]
Merge pull request #2 from notaz/irixxxx

sync with my tree, make overlay2x kludge explicit

7 months agomake overlay2x kludge controllable through an explicit var
notaz [Sun, 4 May 2025 15:50:10 +0000 (18:50 +0300)]
make overlay2x kludge controllable through an explicit var

640 width doesn't suit pcsx_rearmed as it's one of widths PSX supports.
Note that PicoDrive will need to be updated to set the new variable as needed.

7 months agodon't pretend SDL_REDRAW_EVT can be disabled
notaz [Sun, 4 May 2025 15:47:32 +0000 (18:47 +0300)]
don't pretend SDL_REDRAW_EVT can be disabled

in_sdl_update_analog() relies on it

7 months agoplat: add a thp-based huge page fallback
notaz [Sun, 1 Oct 2023 22:27:58 +0000 (01:27 +0300)]
plat: add a thp-based huge page fallback

unlike MAP_HUGETLB it's often enabled in distros by default

7 months agogl: clear w, h on reinit
notaz [Sun, 7 Jan 2024 17:53:01 +0000 (19:53 +0200)]
gl: clear w, h on reinit

otherwise gl_flip() doesn't update texture[] in pcsx's fullscreen toggle
or window resize

7 months agoinput: fix a leak
notaz [Mon, 28 Aug 2023 20:30:40 +0000 (23:30 +0300)]
input: fix a leak

7 months agoCompatibility with FreeBSD
Matheus Garcia [Sat, 21 Oct 2023 15:56:56 +0000 (15:56 +0000)]
Compatibility with FreeBSD

8 months agoRevert 86a086e "automatically map input devs of same type to different players"
kub [Mon, 31 Mar 2025 18:39:05 +0000 (20:39 +0200)]
Revert 86a086e "automatically map input devs of same type to different players"

misunderstanding of the API's intentions

9 months agoadd relative mouse movement
kub [Thu, 27 Feb 2025 22:15:23 +0000 (23:15 +0100)]
add relative mouse movement

9 months agoimprove forced window resizing
kub [Wed, 26 Feb 2025 22:38:10 +0000 (23:38 +0100)]
improve forced window resizing

9 months agoadd mouse support to sdl
kub [Mon, 24 Feb 2025 22:39:08 +0000 (23:39 +0100)]
add mouse support to sdl

10 months agoadd forced window resizing
kub [Sat, 15 Feb 2025 16:24:00 +0000 (17:24 +0100)]
add forced window resizing

10 months agoadd expose event to redraw handling
kub [Wed, 12 Feb 2025 18:23:52 +0000 (19:23 +0100)]
add expose event to redraw handling

10 months agofix multiple redraw events (only handle last one)
kub [Sun, 9 Feb 2025 18:45:33 +0000 (19:45 +0100)]
fix multiple redraw events (only handle last one)

10 months agochanges for PicoDrive virtual keyboard
kub [Tue, 21 Jan 2025 21:23:53 +0000 (22:23 +0100)]
changes for PicoDrive virtual keyboard

10 months agooptimize keyboard readout
kub [Tue, 21 Jan 2025 21:22:08 +0000 (22:22 +0100)]
optimize keyboard readout

11 months agofixes for keyboard support fallout
kub [Wed, 15 Jan 2025 21:29:21 +0000 (22:29 +0100)]
fixes for keyboard support fallout

11 months agokeyboard unbinding
kub [Wed, 15 Jan 2025 19:14:59 +0000 (20:14 +0100)]
keyboard unbinding

11 months agogeneralise keyboard support
kub [Mon, 13 Jan 2025 22:56:58 +0000 (23:56 +0100)]
generalise keyboard support

11 months agoadd pitched writepng function
kub [Thu, 9 Jan 2025 22:57:17 +0000 (23:57 +0100)]
add pitched writepng function

11 months agocompile fix for windows mingw
kub [Thu, 9 Jan 2025 22:55:10 +0000 (23:55 +0100)]
compile fix for windows mingw

11 months agomore keyboard support
kub [Thu, 9 Jan 2025 22:52:53 +0000 (23:52 +0100)]
more keyboard support

11 months agoadd support for Pico Keyboard
qufb [Sun, 26 Jun 2022 14:14:38 +0000 (15:14 +0100)]
add support for Pico Keyboard

14 months agoautomatically map input devs of same type to different players
kub [Sun, 13 Oct 2024 18:04:56 +0000 (20:04 +0200)]
automatically map input devs of same type to different players

15 months agobetter support for resizable windows
kub [Tue, 10 Sep 2024 20:30:54 +0000 (22:30 +0200)]
better support for resizable windows

15 months agofix repeated redraw events
kub [Tue, 10 Sep 2024 20:28:51 +0000 (22:28 +0200)]
fix repeated redraw events

15 months agofix some warnings
kub [Thu, 5 Sep 2024 20:00:30 +0000 (22:00 +0200)]
fix some warnings

20 months agofix pngread error handling
kub [Mon, 25 Mar 2024 23:56:33 +0000 (00:56 +0100)]
fix pngread error handling

20 months agoadd reading scaled png images
kub [Wed, 20 Mar 2024 22:40:37 +0000 (23:40 +0100)]
add reading scaled png images

22 months agomake sound rates platform dependent
kub [Sat, 17 Feb 2024 18:32:30 +0000 (19:32 +0100)]
make sound rates platform dependent

22 months agofix event handling regression
kub [Wed, 14 Feb 2024 22:23:50 +0000 (23:23 +0100)]
fix event handling regression

22 months agoadd .. to dir listing if it is missing
kub [Wed, 14 Feb 2024 22:00:45 +0000 (23:00 +0100)]
add .. to dir listing if it is missing

22 months agofix BGR/RGB handling
kub [Wed, 14 Feb 2024 21:26:18 +0000 (22:26 +0100)]
fix BGR/RGB handling

23 months agoUsing PSP as posix
Francisco Javier Trujillo Mata [Sat, 30 Dec 2023 20:53:41 +0000 (21:53 +0100)]
Using PSP as posix

2 years agoimprove redraw events handling
kub [Thu, 14 Dec 2023 21:13:01 +0000 (22:13 +0100)]
improve redraw events handling

2 years agorevert parts of e0bf7946 to allow multiple keys in parallel
kub [Sun, 3 Dec 2023 19:41:56 +0000 (20:41 +0100)]
revert parts of e0bf7946 to allow multiple keys in parallel

2 years agorevisit file selector
kub [Thu, 23 Nov 2023 20:56:44 +0000 (20:56 +0000)]
revisit file selector

- display help
- add draw callback for window resizing
- fix small memory leak

2 years agofix crash if file list is empty in romsel
kub [Wed, 15 Nov 2023 20:26:05 +0000 (20:26 +0000)]
fix crash if file list is empty in romsel

2 years agoMerge remote-tracking branch 'notaz/master'
kub [Sun, 29 Jan 2023 19:37:03 +0000 (19:37 +0000)]
Merge remote-tracking branch 'notaz/master'

2 years agofix menu key handling in file selector
kub [Thu, 26 Jan 2023 21:00:48 +0000 (21:00 +0000)]
fix menu key handling in file selector

2 years agofix hang if seeking for letter in file selector
kub [Wed, 25 Jan 2023 22:09:22 +0000 (22:09 +0000)]
fix hang if seeking for letter in file selector

3 years agoenable use of current pspdev sdk
kub [Thu, 29 Sep 2022 23:13:49 +0000 (23:13 +0000)]
enable use of current pspdev sdk

3 years agofix sdl overlay not locked for clearing
kub [Wed, 28 Sep 2022 18:55:29 +0000 (18:55 +0000)]
fix sdl overlay not locked for clearing

3 years agofix off-by-1 in directory listing search
kub [Fri, 16 Sep 2022 20:06:24 +0000 (20:06 +0000)]
fix off-by-1 in directory listing search

3 years agoadd some support for handling redraw events
kub [Fri, 16 Sep 2022 17:08:34 +0000 (17:08 +0000)]
add some support for handling redraw events

3 years agomake gl layer reinitializable
kub [Fri, 16 Sep 2022 17:07:14 +0000 (17:07 +0000)]
make gl layer reinitializable

3 years agoMerge branch 'irixxxx'
notaz [Sat, 10 Sep 2022 13:57:39 +0000 (16:57 +0300)]
Merge branch 'irixxxx'

3 years agofbdev: wait vsync after mode change, not before
notaz [Sun, 13 Mar 2022 23:17:09 +0000 (01:17 +0200)]
fbdev: wait vsync after mode change, not before

As it was before we were getting a full frame scanout of the old mode,
while the emu (or whatever) was already writing a frame in new mode.

first_write_to_front is a hack for psx.

3 years agofbdev: don't clear more than needed
notaz [Sun, 13 Mar 2022 23:15:51 +0000 (01:15 +0200)]
fbdev: don't clear more than needed

it wastes time for something like psx that may change modes ingame

3 years agofix regression selecting SDL window size (for hw scaling)
kub [Sun, 6 Mar 2022 18:25:56 +0000 (18:25 +0000)]
fix regression selecting SDL window size (for hw scaling)

3 years agofix a buffer overflow
kub [Fri, 4 Mar 2022 19:39:44 +0000 (19:39 +0000)]
fix a buffer overflow

3 years agoreduce SDL_Setvideo calls to avoid flickering with TRIPLEBUF
kub [Fri, 4 Mar 2022 19:38:41 +0000 (19:38 +0000)]
reduce SDL_Setvideo calls to avoid flickering with TRIPLEBUF

3 years agoadd basic fullscreen support to SDL window mode
kub [Fri, 4 Mar 2022 19:37:27 +0000 (19:37 +0000)]
add basic fullscreen support to SDL window mode

3 years agoMerge pull request #11 from jSTE0/overlay-lock
notaz [Tue, 1 Mar 2022 20:10:12 +0000 (22:10 +0200)]
Merge pull request #11 from jSTE0/overlay-lock

sdl: lock YUV overlay before clearing

3 years agosdl: lock YUV overlay before clearing
jSTE0 [Mon, 28 Feb 2022 23:00:22 +0000 (23:00 +0000)]
sdl: lock YUV overlay before clearing

The pixels pointer is not valid otherwise and leads to a segfault.

3 years agoadd aspect ratio for sdl fullscreen
kub [Tue, 22 Feb 2022 20:43:51 +0000 (20:43 +0000)]
add aspect ratio for sdl fullscreen

3 years agosome disassembler fixes
kub [Tue, 22 Feb 2022 20:52:01 +0000 (20:52 +0000)]
some disassembler fixes

3 years agofix skin directory default
kub [Tue, 22 Feb 2022 20:49:37 +0000 (20:49 +0000)]
fix skin directory default

3 years agofix for 4 player support
kub [Tue, 22 Feb 2022 20:55:19 +0000 (20:55 +0000)]
fix for 4 player support

3 years agofix display of menu strings containing '%'
kub [Fri, 26 Mar 2021 21:45:04 +0000 (22:45 +0100)]
fix display of menu strings containing '%'

3 years agoadd support for 4 player inputs
kub [Wed, 26 Jan 2022 19:36:32 +0000 (19:36 +0000)]
add support for 4 player inputs

3 years agofix position of menu entries if length > 10
kub [Fri, 26 Mar 2021 19:06:43 +0000 (20:06 +0100)]
fix position of menu entries if length > 10

3 years agofix type usage for endianess in menu handling
kub [Fri, 26 Mar 2021 18:57:58 +0000 (19:57 +0100)]
fix type usage for endianess in menu handling

3 years agoadd minimal osx/ios compilastion support
kub [Mon, 22 Mar 2021 22:07:02 +0000 (23:07 +0100)]
add minimal osx/ios compilastion support

3 years agoadd SDL SWSURFACE support
kub [Mon, 22 Mar 2021 22:04:12 +0000 (23:04 +0100)]
add SDL SWSURFACE support

3 years agouse native byte order for audio
kub [Tue, 23 Feb 2021 22:23:32 +0000 (23:23 +0100)]
use native byte order for audio

3 years agocenter loaded background image in larger screen
kub [Mon, 8 Feb 2021 19:51:34 +0000 (20:51 +0100)]
center loaded background image in larger screen

4 years agoavoid a warning
notaz [Sun, 14 Nov 2021 21:37:17 +0000 (23:37 +0200)]
avoid a warning

4 years agosdl: don't try gl on remote displays
notaz [Sun, 31 Oct 2021 15:16:02 +0000 (17:16 +0200)]
sdl: don't try gl on remote displays

4 years agosdl: set initial pitch
notaz [Sun, 31 Oct 2021 14:36:36 +0000 (16:36 +0200)]
sdl: set initial pitch

4 years agoallow to opt out of HOME config path
notaz [Sun, 31 Oct 2021 14:33:02 +0000 (16:33 +0200)]
allow to opt out of HOME config path

pcsx_rearmed never used it so keep it this way there.

4 years agoMerge pull request #10 from irixxxx/master
notaz [Mon, 18 Jan 2021 17:12:19 +0000 (19:12 +0200)]
Merge pull request #10 from irixxxx/master

improved directory handling for menu, basic PSP support

4 years agoadd minimal PSP support
kub [Thu, 14 Jan 2021 20:57:13 +0000 (21:57 +0100)]
add minimal PSP support

4 years agoimprove directory handling in menu
kub [Thu, 14 Jan 2021 20:56:30 +0000 (21:56 +0100)]
improve directory handling in menu

4 years agoadd buffer parameters for menubg_src
kub [Thu, 14 Jan 2021 20:47:19 +0000 (21:47 +0100)]
add buffer parameters for menubg_src

5 years agofix SDL event handling of overlapping keystrokes
kub [Mon, 26 Oct 2020 19:15:23 +0000 (20:15 +0100)]
fix SDL event handling of overlapping keystrokes

5 years agofix menu input handling (timeout non-working)
kub [Thu, 22 Oct 2020 20:34:14 +0000 (22:34 +0200)]
fix menu input handling (timeout non-working)