- Add defensive checks for disable_count in RescheduleCurrentCore
- Ensure disable_count is 1 before calling RescheduleCurrentCoreImpl
- Fix EnableDispatch() assertion failures
- Handle edge cases when disable_count is 0 or > 1
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Calculate max_count to prevent out-of-bounds access
- Validate effect type before calling UpdateResultState
- Add try-catch for exception handling from corrupted effects
- Prevent crashes from invalid effect data
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Use IsChannelCountValid for consistent validation
- Validate buffer indices only for active channels
- Disable effects with corrupted parameters instead of sanitizing
- Improve error handling and logging for both v1 and v2
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add v2 path in GenerateBiquadFilterCommand with float coefficients
- Add v2 path in GenerateCopyMixBufferCommand
- Add v2 path in GenerateBiquadFilterEffectCommand
- Use parameter-level enable field for v2
- Add buffer index validation for v2 commands
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Change coefficients from fixed-point s16 to native float f32
- Reorder fields: enable, channel_count, then arrays
- Remove state field (not present in v2)
- Change inputs/outputs from std::array to C-style arrays
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Prevent controller input processing until emulation is fully running
- Add null checks and prevent double deletion of NPAD callbacks
- Set callback_key to -1 after deletion to prevent reuse
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add early validation for loader and title ID with critical error logging
- Move LoadROM call outside conditional block to always execute after validation
- Move emu_thread->start() to after all signal connections are established
- Improve code flow and organization for better maintainability
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add CITRON_BUILD_TYPE CMake variable (Stable/Nightly)
- Refactor GenerateSCMRev to use build type instead of repo parsing
- Update window title to display build type (Nightly/Stable)
- Improve fullscreen exit hotkey using dedicated QAction
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add SetDestructionCallback() method to allow observers to safely null
out pointers when the controller is destroyed. This prevents use-after-free
issues in UI components.
Also includes cleanup and const correctness improvements in
configure_input_player_widget.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Use VFS API for directory creation and Java Long.valueOf() for
progress callbacks. Fix variable shadowing and add JNI reference cleanup.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Allow users to specify a custom directory for dumping game files via
the Android document picker, with fallback to default dump directory.
Adds optional dumpPath parameter to both dump functions and UI dialog
for location selection.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Changes:
- Add JNI functions dumpRomFS() and dumpExeFS() in native.cpp
- Add Kotlin interface methods in NativeLibrary.kt
- Add UI options in GamePropertiesFragment for dumping
- Add string resources for dump operations
- Extract files to dump/{title_id}/romfs and dump/{title_id}/exefs
- Support patched and updated game content during extraction
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add custom_save_paths map to Settings::Values
- Implement ReadCustomSavePathValues and SaveCustomSavePathValues in Config
- Update CreateSaveDataFactory to check for custom save paths
- Support per-game title ID save path overrides
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Replace banner/logo with game icon display
- Add shader progress widget with ETA calculations
- Improve stage translations with game title support
- Update UI layout to horizontal layout with better spacing
- Add smooth fade animations for show/hide transitions
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add STABLE_UPDATE_URL and NIGHTLY_UPDATE_URL constants
- Update CheckForUpdates() to read channel from QSettings
- Implement channel-aware version checking
- Nightly: Always use commit hash from build version
- Stable: Prioritize version.txt file, fallback to commit hash
- Update ParseUpdateResponse() to handle different API formats
- Stable: Parse tag_name from Gitea API
- Nightly: Extract commit hash from GitHub release name
- Update Linux AppImage updates to manage version.txt based on channel
- Remove update_url parameter from CheckForUpdates() methods
- Update main.cpp to use new CheckForUpdates() signature
The updater now supports both Stable and Nightly channels with
appropriate version checking and update source selection for each.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add update channel combo box (Stable/Nightly) in General settings
- Store channel preference in QSettings
- Change compact layout breakpoint from 950px to 550px
- Improve layout switching logic to move screenshots group box
- Add translation support for update channel labels
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Force the updater dialog to be non-modal so users can continue using
the application while checking for or downloading updates. This improves
user experience by not blocking interaction with the main window.
The dialog is explicitly set to non-modal in the constructor, overriding
any setting from the UI file.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add recursion guard (m_is_updating_theme) to prevent UpdateUITheme()
from entering an infinite loop when palette changes trigger recursive
theme updates. This eliminates the need for manual qt-config.ini edits
on Arch Linux systems.
The guard ensures that if UpdateUITheme() is already running, subsequent
calls will exit immediately, preventing stack overflow and application
freezing.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add responsive layout switching (compact/wide) based on window width
- Move UI positioning combo to UI file for better maintainability
- Convert layouts to QFormLayout for better organization
- Add resizeEvent handling for dynamic layout adjustments
- Reduce minimum window size from 1000x600 to 700x600
The configuration dialog now adapts to smaller window sizes by switching
to a single-column layout when the width is less than 950px, improving
usability on smaller screens.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Allows users to switch between vertical and horizontal navigation
layouts. Includes new UI positioning setting, dynamic layout switching,
and style animation event filter for improved UX.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Change GenericRequest() to create a new httplib::Client for each request
instead of reusing a single instance
- Remove shared client instance and mutex to avoid thread safety issues
- This is the safest approach in a multi-threaded environment and prevents
potential race conditions
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Fix RestoreDefaults() to properly iterate through hotkey groups and prevent
crashes with improved bounds checking
- Add explicit handling for empty key sequences in LoadHotkeys() to prevent
invalid QKeySequence objects
- Improve user feedback with success message when defaults are restored
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Add Shutdown() method to ChatRoom to properly disconnect Qt signals
- Initialize room_network pointer to nullptr for safety
- Call Shutdown() in MultiplayerRoomOverlay::DisconnectFromRoom() to prevent
signal leaks when disconnecting from rooms
- Ensures proper cleanup of chat widget connections when overlay is hidden
Signed-off-by: Zephyron <zephyron@citron-emu.org>
- Replace socket option assertion failures with proper error returns
- Add WSAENOPROTOOPT/ENOPROTOOPT error handling
- Fix LINGER and option value size validation
- Add Network::Errno::OTHER translation
- Implement basic Nex service stub for error code 2306-0520
Fixes crashes in Minecraft and other games when encountering unsupported
socket operations or attempting to use Nintendo's online services.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Enable mouse wheel scrolling throughout scroll areas instead of
requiring hover over scrollbars. Add event filter to forward wheel
events to scrollbars. Fix Input tab scrolling by only consuming
wheel events in ConfigureInputPlayer when actively mapping inputs.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Implement first-run setup wizard for PC with DuckStation-style UI.
Includes installation type selection, keys/firmware installation,
game directory configuration, and platform-aware path detection
for Windows, Linux, and macOS.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
The TitleID check was broken due to using || operator which evaluated
to 1 instead of a title ID value, preventing the recovery mechanism
from working.
- Fix title_ids.h: Replace incorrect || expression with proper
LittleNightmares3Base constant (0x010066101A55A000)
- Update physical_core.cpp: Use GetBaseTitleID() to match both
base and update title ID variants
This now correctly identifies Little Nightmares 3 and enables the
recovery mechanism that sets PC to LR when detecting null pointer
execution loops.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Explicitly cast modification_time to qint64 to resolve Linux build
error where std::int64_t conversion to QJsonValue is ambiguous.
Signed-off-by: Zephyron <zephyron@citron-emu.org>