Skip to content

Commit

Permalink
upgrade from original code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninoh-FOX committed Jan 16, 2025
1 parent b797f2d commit a7acbf3
Show file tree
Hide file tree
Showing 133 changed files with 3,143 additions and 5,467 deletions.
100 changes: 100 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Bug report
description: This is not a forum or a help section, this is strictly developer oriented.
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Only RetroArch bugs should be filed here. Not core bugs or game bugs
options:
- label: This is a bug in RetroArch frontend
required: true
- label: I have searched the existing issues

- type: textarea
id: description
attributes:
label: Description
description: Description of the actual behavior of the bug
placeholder: What is actually happening
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What you expected to happen

- type: textarea
id: reproduce_steps
attributes:
label: Steps to reproduce the bug
description: List all steps to reproduce the problem
placeholder: |
1. [First step]
2. [Second step]
3. [and so on...]
validations:
required: true

- type: input
id: version
attributes:
label: Version/Commit
description: You can find this information under Information/System Information
placeholder: 1.19.1 (Git 0792144fe3)
validations:
required: true

- type: input
id: bisecting
attributes:
label: Bisect Results
description: Did this work with any older RetroArch version? Can you point to a version (or even commit) where it broke?
placeholder: 43105ab

- type: dropdown
id: nigthly
attributes:
label: Check in the nightly version
description: This issue is reproducible with [nightly builds](https://buildbot.libretro.com/nightly/)?
options:
- I don't know
- Yes, this is reproduced in the nightly build
- No, looks like this is already resolved
default: 0
validations:
required: true

- type: input
id: platform
attributes:
label: Platform & operating system
description: The system you're running RetroArch on
placeholder: Linux aarch64, Windows 11 23H2, Android 14, PS Vita
validations:
required: true

- type: input
id: cores
attributes:
label: Affected Cores
description: List the affected cores and their versions here, if applicable. If the issue **only occurs with a single core** then the bug may not be with RetroArch; in that case, you should report it in that core's repository instead of here.
placeholder: bsnes (115), FCEUmm ((SVN) aebea87), Snes9x (1.63.229933ea)

- type: textarea
id: environment
attributes:
label: Environment information
description: Additional information about hardware and software
placeholder: |
* Window Manager: dwm/X11
* Affected video drivers: sdl2, glcore
* Installed through Flatpak
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Paste [RetroArch log](https://docs.libretro.com/guides/generating-retroarch-logs/) and/or [GDB backtrace](https://docs.libretro.com/development/retroarch/debugging/). This will be automatically formatted into code, so no need for backticks.
render: shell
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/02-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Feature request
title: "[Feature Request] <FEATURE NAME>"
about: Is there something you'd like to see in RetroArch?
labels: feature request
---
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: Libretro Forums
url: https://forums.libretro.com
about: A place to discuss all things libretro
- name: Discord
url: https://ra-link.web.app/discord
about: Join our Discord server for help
- name: RetroArch/libretro subreddit
url: https://www.reddit.com/r/RetroArch
about: Subreddit dedicated to RetroArch and the libretro API framework
- name: Documentation
url: https://docs.libretro.com
about: Official RetroArch documentation for users and developers
2 changes: 1 addition & 1 deletion .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: retroarch-android-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DOS-DJGPP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RA-DOS-dummy-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: slug
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RetroArch-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Miyoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: retroarch_miyoo_arm32${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PS2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RA-PS2-dummy-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PS4-ORBIS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: bin-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PSP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RA-PSP-dummy-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PSVita.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RA-PSVita-dummy-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/RS90.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: retroarch_rs90_mips32${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/RetroFW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: retroarch_retrofw_mips32${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Switch-libnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: RA-libnx-dummy-${{ steps.slug.outputs.sha8 }}
path: |
Expand Down
10 changes: 9 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Future
- AUDIO/PIPEWIRE: Fix app launch when pipewire service is stopped
- GENERAL: Fix save state auto increment
- GENERAL: Fix softpatching with periods/dots in the file name
- GENERAL: Fix compilation with --enable-videocore
- MENU: Add SSL support to the information list
- IOS: Ensure webserver notice can be dismissed
- VIDEO/SHADERS: Allow exact refresh rate sync with shader subframes

# 1.20.0
- AUDIO: Fix audio handling in case of RARCH_NETPLAY_CTL_USE_CORE_PACKET_INTERFACE
Expand Down Expand Up @@ -46,7 +53,7 @@
- INPUT/UDEV: Enable mouse buttons 4 and 5
- INPUT/WAYLAND: Enable horizontal scroll and mouse buttons 4 and 5
- INPUT/WAYLAND: Simulate lightgun input for cores
- INPUT/WAYLAND: Support for cursor-shape-v1 and content-type-v1 protocol
- INPUT/WAYLAND: Support for cursor-shape-v1 protocol
- INPUT/X11: Enable mouse buttons 4 and 5
- iOS: Enable vibration by default
- iOS: Better handling of physical mice/magic keyboard trackpad
Expand Down Expand Up @@ -114,6 +121,7 @@
- VIDEO/VULKAN: Fix Vulkan window freezes when swapchain becomes suboptimal
- VIDEO/VULKAN: Prefer IMMEDIATE mode without vsync
- VIDEO/X11: Support inhibit of Xss screensaver
- VIDEO/WAYLAND: Support for content-type-v1 protocol
- VITA: Enable analog L2/R2 triggers when a DS3 controller is used with PS Vita
- WAYLAND: Fix segfault when relative pointer is not supported
- WAYLAND: Use reverse DNS name for desktop file and icon
Expand Down
23 changes: 12 additions & 11 deletions audio/common/pipewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ static void core_error_cb(void *data, uint32_t id, int seq, int res, const char
RARCH_ERR("[PipeWire]: error id:%u seq:%d res:%d (%s): %s\n",
id, seq, res, spa_strerror(res), message);

/* stop and exit the thread loop */
pw_thread_loop_stop(pw->thread_loop);
}

Expand All @@ -42,11 +41,9 @@ static void core_done_cb(void *data, uint32_t id, int seq)
retro_assert(id == PW_ID_CORE);

pw->last_seq = seq;

if (pw->pending_seq == seq)
{
/* stop and exit the thread loop */
pw_thread_loop_signal(pw->thread_loop, false);
}
}

static const struct pw_core_events core_events = {
Expand All @@ -55,7 +52,7 @@ static const struct pw_core_events core_events = {
.error = core_error_cb,
};

size_t calc_frame_size(enum spa_audio_format fmt, uint32_t nchannels)
size_t pipewire_calc_frame_size(enum spa_audio_format fmt, uint32_t nchannels)
{
uint32_t sample_size = 1;
switch (fmt)
Expand Down Expand Up @@ -85,7 +82,7 @@ size_t calc_frame_size(enum spa_audio_format fmt, uint32_t nchannels)
return sample_size * nchannels;
}

void set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS])
void pipewire_set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS])
{
memcpy(position, (uint32_t[SPA_AUDIO_MAX_CHANNELS]) { SPA_AUDIO_CHANNEL_UNKNOWN, },
sizeof(uint32_t) * SPA_AUDIO_MAX_CHANNELS);
Expand Down Expand Up @@ -114,7 +111,7 @@ void set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS])
}
}

