Commit Graph

529 Commits

Author SHA1 Message Date
Stephen Miller
64d198190f
Lib.NpWebApi2: Library implementation (#4677)
* Fix error definitions

* sceNpWebApi2Initialize, sceNpWebApi2InitializeForPresence, sceNpWebApi2IntInitialize, sceNpWebApi2IntInitialize2

Defines classes for various existing objects in the library, and adds support for creating library context objects.

* sceNpGetSdkVersion

* sceNpWebApi2CreateUserContext

* Clang

* More clang

* sceNpWebApi2GetMemoryPoolStats

* stuff

* sceNpWebApi2CreateRequest, sceNpWebApi2CreateMultipartRequest

* sceNpWebApi2AddHttpRequestHeader

* Why bother with pointers when deque exists?

* sceNpWebApi2SendRequest

* sceNpWebApi2AbortRequest, sceNpWebApi2DeleteRequest

* Stub libSceHttp2 calls using libSceHttp

Also some bug fixes to make sure requests actually work properly.

* Clean things I'm not doing yet

Probably done enough to be worth pushing, as now most games just complain from missing endpoints.

* Update np_web_api2_context.h

* sceNpWebApi2DeleteUserContext

* sceNpWebApi2SetRequestTimeout

* sceNpWebApi2GetHttpResponseHeaderValue, sceNpWebApi2GetHttpResponseHeaderValueLength

* sceNpWebApi2ReadData

* Revert "Clean things I'm not doing yet"

This reverts commit 598f67e8bb.

* sceNpWebApi2PushEventCreateHandle

* Misc stuff

* Started work on sceNpWebApi2PushEventCreateFilter

The actual filter doesn't create yet

* Some touchups

* Define base callback for checking push events

Will fill out once push event stuff is done

* Finish sceNpWebApi2PushEventCreateFilter

* Define remaining parts

* Logging adjustments, copy filter param extd data keys

* sceNpWebApi2PushEventRegisterCallback

* Store data_key vectors

So they're properly deleted on PushEventFilter destructors (which will be important when I implement the proper functions for that)

* sceNpWebApi2PushEventRegisterPushContextCallback

* sceNpWebApi2PushEventUnregisterCallback, sceNpWebApi2PushEventUnregisterPushContextCallback

* sceNpWebApi2PushEventAbortHandle

* sceNpWebApi2PushEventDeleteFilter

* sceNpWebApi2PushEventDeleteHandle

* Clang

* sceNpWebApi2PushEventSetHandleTimeout

* sceNpWebApi2AddWebTraceTag

* sceNpWebApi2PushEventCreatePushContext, sceNpWebApi2PushEventStartPushContextCallback

* Clang

* sceNpWebApi2PushEventDeletePushContext

* sceNpWebApi2Terminate

* Slight fix to sceNpWebApi2DeleteUserContext

* sceNpWebApi2CheckTimeout
2026-07-07 13:40:23 +03:00
georgemoralis
dd60483956
Invitation Dialog (#4653)
* added dummy invitation dialog

* fixup

* dummy dialog management cycle

* fixed include

* added all neccesary structs for invitation dialog

* logging is my friend

* logging fixups

* fixup

* better error codes

* one more time

* clNF

* added some function prototypes

* typo

* fixed compile

* draft invitation_dialog work

* initial invitation dialog work . doesn't send invitations yet mostly UI stuff

* update for the recv dialog

* added SendSessionInvitation

* sending invitations should work now

* added OrbisNpSessionInvitationEventParam structs

* system service events

* improve invitation dialog accept , queue invitation and general cleanups

* clang

* fixup

* Improve callbacks

* fixup

* invitation prompt layer

* clang pal
2026-07-06 20:04:47 +03:00
metr1k-91
3e1f92353c
matching2 - P7+P8: more public api additions, changes to context, corrections to multiple callback returns, corrections to A types, etc. (#4671) 2026-07-05 08:00:16 +03:00
Burhan
362bd7da66
macOS: Compile stack.S thread helpers on ARM64 architectures (#4664) 2026-07-04 09:15:44 +03:00
metr1k-91
0a51093d28
Matching2 P7: signaling additions, movement to separate signaling files, corrections to payloads, corrections to structs, corrections to shadnet. (#4656) 2026-07-02 09:21:45 +03:00
metr1k-91
c581ce89a9
Matching2 P3 + P4 (#4643)
* matching2 part 3: context states, initial payload holder, additional constants, enums.  Matchmaking block, comid additon, ctx_id additon to shadnet.proto.

* Matching2 P4: this time its matching: starting rewrites on external APIs.  Shadnet changes to mirror on emu side.

* Matching P5: SearchRoom
2026-06-29 09:02:46 +03:00
metr1k-91
59d7c92e45
Matching2 part 2: more types, structs, enums, context backend, init, term, createcontext / createcontextA. added ctxid to all shadnet notifications for matching2 and added matching2 events. (#4631) 2026-06-27 08:48:55 +03:00
metr1k-91
b564846b3c
Matching2 Part1: general additions, corrections, and sorting. (#4625) 2026-06-26 08:39:09 +03:00
georgemoralis
583e6851fd
Faking Np commerce (#4618)
* moved np_commerce to dedicated folder

* Implemented fake np commerce

* we have a store now

* shadnet icon

* stephen reviews

* more stephen reviews
2026-06-25 17:35:07 +03:00
georgemoralis
aff387e8a9
First ShadNet integration (#4607)
* initial shadnet client (based on my previous prs)

* some np_handler work mostly based on our previous pr

* improved login/logout event of shadnet

* added np_score support from previous pr

* friends and notifications ui

* clang is not my friend

* clang fix again

* added webapi support for shadnet

* applied metrik's fix

* clang

* fixed some wrong LOG_ERRORS

* updated emulator settings

* trying to fix npcommid bugs

* fixed npcommid

* improved NPcommid detection so it won't write null values to database

* metrik's suggestion

* removed one line

* more command types

* fixed duplicated log print

* fixed compile

* improved reconnection retries

* simplify error code

* stephen suggestion

* made friends hotkey

* fixup

* more proper handling of reconnecting

* fixed return code
2026-06-24 23:57:43 +03:00
squidbus
dcd036d261
build: Get compiling on ARM64 again (#4598) 2026-06-19 18:21:38 +03:00
kalaposfos13
d54e6b07f5
sceMouse HLE (#4568)
* libSceMouse HLE v1

* fix getting event device id, init lib, logging

* rest of the mouse events

* lol how did it take me this long to notice this

* stop the hidden mouse from clicking on random shit

* yet another mouse state bug

* Implement merged mode

* Move RingBufferQueue to common/

* sir clang offnir, the all-formatting

* config option for this

* review comments
2026-06-18 11:55:28 -05:00
squidbus
1785b98fbf
emulator: Clean up resource files (#4590) 2026-06-18 18:52:06 +03:00
squidbus
462cd0724a
build: Put system library use behind flag (#4576) 2026-06-17 09:56:02 -07:00
squidbus
0d5f7e83b7
emulator: Set window icon to game icon. (#4586)
* emulator: Set window icon to game icon.

* window: Match system icon look-and-feel on macOS

* window: Log SDL error on failure to set icon
2026-06-17 09:52:46 -07:00
squidbus
f29c0269fe
build,ci: Minor clean-up (#4583) 2026-06-15 23:57:34 -07:00
squidbus
7de583b4c3
build: Switch to build KosmicKrisp from source (#4580) 2026-06-15 03:28:24 -07:00
squidbus
3590426ab8
mac: Migrate to KosmicKrisp (#4566) 2026-06-13 04:22:09 -07:00
Alexandre Bouvier
b5b7cb5459
cmake: prefer system miniupnpc library (#4567) 2026-06-12 10:53:16 -07:00
metr1k-91
5303084054
UPNP Support (#4556)
* UPNP

Adds UPNP (currently not wired to anything) for NAT support utilizing the miniupnpc library.

* clang fix

* Changed override for enable_upnp
2026-06-12 10:43:39 +03:00
Niram7777
4bef2658f6
Add shadps4 log + refactor (#4535)
* Log to shadps4.log before game starts

* Log update doc

* Log critical like before

* Log in main file as much as possible
2026-06-12 09:03:48 +03:00
metr1k-91
041ba9975e
NP Part 1: NpSignaling (#4549)
* NP Part 1: NPSignaling

PR Split 1 of X, adds the NPSignaling Library and some of the dependencies.  Any stubs are highlighted by the stubs files and will be resolved upon other PRs.  (Dependencies are to shadnet and further PR's to Matching2)

* PR Corrections

* PR Corrections 2

* PR Corrections 3

* clang fix

* Move to folder per request
2026-06-11 16:52:09 +03:00
Alexandre Bouvier
e369d8f78d
cmake: prefer system freetype2 library (#4552) 2026-06-10 16:50:29 -07:00
Valdis Bogdāns
c5a809e50e
Fontlib (#3772)
* dummy fontlib libs

* register font libs

* typo fix

* added font error file

* added sceFontCharacterGetBidiLevel (from RE)

* fixup

* sceFontCharacterGetTextOrder , sceFontCharacterLooksFormatCharacters , sceFontCharacterLooksWhiteSpace RE

* sceFontCharacterRefersTextBack,sceFontCharacterRefersTextNext,sceFontRenderSurfaceInit,sceFontRenderSurfaceSetScissor  RE

* sceFontRenderSurfaceSetStyleFrame ,sceFontStyleFrameGetEffectSlant RE added

* clang fix

* sceFontStyleFrameGetEffectWeight

* added sceFontStyleFrameGetScalePixel

* Update types.h

* fixup merge

* Enhance font rendering and management system

- Integrated `stb_truetype` for advanced font rendering.
- Added support for external and system fonts with logging.
- Introduced new structures for glyphs, metrics, and kerning.
- Implemented functions for font state management and scaling.
- Improved glyph rendering, including subpixel and caching.
- Enhanced render surface initialization and scissor handling.
- Refactored stubbed functions with proper implementations.
- Added ABI compatibility checks for key structures.
- Improved logging, error handling, and code organization.
- Updated documentation and comments for better clarity.

* Fix for DC: font scale still inaccurate, cause unknown.

Refactor font library: streamline file handling, enhance layout caching, and improve scale computation.

* Remove unnecessary blank line in OrbisFontStyleFrame struct

* Loading font files from app0, some other fixes.

* restored accidentally deleted stubbs.

* Add system font path configuration and loading functionality

Config example:

[General]
...
sysFontPath = "/.../NotoSansJP-Regular.ttf"
...

* Handle missing system font by clearing font bytes and logging an error

* Remove unused <system_error> include from font.cpp

possible MacOS build crash reason.

* fontlib: refactor style frame API; config-driven system fonts

-Update style frame getters to take the frame explicitly:
--sceFontStyleFrameGetResolutionDpi(OrbisFontStyleFrame*, u32* h_dpi, u32* v_dpi)
--sceFontStyleFrameGetScalePixel(OrbisFontStyleFrame*, float* w, float* h)
--sceFontStyleFrameGetScalePoint(OrbisFontStyleFrame*, float* w, float* h)
-Ensure setters operate directly on the passed style frame (signatures unified):
--sceFontStyleFrameSetEffectSlant(OrbisFontStyleFrame*, float slantRatio)
--sceFontStyleFrameSetEffectWeight(OrbisFontStyleFrame*, float weightXScale, float weightYScale, u32 mode)
--sceFontStyleFrameSetResolutionDpi(OrbisFontStyleFrame*, u32 h_dpi, u32 v_dpi)
--sceFontStyleFrameSetScalePixel(OrbisFontStyleFrame*, float w, float h)
--sceFontStyleFrameSetScalePoint(OrbisFontStyleFrame*, float w, float h)
-Remove/streamline unused declarations from font.h to tighten the interface
-Call sites using style frame getters must pass an OrbisFontStyleFrame* now

Config: define system fonts path and default filename overrides

-Add [General].sysFontPath to set the base directory for system fonts
-Add [SystemFonts]:
--fallback = "SST-Roman.otf" (lowercase key) for the default face when no set is requested
--Per-font overrides using lowerCamelCase keys (start with fontSet...), e.g.:
---fontSetSstStdJapaneseJpArBold = "SSTJpPro-Bold.otf"
--Override values are filenames resolved under sysFontPath (paths are rejected and logged)
-Back-compat: still accept legacy SysFontPath and Fallback if present
-Logging: emit errors when sysFontPath is missing/invalid, fallback missing, or an override includes a path
-Configs should switch to sysFontPath and [SystemFonts].fallback with override keys

* font.cpp

Added full glyph tracking/outline plumbing plus mutex-protected generated-glyph tracking and helpers (BuildTrueOutline, true-outline extraction, glyf detection, system-font cache/fallback logic, etc.).
Swapped OTF defaults for several JP/JP_AR sets (and CJK sets used by Death Stranding / Anywhere VR) to SSTAribStdB24-Regular.ttf or other TTFs so we load glyf faces.
Wrapped every LOG_* call in INFO/DEBUG pairs: INFO just announces the call, DEBUG lists each parameter on its own line with an extra trailing newline; warnings/errors remain for validation/fallback.
Implemented TTF detection for cache loading and fallback with logging.
Renamed glyph param struct/members, moved glyph handle struct into the header, and renamed the glyph API parameters/fields accordingly.
font.h

Added the new glyph outline/glyph handle definitions and renamed OrbisFontGenerateGlyphParams members (id, res0, form_options, mem, res1/2).
Updated function prototypes to use the renamed types and pointers (e.g., sceFontGenerateCharGlyph signature now matches the new names).
fontft.cpp

Reworked sceFontSelectLibraryFt/sceFontSelectRendererFt logging to follow the same INFO/DEBUG pattern (INFO announces that selection is requested, DEBUG dumps all params).

* clang

* Scaling and font state

Removed env‑driven debug scaling (ScaleMode, GetScaleMode, GetScaleBias, SHADPS4_FONT_SCALE_*).
Added FontState::is_otf_cff and storing of external vmetrics (ext_ascent, ext_descent, ext_lineGap).
Introduced ComputeScaleExtPoint, ComputeScaleExtPixel, IsEmProfileExternalFont and ComputeScaleExtForState to choose ascender‑ vs EM‑based scaling per font (system fonts + CFF → ascender; selected TTF profiles → EM).
Updated callers (sceFontGetCharGlyphMetrics, glyph cache, layout, renderer, clones, scale setters) to use ComputeScaleExtForState instead of ComputeScale / ComputeScaleExt.
System font handling

Added ReportSystemFaceRequest helper to centralize “attach system font or log why not” and avoid repeating the logic at each call site.
Slightly adjusted when system_requested is set and how fallback/system attach errors are reported.
Horizontal layout

sceFontGetHorizontalLayout now logs invalid parameter/handle and, when an external face is present, uses that face’s vmetrics and the per‑state scale to compute baselineOffset and lineAdvance.
(Fallback still uses the simple scale_h‑based approximation.)
Glyph rendering (horizontal)

Reworked sceFontRenderCharGlyphImageHorizontal:
Resolves effective pixel scale from the attached style frame + point/pixel API via ResolveStyleFrameScale.
Uses ComputeScaleExtForState to compute scale_y (and derived scale_x), rather than a single global scale.
Always computes metrics from stbtt_GetCodepointHMetrics + GetCodepointBitmapBoxSubpixel, with metrics->h_bearing_* and h_adv in sync with those scales.
Introduces a clearer origin/gravity model:
System fonts: (x,y) treated as raw top‑left.
Certain external TTFs (EM‑profile) : (x,y) treated as baseline.
Other external fonts (CFF/point etc.): (x,y) treated as line‑top with baseline offset.
Validates surfaces more strictly and returns NO_SUPPORT_SURFACE when buffer/size/bpp are invalid; supports only 1‑bpp and 4‑bpp.
Uses a local glyph_bitmap and a straightforward blit with scissor/clipping, instead of the older mix of cached bitmaps/PUA logging.
Removed PUA/placeholder glyph debug tracing and the more ad‑hoc baseline “adjusted_y” heuristic.
Logging clean‑up

Standardized LOG_INFO/LOG_DEBUG in sceFont* functions:
Info: usually just "called" or a short description (“scale pixel set requested”, etc.).
Debug: "parameters:\n"/"result:\n"/"template state:\n" followed by values on separate lines.
LOG_ERROR messages no longer repeat the function name (logger already prints it); they now say "invalid parameter", "invalid font handle", "no support glyph (face/scale)", "no support surface (buffer)", etc.
Added missing error logs before some early returns (allocation failures, page_count == 0, invalid parameters), and upgraded a few previous LOG_DEBUG “invalid params” to LOG_ERROR where they correspond to an error return.

* Add internal font handling structures and layout computation functions

This commit introduces a new header file `fontft_internal.h` containing
various structures and functions for managing font handles, layout metrics,
and rendering operations. Key additions include:

- Definitions for `FontHandleOpenInfo`, `FontHandleStyleStateTail`,
  and `FontHandleOpaqueNative` to encapsulate font state and properties.
- Layout-related structures such as `HorizontalLayoutBlocks`,
  `VerticalLayoutBlocks`, and their respective I/O structures for
  managing layout metrics and effects.
- Functions for computing horizontal and vertical layout blocks,
  along with utility functions for handling layout words in byte format.
- Stubs for library functions related to font management and rendering.

These changes aim to enhance the font rendering capabilities of the
shadPS4 Emulator Project, providing a robust foundation for future
font-related features.

* Add FreeType submodule for GitHub CI workflows

* Refactor font rendering and path resolution logic to fix Metaphor: ReFantazio glyphs cropping and anywhereVR  "thin" glyphs.

- Updated RenderCodepointToSurface and RenderCodepointToSurfaceWithScale functions to set result->transImage to nullptr instead of result->stage.
- Modified font definitions to use updated font file names for various language sets.
- Introduced ResolveSystemFontPathCandidate function to streamline font path resolution, allowing for better handling of font directories.
- Enhanced LoadFontFile function to check for font files in "font" and "font2" directories based on the parent directory name.
- Improved error logging for font path overrides in ResolveSystemFontPath function.

* clang

* Update fontft_internal.cpp

typo fix

* Fix: fypo

* create sys_fonts in users folder and instructions.txt of what to put inside

* cut version of emulator settings to support custom sysfonts folder

* load settings

* cmakelist

* using new saving system but i can't understand the fallback mechanism

* removed lle versions

* Enhance error logging in font metrics functions and update comments for clarity

* Refactor font library functions and improve thread safety

- Updated function signatures in font.h to include the OrbisFontLib parameter for cache clearing and outline buffer management.
- Introduced a mutex in font_internal.cpp to ensure thread safety by protecting access to global font state and library state.
- Added a RemoveState function to safely remove font states.
- Enhanced memory allocation functions in fontft_internal.cpp to use Core::ExecuteGuest for better integration with the guest environment.
- Simplified font loading logic in LibraryOpenFontMemoryStub to improve readability and maintainability.
- Removed redundant code related to file opening and memory allocation, streamlining the font loading process.
This potentially fixes emulator crashes in games that use parallel font initialization, such as Dragon’s Crown.

* Add system font path and override config support

Introduce new config options for system font directory, fallback font name, and per-font overrides. Update config load/save logic to handle a [SystemFonts] TOML section, supporting both fallback and individual font overrides. Improve user instructions for custom font setup and clarify related code comments. These changes enhance flexibility and user experience for system font configuration.

* clang

* Add system font path management functions and refactor font directory retrieval

* Restored support for loading the libSceAudiodec system module

* Refactor font path handling and remove unused functions

* Fix include order for emulator settings and key manager (Clang)

* Remove unused emulator settings files and clean up includes in main and config files

* Remove unused instructions file creation from user paths initialization

* Consolidate internal font/ft internals

Move internal font structs, aliases, and helpers out of font.cpp into shared internal headers/sources.
Promote shared ABI-facing types (including FontHandleOpaqueNative and layout/system-use structs) into font internal headers and remove function-local duplicates.
Move FreeType driver/renderer table construction into fontft_internal.cpp and wire fontft.cpp to internal getters.
Ensure internal.cpp implementations are declared in headers; deduplicate declarations and clean includes.

* Refactor memory allocation and deallocation calls to remove Core::ExecuteGuest wrapper

* clang

* Add conditional linking for freetype library in shadps4 target

* Add new fixed-point arithmetic functions for font rendering

This commit introduces several new functions to handle fixed-point arithmetic operations, specifically for converting and scaling values related to font rendering. The added functions include:
- FixedMulUnitsToF26Dot6
- Cvttss2siCompat
- RoundMul16x16ToS32
- TruncFixed16x16ToInt
- RoundFixedMulValueScaleToS32
- TruncMulUnitsToS64
- RoundFixedMul16x16ToS64

These functions will enhance the precision and performance of font rendering calculations.

* Refactor: Replace Config usage with EmulatorSettings for font directory retrieval

* Sysmodule: Stop forcing HLE for font modules

* Add support for built-in font handling and fallback mechanisms

- Introduced a new structure `BuiltinFontBlob` to manage built-in font data.
- Implemented decompression functions for loading built-in fonts from compressed data.
- Added functions to resolve and load built-in fonts, including `LoadBuiltinFontBytesShared` and `IsBuiltinFontPath`.
- Enhanced `AttachSystemFont` to utilize built-in fonts as fallbacks when system fonts are unavailable.
- Implemented `AddBuiltinFallbackFaces` to add necessary fallback fonts based on font set types.
- Updated font selection logic to include Thai and symbol fonts in `ResolveSysFontCodepoint`.
- Modified `LibraryOpenFontMemoryStub` to handle loading built-in fonts directly from shared data.
- Added notifications for users when system fonts are not found, indicating fallback usage.
- Updated header files to declare new structures and functions related to built-in font handling.

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-06-10 15:57:11 +03:00
Niram7777
42849b6590
CI print CPU info (#4530) 2026-06-06 02:04:55 -07:00
georgemoralis
6d2e6a439a started 0.16.1 WIP 2026-06-01 19:14:07 +03:00
georgemoralis
5be3f0a30b tagged 0.16.0 release 2026-06-01 18:47:16 +03:00
Stephen Miller
48283da2a6
Core: Remove old config code (#4499)
* Remove old config backend

Trophy key migration now uses the toml library directly, like our config transfer code.

* Don't retrieve user_dir in main

No longer needed.
2026-06-01 10:00:24 +03:00
Lander Gallastegi
2ff3487dbc
video_core: check if depth image is valid before using it (#4479)
* check if depth image is valid before using it

* fix uid usage
2026-05-27 14:49:34 +03:00
Niram7777
78053e70b7
CI release without avx512 (#4481)
* Revert "build: Explicitly turn off AVX512 (#4478)"

This reverts commit 0f094cb6c8.

* CI disable AVX512 Windows, Linux
2026-05-26 22:46:38 +03:00
squidbus
0f094cb6c8
build: Explicitly turn off AVX512 (#4478) 2026-05-25 19:21:42 +03:00
georgemoralis
9dada49956
np score initial (#4472)
* move np_score to /np_score folder

* added more logging to np functions

* using common np_error file

* moved web_api to dedicated folder

* implemented some context creations for np_score so logging would be more productive
2026-05-25 09:38:43 +03:00
georgemoralis
6b932bd6a6
Submodules updates (libusb,libressl,cpp-http,CLI11,openal) (#4428)
* update libusb

* libressl

* updated cpp-httplib

* update CLI11

* updated openal
2026-05-15 17:06:33 +03:00
Stephen Miller
f510f9aef2
Core: Various new stubs (#4398)
* sceKernelGetProcessType

* sceCoredumpRegisterCoredumpHandler stub

* Better stub for sceCoredumpRegisterCoredumpHandler, stub sceCoredumpUnregisterCoredumpHandler

* sceNpSetNpTitleId stub

* sceNpSetContentRestriction stub

* sceKernelMlock stub

* posix_sigfillset

* posix_sigprocmask stub

Just logs the how parameter

* posix_msync stub

Just logging for now

* libSceContentExport stubs

* Clang

* sceVideoRecordingSetInfo stub

* sceKernelTitleWorkaroundIsEnabled

* Provide title workaround bits

Just grabbed them from fpPS4 code, I have a feeling actually applying these is gonna be a bit of a pain though.

* fpPS4 has a 0x39 bit, I guess that was probably added after 12.52 though.

* Bump to error

It's not going to work without proper sceKernelGetAppInfo workaround data

* Clang

* Clang2
2026-05-11 20:14:57 -07:00
Valdis Bogdāns
05df651cd8
Add IME keyboard layout and panel metrics support (#3973)
* Add IME keyboard layout and panel metrics support

- Introduced new header and implementation files for IME keyboard layout handling.
- Added structures for viewport metrics, keyboard grid layout, and drawing parameters.
- Implemented functions to compute viewport and panel metrics for the IME dialog.
- Enhanced the IME dialog UI to utilize the new keyboard layout and metrics.
- Updated input handling to support new keyboard interactions and layout adjustments.
- Added caret management and text normalization features in the IME dialog state.
- Improved window positioning logic to accommodate different screen resolutions.

* fix for Maxos Linux builds

* Align IME behavior with real PS4 libSceIme/Dialog flow

Features:
- Add validation helpers for IME option/language/extended-option masks
- Implement `sceImeGetPanelSize` sizing logic
- Replace `sceImeSetTextGeometry` no-op path with real state/argument validation
- Align panel sizing/validation paths closer to PS4 IME behavior
- Improve panel text/caret handling reliability during UI updates
- Add IME panel movement via controller right stick
- Support mouse drag repositioning for the panel
- Respect `FIXED_POSITION` by disabling movement when locked

Updates:
- Tighten `sceImeOpen` checks (user/type/input method, handler, work alignment, reserved, overlap)
- Validate initial/runtime text rules (`\n`/`\r` and surrogate rejection) in open/set-text paths
- Enforce caret bounds and null-caret behavior in `sceImeSetCaret`
- Update `sceImeUpdate` to return `NOT_OPENED` in invalid states and respect handler matching
- Harden `ImeHandler` against null state/callback execution paths
- Optimize keyboard grid rendering by reusing per-frame buffers
- Reduce input callback allocations with fixed-size buffers
- Harden panel update paths for invalid handler/open-state cases
- Clamp panel position to visible screen bounds
- Apply stick deadzone/speed scaling for stable movement
- Keep panel coordinates consistent with IME coordinate mode

* 🤦‍♂️

* Enhance IME UI and Input Handling

- Introduced BrightenColor function to adjust color brightness for UI elements.
- Improved UTF-16 character handling with new functions to count UTF-16 units and reject input based on UTF-16 limits.
- Added functionality to clamp input buffer to UTF-16 limits, ensuring text input does not exceed specified limits.
- Refactored virtual pad input handling to encapsulate left stick directions and panel movement.
- Enhanced IME UI drawing logic to incorporate new input handling and navigation features.
- Updated keyboard layout handling to support dynamic configurations and improved navigation shortcuts.
- Integrated additional font ranges for better language support in the IME, including Chinese, Arabic, and Thai.
- Improved overall code structure and readability by utilizing modern C++ features such as std::vector and std::array.

* Remove non existing Roboto Medium font from IME initialization

* Enhance IME Dialog and UI with Improved Gamepad Navigation and Key Mapping

- Added support for disabling gamepad input through OrbisImeDisableDevice in ImeDialogState.
- Updated ImeKbLayout to modify key mappings for better character input, including changes to punctuation keys.
- Implemented enhanced left stick navigation with repeat functionality in ImeUi, allowing for smoother input handling.
- Introduced new constants for stick navigation delays and repeat intervals to improve responsiveness.
- Refactored input handling logic to accommodate both virtual and gamepad inputs, ensuring consistent behavior across devices.
- Added functionality to clear all text in the input field with a specific shortcut, aligning with expected user behavior.

* clang

* Enhance IME functionality with improved gamepad navigation and layout handling

* ime: fix specials/accent layout mapping and dynamic panel resize handling

- Expand specials/accent keyboard layouts to a 7-row model and move function keys to fixed bottom rows.
- Add variable row-height support to the keyboard grid (`fixed_bottom_rows`, `bottom_row_h`) and compute row offsets/span heights from layout config.
- Preserve function-row height in `ime_ui` and `ime_dialog_ui` while distributing remaining height across typing rows.
- Make mode-switch focus layout-driven by resolving `SymbolsMode`/`SpecialsMode` action keys in the active layout instead of relying on implicit row assumptions.
- Track panel layout anchor deltas in `ime_dialog_ui` and use press-offset dragging so cursor remains on the originally pressed point when panel dimensions/position change.

* Add IME UI enhancements and shared utilities

- Introduced new states for panel navigation and selector fade in `ime_ui.h`.
- Added a new header file `ime_ui_shared.h` containing utility functions and structures for virtual pad input handling, including deadzone application and stick navigation direction resolution.
- Updated `font_stack.cpp` to include additional Unicode ranges for general punctuation in the font atlas.

* Refactor IME settings: remove deprecated accessibility options and update references to use new settings structure

* Refactor IME UI Navigation and Activation Logic

- Introduced a new mechanism for handling virtual button repeat actions, improving responsiveness for gamepad navigation.
- Added support for stick navigation with adjustable repeat rates and initial delays, enhancing user experience during input.
- Removed the ImeSelectorFadeState structure and related logic to streamline the IME keyboard layout drawing process.
- Simplified the activation logic for menus, ensuring that menu activation is more intuitive and responsive to user input.
- Adjusted the navigation threshold for stick inputs to improve sensitivity and control.
- Cleaned up the code by removing unused variables and consolidating repeated logic into reusable functions.

* Refactor IME UI shared header: streamline code and improve structure

- Removed unused includes and redundant structures.
- Consolidated virtual pad snapshot handling and input state management.
- Introduced new structures for OSK pad input and navigation handling.
- Updated function signatures for clarity and consistency.
- Enhanced keyboard parameter application for OSK shortcuts.
- Improved overall readability and maintainability of the code.

* Refactor OskShortcutActionResult to simplify triangle button press handling

* Enhance IME Keyboard Layout and UI Functionality

- Added new key glyphs for Shift and Caps Lock in ime_kb_layout.h.
- Improved keyboard navigation logic to skip non-action keys.
- Introduced new constants for selector IDs in ime_ui.cpp for better readability.
- Refactored keyboard row and column clamping logic for clarity.
- Enhanced selector drawing logic with fade and pulse effects for better user feedback.
- Implemented functions for cycling keyboard case states and toggling keyboard family modes.
- Added functionality to focus on keyboard action keys based on their actions.
- Improved edit menu handling with new templated functions for better code reuse.
- Updated caret blinking logic to improve text input experience.
- Expanded symbol ranges in font_stack.cpp to include keyboard symbols.

---------

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-05-09 23:41:14 +03:00
rainmakerv2
82c760135f
ImGui:: Notifications (#4379)
* notifications

* cleanup

* clang
2026-05-09 11:14:11 +03:00
Ploo
5302e63fc1
fix: prevent system spdlog from conflicting with externals/spdlog on FreeBSD (#4362)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
2026-05-06 22:04:39 +03:00
rainmakerv2
ad102a173a
Imgui: make imgui emulator settings accessible with hotkey (#4345)
* put all big picture files in same folder

* Fix includes

* Update main.cpp

* make imgui settings dialog accessible by hotkey
2026-05-04 13:51:08 +03:00
Valdis Bogdāns
e455a2f41a
go-to-noto-again (#4309)
* renderer: update font handling and add new font support
- Added support for multiple NotoSans fonts including Arabic, Thai, and CJK.
- Refactored font loading logic to use FontStack for better management.
- Removed deprecated NotoSansJP font and updated font paths in CMake.

* optimize atlas size

---------

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-04-23 18:52:04 +03:00
georgemoralis
f24ad8568e
Revert "renderer: update font handling and add new font support (#4305)" (#4308)
This reverts commit 417d91cc79.
2026-04-23 17:18:32 +03:00
Valdis Bogdāns
417d91cc79
renderer: update font handling and add new font support (#4305)
- Added support for multiple NotoSans fonts including Arabic, Thai, and CJK.
- Refactored font loading logic to use FontStack for better management.
- Removed deprecated NotoSansJP font and updated font paths in CMake.

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-04-23 14:47:09 +03:00
Niram7777
280475989b
spdlog use system fmt if exists (#4282) 2026-04-19 18:12:13 +03:00
TheTurtle
1a234a566d
kernel: Rename stack file for proper preprocessor support 2026-04-19 18:04:35 +03:00
Niram7777
854b291c63
Spdlog migration (#4069)
* spdlog migration

* gitmodule instead of cmake
2026-04-19 00:57:05 +03:00
Vladislav Mikhalin
beba435a09
separate thread init and run stacks (#4274)
* separate thread init and run stacks

* copyrights

* remove TEB setting

* revert fibers

* fix linux

* remove unused variables
2026-04-18 16:17:48 +03:00
rainmakerv2
16633df872
Big Picture Settings: Add game folder selection (#4271)
* Add game folder selection

* reuse

* add enable/disable checkboxes

* column width fix

* Update ImGuiFileDialog submodule URL and branch

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2026-04-18 10:05:34 +03:00
rainmakerv2
be224a4556
Big Picture: add settings configuration (#4255)
* prototype settings look

* put categories on top instead of on the side, plays nicer with input system

* added profiles + saving and loading framework

* add helper functions

* fix autofocusing

* add code for using embedded image files

* put settings in different files

* clang

* remove sdl_image submodule, unify functions when possible

* Always display selected profile in settings content areas

* Fix focusing, logs, highlight profile text

* persist highlight on focused buttons, add all categories placeholders

* All settings added

* navigate tabs with l1/r1
2026-04-15 18:19:22 +03:00
rainmakerv2
72f514f350
Trophy: Replace sdl mixer library with minimp3 header for playing trophy sounds (#4261)
* Replace sdl mixer library with minimp3 header

* clang

* set spec before putting in audiostream

* respect main audio output device setting

* fixup

* replace file with submodule

* cleanup

* capitalize functions like the others

* move buffer to heap

* use vector for pcm buffer instead
2026-04-15 10:48:55 +03:00
rainmakerv2
cead66d3c6
Big Picture Mode (#4250)
* imguitest

* button tests

* fix gamepad nav

* placeholder hardcoded eboot path

* set focus correctly, move to own files

* get installed game information

* dynamically adjust rows

* use slider for ui scale

* launch big picture with CLI arg

* Use emulator settings for UI scale and window size

* center scrolling on focused item

* fix item focus on scrolling when navigating with keyboard or pad

* minor fixups and comments

* fix performance degradation

* adjust fonts to show TM symbol and higher overscale

* reuse and clang

* add exists check before iterator

* flatten navigation (gamepad navigation crosses child window container)

* cleanup and comments

* simplify update checker a bit

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2026-04-13 01:40:11 +03:00
georgemoralis
474a910ac4
Dialogs fixups (Np_profile_dialog , np_webbrowser dialog) (#4232)
* better transaction handling

* more fixup

* fixup some logs

* refactor : move np_profile_dialog to it's own folder

* initial np_profile_dialog_ui

* fixes a bit more ui

* more fixups

* forgot cmakelists :D

* improvements in np profile dialog + UI

* improved logging

* few more logging improvals

* dummy npscore

* fixup
2026-04-09 21:03:41 +03:00