mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
Adds an Android build of the RPCS3 core plus a Compose UI, and fixes several things that stopped it working on ARM64. Renderer: - Emit concrete bounds for runtime sized arrays in uniform blocks when VK_EXT_shader_uniform_buffer_unsized_array is missing. Adreno does not have the extension, so every game pipeline failed with VK_ERROR_UNKNOWN and only overlays drew. - Probe and request that extension properly instead of chaining its feature struct unconditionally. - Hand VMA the Vulkan function pointers it needs under VK_NO_PROTOTYPES. - Rebuild the surface and swapchain when the window is lost instead of killing the RSX thread. - Only create a GLES context when the GL renderer is actually selected. SPU: - Sum instead of taking an absolute difference in the ARM64 block verification checksum. The difference collides on the near identical job binaries an SPU job manager streams through one local store address, so a cached block could run against another job's code. Threading: - Implement thread affinity on Android using sched_setaffinity. - Add an ARM big.LITTLE core arrangement so SPU and RSX threads land on the fast cores. Misc: - Detect the host CPU for the LLVM JIT instead of pinning cortex-a34. - Fall back to the default audio device when cubeb cannot enumerate.
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#include "virtual_pad_handler.h"
|
|
#include "pad_thread.h"
|
|
#include "Emu/Io/pad_config.h"
|
|
|
|
virtual_pad_handler::on_connect_cb virtual_pad_handler::mOnConnect = [](auto...)
|
|
{
|
|
return false;
|
|
};
|
|
|
|
virtual_pad_handler::virtual_pad_handler()
|
|
: PadHandlerBase(pad_handler::virtual_pad)
|
|
{
|
|
}
|
|
|
|
std::vector<pad_list_entry> virtual_pad_handler::list_devices()
|
|
{
|
|
std::vector<pad_list_entry> list_devices;
|
|
for (usz i = 1; i <= MAX_GAMEPADS; i++) // Controllers 1-n in GUI
|
|
{
|
|
list_devices.emplace_back(fmt::format("Virtual Pad #%d", i), false);
|
|
}
|
|
return list_devices;
|
|
}
|
|
|
|
bool virtual_pad_handler::bindPadToDevice(std::shared_ptr<Pad> pad)
|
|
{
|
|
if (!pad || pad->m_player_id >= g_cfg_input.player.size())
|
|
return false;
|
|
|
|
const cfg_player* player_config = g_cfg_input.player[pad->m_player_id];
|
|
if (!player_config || player_config->device.to_string() != "Virtual")
|
|
return false;
|
|
|
|
if (!mOnConnect(pad))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
m_bindings.emplace_back(std::move(pad), nullptr, nullptr);
|
|
connected_devices++; // ??? FIXME: Why?
|
|
return true;
|
|
}
|