Major networking enhancements to improve multiplayer performance and
reduce desync issues in games like Mario Kart 8 Deluxe:
Network Performance:
- Add socket connection pooling in BSD service to reduce overhead
- Implement unreliable packet delivery for latency-sensitive game data
- Add packet reliability control for both ProxyPacket and LDNPacket
- Use ENET_PACKET_FLAG_UNSEQUENCED for small UDP packets (<1200 bytes)
Monitoring & Debugging:
- Add PacketStatistics struct to track sent/received/dropped packets
- Enhanced logging for proxy packet handling and socket lifecycle
- Periodic stats logging every 100 packets for diagnostics
Configuration:
- Update lobby_api_url and web_api_url to https://api.ynet-fun.xyz
- Add lobby API URL configuration support
Socket Management:
- Implement SocketPoolKey for efficient socket reuse
- Store domain/type/protocol info in FileDescriptor
- Max pool size limit (8 sockets per type) to prevent memory bloat
- Return closed sockets to pool when room is still connected
Protocol Updates:
- Add 'reliable' field to ProxyPacket and LDNPacket structures
- Update room.cpp packet handlers to respect reliability flags
- Maintain backward compatibility with default reliable=true
These changes significantly reduce packet latency for real-time game
traffic while maintaining reliability for control packets.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add device detection for Snapdragon 8 Elite (device ID 0x43052c01)
- Disable shader float controls and 64-bit integer atomics on Qualcomm
proprietary drivers to work around driver limitations
- Enable native BGR format support on S8 Elite (similar to S8 Gen 2)
- Implement VOTE_vtg instruction for vertex/tessellation/geometry shaders
with proper single-thread semantics
- Replace stub warnings with detailed comments for FCSM_TR flow test and
SR_WSCALEFACTOR special registers to document expected behavior
These changes improve compatibility with Qualcomm Snapdragon 8 Elite
devices and reduce spurious warnings by documenting shader features
that are correctly handled as conservative defaults.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Annoyed a few people that the Overlay was non-functional unless they were in-game. Now it works when not in-game.
Signed-off-by: Collecting <collecting@noreply.localhost>
Testing and fiddling with our recent overhaul for changing OS/UI themes and updating on the fly resulting in a segmentation fault that also would not allow you to re-open the emulator unless changing back to the theme previously known by Citron, which obviously we don't want. Grabbed the core dump.
The backtrace pointed to a race condition in GMainWindow::UpdateUITheme, where a QTextStream was reading from a Qt resource stylesheet (.qss) that was being simultaneously reloaded by the theme change event. This led to an attempt to read from a dangling pointer.
This change resolves the issue by reading the entire stylesheet into memory in a single, atomic operation using f.readAll(). This prevents the underlying resource from becoming invalid during the read. The resulting QByteArray is explicitly converted to a QString via QString::fromUtf8 to satisfy Qt 6's stricter type requirements.
Signed-off-by: Collecting <collecting@noreply.localhost>