void pipewire_wait_resync(pipewire_core_t *pw)
void pipewire_core_wait_resync(pipewire_core_t *pw)
{
retro_assert(pw);
pw->pending_seq = pw_core_sync(pw->core, PW_ID_CORE, pw->pending_seq);
Expand All @@ -127,7 +124,7 @@ void pipewire_wait_resync(pipewire_core_t *pw)
}
}

bool pipewire_set_active(struct pw_thread_loop *loop, struct pw_stream *stream, bool active)
bool pipewire_stream_set_active(struct pw_thread_loop *loop, struct pw_stream *stream, bool active)
{
enum pw_stream_state st;
const char *error;
Expand Down Expand Up @@ -162,13 +159,17 @@ bool pipewire_core_init(pipewire_core_t *pw, const char *loop_name)
pw_thread_loop_lock(pw->thread_loop);

pw->core = pw_context_connect(pw->ctx, NULL, 0);
if(!pw->core)
return false;
if (!pw->core)
goto unlock;

if (pw_core_add_listener(pw->core,
&pw->core_listener,
&core_events, pw) < 0)
return false;
goto unlock;

return true;

unlock:
pw_thread_loop_unlock(pw->thread_loop);
return false;
}
15 changes: 7 additions & 8 deletions audio/common/pipewire.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,26 @@ typedef struct pipewire_core
{
struct pw_thread_loop *thread_loop;
struct pw_context *ctx;

struct pw_core *core;
struct spa_hook core_listener;
int last_seq, pending_seq;

struct pw_registry *registry;
struct spa_hook registry_listener;
struct pw_client *client;
struct spa_hook client_listener;

bool nonblock;
struct string_list *devicelist;
bool nonblock;
} pipewire_core_t;

size_t calc_frame_size(enum spa_audio_format fmt, uint32_t nchannels);
size_t pipewire_calc_frame_size(enum spa_audio_format fmt, uint32_t nchannels);

void set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS]);
void pipewire_set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS]);

void pipewire_wait_resync(pipewire_core_t *pipewire);
bool pipewire_core_init(pipewire_core_t *pipewire, const char *loop_name);

bool pipewire_set_active(struct pw_thread_loop *loop, struct pw_stream *stream, bool active);
void pipewire_core_wait_resync(pipewire_core_t *pipewire);

bool pipewire_core_init(pipewire_core_t *pipewire, const char *loop_name);
bool pipewire_stream_set_active(struct pw_thread_loop *loop, struct pw_stream *stream, bool active);

#endif /* _RETROARCH_PIPEWIRE */
Loading

0 comments on commit a7acbf3

Please sign in to comment.